Convert Path not working?

Got a problem you cannot solve? Try here.
Post Reply
Phil
Posts: 5
Joined: Fri Nov 02, 2007 8:16 am

Convert Path not working?

Post by Phil »

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:

Post by Alex_Ronquillo »

Phil,

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/
Phil
Posts: 5
Joined: Fri Nov 02, 2007 8:16 am

Post by Phil »

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
Mateo
Posts: 20
Joined: Tue Aug 21, 2007 10:15 am

Post by Mateo »

Is there a fix for this? I'm having the same problem with some legacy software as well and really need to be able to convert to a short path.

Thanks
Phil
Posts: 5
Joined: Fri Nov 02, 2007 8:16 am

Post by Phil »

Bump.

Never got a response to this after I posted a test project.
Alex_Ronquillo
Site Admin
Posts: 364
Joined: Mon Jul 30, 2007 11:51 am
Location: USA
Contact:

Post by Alex_Ronquillo »

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:

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/
Phil
Posts: 5
Joined: Fri Nov 02, 2007 8:16 am

Post by Phil »

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:

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?
Alex_Ronquillo
Site Admin
Posts: 364
Joined: Mon Jul 30, 2007 11:51 am
Location: USA
Contact:

Post by Alex_Ronquillo »

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.
Alejandro Ronquillo
InstallAware
Home of The Next Generation MSI Installer
Get your free copy today - http://www.installaware.com/
Phil
Posts: 5
Joined: Fri Nov 02, 2007 8:16 am

Post by Phil »

IA: 7.0(Build lonepine_rtm.071107)
Testing OS: XP Service Pack 2
Post Reply