Jump to content

Use custom Application data folder?


Striker___

Recommended Posts

Hello

I have a application that I use 2 different versions of and it uses the same config file that is located at Application Data\ApplicationName\config.ini

The problem is that some settings disappears when switching between the different versions and I have not been able to find a parameter that can make it to use a different config.ini

Is it possible to "fool" a program to use a custom Application data folder?

So i could make it use Application Data\ApplicationName\versionX\config.ini where "X" is the version

If it makes any difference the application is Ventrilo

Edited by Striker___
Link to comment
Share on other sites


One way could be to use Run As with two different user accounts for each instance of the program.

There are launchers that override API calls and can redirect the paths for a process.

For example: http://portableapps.com/

Typically created with NSIS http://nsis.sourceforge.net/Main_Page

Another is application virtualization software such as App-V or ThinApp.

http://www.microsoft.com/systemcenter/appv/default.mspx

http://www.vmware.com/products/thinapp/

Link to comment
Share on other sites

An example CMD script to show changing of an environmental variable which the program will normally inherit.

setlocal
set appdata=%userprofile%\desktop
start notepad.exe
endlocal

rem Use save in notepad and save as %appdata%\test.txt
rem You will then notice the file test.txt saved on your desktop
rem Programs will normally inherit the environment passed to them
rem Use admin privilages to start the script if needed

Link to comment
Share on other sites

DigeratiPrime

App-V & ThinApp looks a bit to complicated to use for what Im after but i will look in to PortableApps.com and see if its possible to use.

I also like the idea of having both versions in the same "launcher" as Im currently using something similar for that and it would be great if it could solve my problem and be the launcher at the same time.

MHz

for some reason Ventrilo just ignores this and uses the config file from its regular path

Thank you both for your quick answers ;)

Edited by Striker___
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...