kpmwrestler Posted May 14, 2008 Share Posted May 14, 2008 I was wondering if it is possible to make programs portable with autoit? I would like to force programs to write to a different folder than the default folder, like application data, and redirect the program to from looking in the registry to an INI file instead. Is that possible? Link to comment Share on other sites More sharing options...
ACS Posted May 15, 2008 Share Posted May 15, 2008 Are you saying you want to use AutoIt to modify an existing non-portal program and make it portable, or just write a program in AutoIt that is portable? If it's the latter, of course you can since you have full control of the program. If the former, I really don't think that's possible, unless you write a system hook to intercept that program's attempts to access the registry or specific directories. Link to comment Share on other sites More sharing options...
kpmwrestler Posted May 15, 2008 Author Share Posted May 15, 2008 I want to make any program portable by changing what a program thinks is something like the application data folder or the registry and change the folder that it writes to. Kind of catching it and redirecting the writing to somewhere else. Link to comment Share on other sites More sharing options...
MHz Posted May 15, 2008 Share Posted May 15, 2008 I want to make any program portable by changing what a program thinks is something like the application data folder or the registry and change the folder that it writes to. Kind of catching it and redirecting the writing to somewhere else.Use SetEnv() to change the environmental variable before running the application. The example below makes @ComSpec believe that %APPDATA% is actually @ScriptDir. Some portable loaders like PStart allow for setting environmental variables which I have not used yet but assume it may do similar as the example below. EnvSet('%APPDATA%', @ScriptDir) Run(@ComSpec & ' /k set APPDATA') As for registry entries, some people check for entries before starting the application, run the application, and then clean up or restore registry entries as needed. That is what the guys at PortableApps do with NSIS wrappers. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now