Jump to content

Method to Install SFX Anywhere


Recommended Posts

[Linky]

Okay this all came about because I couldn't figure out a way in a reasonable amount of time to be able to extract the contents of a SFX file where I wanted dynamically. As I didn't want to extract to "C:\Windows\System32\" when Windows is on D:\ or some other drive.

Now my script will not override any folders archived into the SFX file...but it will override any Comment pathing...or at least that's what I've been lead to believe.

If you need to overwrite a file or files you need to still add the SFX comment to perform an overwrite...as that is beyond the scope of my script.

Overwrite=1

Anyways I'm just going to cut and paste out of the ReadMe file I enclosed in the archive linked to above.

Command Line Syntax is:

InstallSFX.exe "<SFX.exe>" @Alias "\<Optonal Further Pathing>\"

Example:

InstallSFX.exe ScreenSavers.exe @SystemDir

Will extract the contents of ScreenSavers.exe into the System32 folder.

Keep in mind that if an SFX file's name contains spaces it must be enclosed in quotes.

The same applies to the optional pathing...which should be preceeded with a backslash.

The Following are available:

; All Users
; =====================================
@AppDataCommonDir ; path to Application Data
@DesktopCommonDir ; path to Desktop
@DocumentsCommonDir ; path to Documents
@FavoritesCommonDir ; path to Favorites
@ProgramsCommonDir ; path to Start Menu's Programs folder
@StartMenuCommonDir ; path to Start Menu folder
@StartupCommonDir ; path to Startup folder

; Current User
; =====================================
@AppDataDir ; path to current user's Application Data
@DesktopDir ; path to current user's Desktop
@MyDocumentsDir ; path to My Documents target
@FavoritesDir ; path to current user's Favorites
@ProgramsDir ; path to current user's Programs (folder on Start Menu)
@StartMenuDir ; path to current user's Start Menu
@StartupDir ; current user's Startup folder
@UserProfileDir ; Path to current user's Profile folder.

; Other Macro's
; =====================================
@HomeDrive ; Drive letter of drive containing current user's home directory.
@ProgramFilesDir ; path to Program Files folder
@CommonFilesDir ; path to Common Files folder
@WindowsDir ; path to Windows folder
@SystemDir ; path to Windows' System (or System32) folder
@TempDir ; path to the temporary files folder

For an example of this in actual use check out my addon to add Screen Meditation ScreenSavers to my Base Install.

Edited by Nologic
Link to comment
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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...