Page 1 of 1

Convert to Short Path problem

Posted: Thu Jul 14, 2011 6:38 am
by tosch
I have the following lines in my script (called newproject):

Set Variable COPYSOURCE to $SETUPPATH$newproject.exe
Convert to Short Path: COPYSOURCE

After the first line the variable is set to whereever I start newproject.exe from.
After the second line the variable ist set to 'usertemp\miaxxx.tmp\newproject.exe'

Example, started c:\temp\newproject.exe
After first line: c:\temp\newproject.exe
After second line: c:\Users\myusername\Appdata\Local\Temp\mia9FC.tmp\newproject.exe

Why?

Thomas

Re: Convert to Short Path problem

Posted: Thu Jul 14, 2011 11:24 am
by giaviv
Thomas,

What would you expect that path to return in the end?

Re: Convert to Short Path problem

Posted: Thu Jul 14, 2011 1:09 pm
by tosch
I expected it to be 'c:\temp\newpro~1.exe' but definitely not a completely different value.
If you make a script with the same two lines and start this setup from a folder with a long (non 8char) name it should convert this to the approriate short version of the foldername and not suddenly be the temp folder where the setup is extracted to.

Or maybe I'm completely wrong with what this function does.

Thomas

Re: Convert to Short Path problem

Posted: Thu Jul 14, 2011 5:17 pm
by giaviv
Thomas,

Could you please send a reproducing project to support at installaware.com?

Re: Convert to Short Path problem

Posted: Wed Aug 10, 2011 3:28 am
by tosch
Do you have any news on this issue?

Thomas

Re: Convert to Short Path problem

Posted: Wed Aug 10, 2011 11:20 am
by giaviv
Hi Thomas,

I apologize, but we never received your project again?

Re: Convert to Short Path problem

Posted: Thu Aug 11, 2011 12:09 am
by tosch
I have emailed you a demo project again.

Thomas

Re: Convert to Short Path problem

Posted: Thu Aug 11, 2011 5:29 pm
by giaviv
Hi,

I built & ran your project and it seems to be working just fine:
shortpath.png
shortpath.png (41.4 KiB) Viewed 9487 times

Re: Convert to Short Path problem

Posted: Fri Aug 12, 2011 6:43 am
by tosch
I found out where my problem was: if you append a filename to the variable COPYSOURCE and the filename doesn't exist (because of a typo) the convert to short path function returns the short path version of your installation in the temp folder.

Thomas

Re: Convert to Short Path problem

Posted: Fri Aug 12, 2011 10:58 am
by giaviv
Sounds about right - InstallAware uses windows tools to get the different path, therefore it fails when there is no file..