Sign in to follow this  
Followers 0
Thatsgreat2345

Installing Folder

5 posts in this topic

#1 ·  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

Share this post


Link to post
Share on other sites



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.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

If they are not zipped you can use DirCopy.

Edited by peter1234

Share this post


Link to post
Share on other sites

No, I believe the OP meant at install time. DirCopy and FileCopy won't work in this case because the files won't have been extracted from the executable yet.

Share this post


Link to post
Share on other sites

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
Sign in to follow this  
Followers 0