Jump to content

Recommended Posts

Posted (edited)

Is there a way to install a folder instead of just a file??? or do i have to just get every name of every file in the folder and install them

i was just thinking couldnt i make a selfextracting win zip that would extract to the program files?

Edited by thatsgreat2345
Posted

You could do it by a RightClick with my made with AutoIt CMenu program. It has AutoIt Archive Script item in your contextmenu.

Example of generated script just made:

; Source files are in "D:\Documents and Settings\Desktop\WinCAB\"

; Choose folder to extract to without trailing backslash
Global $ArchiveExtractDir = ''

Func _ArchiveInstall()
    Run($ArchiveExtractDir & '\setup.exe')
EndFunc

Func _ArchiveRemove()
    Return DirRemove($ArchiveExtractDir, 1)
EndFunc

Func _ArchiveExtract()
    Local $AED = $ArchiveExtractDir
    If DirCreate($AED) Then
        FileInstall('WinCAB\Bugs.txt', $AED & '\', 1)
        FileInstall('WinCAB\Faq.txt', $AED & '\', 1)
        FileInstall('WinCAB\File_id.diz', $AED & '\', 1)
        FileInstall('WinCAB\License.txt', $AED & '\', 1)
        FileInstall('WinCAB\makecab.exe', $AED & '\', 1)
        FileInstall('WinCAB\Readme.txt', $AED & '\', 1)
        FileInstall('WinCAB\Register.txt', $AED & '\', 1)
        FileInstall('WinCAB\Whatsnew.txt', $AED & '\', 1)
        FileInstall('WinCAB\WinCAB.cnt', $AED & '\', 1)
        FileInstall('WinCAB\WinCAB.exe', $AED & '\', 1)
        FileInstall('WinCAB\WinCAB.GID', $AED & '\', 1)
        FileInstall('WinCAB\WinCAB.hlp', $AED & '\', 1)
        FileInstall('WinCAB\WinCAB_original.exe', $AED & '\', 1)
        Return 1
    EndIf
EndFunc

Makes life easier. :P

Ofcourse you could make an SFX as you mentioned.

Posted

AFAIK, if you intend using AutoIt (FileInstall) then yes, every filename must be individually installed. I found FileInstall tedious and too prone to error (human) so I've gone back to using a self-extracting zip file to install resources.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...