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.
-
- Site Admin
- Posts: 364
- Joined: Mon Jul 30, 2007 11:51 am
- Location: USA
- Contact:
Phil,
Please post a little simple project showing this behavior, so we can check it.
Please post a little simple project showing this behavior, so we can check it.
Alejandro 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/
Okay, here is the project in a zip file. The installer writes to an ini file with the locations that it is getting.
File Attached:
My Project.zip
File Attached:
My Project.zip
-
- 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.dat
for:
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
You'll see it works.
Alejandro 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
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?
-
- Site Admin
- Posts: 364
- Joined: Mon Jul 30, 2007 11:51 am
- Location: USA
- Contact:
Phil,
I tried it and it worked for me. What version of IA you have? In what OS are you testing this? Let me know.
I tried it and it worked for me. What version of IA you have? In what OS are you testing this? Let me know.
Alejandro 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/
Who is online
Users browsing this forum: No registered users and 85 guests