Convert Path not working?
Convert Path not working?
I have recently tried to take one of our old programs and move it from Install Sheild to Install Aware. We write in an .ini to tell the program the location of some sound files. The program want's to have the short paths like Progra~1/Compa~1. When I don't try to change the path it shows up fine like C:\\Program Files\\Company but when I switch it to go to short, it points to some location in the user directory like C:\\users\\myna~1\\..\\..\\..\\gr342.tmp\\program.exe. I am building this as a single self-installing exe.
-
Alex_Ronquillo
- Site Admin
- Posts: 364
- Joined: Mon Jul 30, 2007 11:51 am
- Location: USA
- Contact:
-
Alex_Ronquillo
- Site Admin
- Posts: 364
- Joined: Mon Jul 30, 2007 11:51 am
- Location: USA
- Contact:
Sorry for the delay on this. Here are my findings:
You are trying to mess with variable TARGETDIR, and that confuses IA. Change the following code:
for:
You'll see it works.
You are trying to mess with variable TARGETDIR, and that confuses IA. Change the following code:
Code: Select all
Convert to Short Path: TARGETDIR
Edit INI File $TARGETDIR$\\test.ini, [TEST] TEST=$TARGETDIR$\\test
Convert to Long Path: TARGETDIR
Edit INI File $TARGETDIR$\\test.ini, [TEST] TEST=$TARGETDIR$\\test\\test.datCode: Select all
Set Variable tempVar to $TARGETDIR$
Convert to Short Path: tempVar
Edit INI File $TARGETDIR$\\test.ini, [TEST] TEST=$tempVar$\\test
Convert to Long Path: tempVar
Edit INI File $TARGETDIR$\\test.ini, [TEST2] TEST=$tempVar$\\test\\test.datAlejandro Ronquillo
InstallAware
Home of The Next Generation MSI Installer
Get your free copy today - http://www.installaware.com/
InstallAware
Home of The Next Generation MSI Installer
Get your free copy today - http://www.installaware.com/
Sorry to not get back sooner, but I just had a chance to test this out, and here is what I got. I entered what you had:
and this is the output from the change in code:
[TEST]
TEST=C:\\DOCUME~1\\DEVELO~1\\LOCALS~1\\Temp\\mia17.tmp\\My Project.exe\\test
[TEST2]
TEST=C:\\Documents and Settings\\development\\Local Settings\\Temp\\mia17.tmp\\My Project.exe\\test\\test.dat
The output is still pointing to a .tmp and an .exe... not what I am looking for. It should be pointing to c:\\Program Files\\My Project\\test. So the output should be c:\\Progra~\\MyProg~\\test shouldn't it?
Code: Select all
Set Variable tempVar to $TARGETDIR$
Convert to Short Path: tempVar
Edit INI File $TARGETDIR$\\test.ini, [TEST] TEST=$tempVar$\\test
Convert to Long Path: tempVar
Edit INI File $TARGETDIR$\\test.ini, [TEST2] TEST=$tempVar$\\test\\test.dat
[TEST]
TEST=C:\\DOCUME~1\\DEVELO~1\\LOCALS~1\\Temp\\mia17.tmp\\My Project.exe\\test
[TEST2]
TEST=C:\\Documents and Settings\\development\\Local Settings\\Temp\\mia17.tmp\\My Project.exe\\test\\test.dat
The output is still pointing to a .tmp and an .exe... not what I am looking for. It should be pointing to c:\\Program Files\\My Project\\test. So the output should be c:\\Progra~\\MyProg~\\test shouldn't it?
-
Alex_Ronquillo
- Site Admin
- Posts: 364
- Joined: Mon Jul 30, 2007 11:51 am
- Location: USA
- Contact:

