Convert to Short Path problem

Got a problem you cannot solve? Try here.
Post Reply
tosch
Posts: 63
Joined: Thu May 27, 2010 8:44 am

Convert to Short Path problem

Post 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
giaviv
Posts: 2039
Joined: Fri Dec 17, 2010 1:39 pm

Re: Convert to Short Path problem

Post by giaviv »

Thomas,

What would you expect that path to return in the end?
Aviv Giladi
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Product Guides - http://www.installaware.com/publication ... guides.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
tosch
Posts: 63
Joined: Thu May 27, 2010 8:44 am

Re: Convert to Short Path problem

Post 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
giaviv
Posts: 2039
Joined: Fri Dec 17, 2010 1:39 pm

Re: Convert to Short Path problem

Post by giaviv »

Thomas,

Could you please send a reproducing project to support at installaware.com?
Aviv Giladi
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Product Guides - http://www.installaware.com/publication ... guides.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
tosch
Posts: 63
Joined: Thu May 27, 2010 8:44 am

Re: Convert to Short Path problem

Post by tosch »

Do you have any news on this issue?

Thomas
giaviv
Posts: 2039
Joined: Fri Dec 17, 2010 1:39 pm

Re: Convert to Short Path problem

Post by giaviv »

Hi Thomas,

I apologize, but we never received your project again?
Aviv Giladi
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Product Guides - http://www.installaware.com/publication ... guides.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
tosch
Posts: 63
Joined: Thu May 27, 2010 8:44 am

Re: Convert to Short Path problem

Post by tosch »

I have emailed you a demo project again.

Thomas
giaviv
Posts: 2039
Joined: Fri Dec 17, 2010 1:39 pm

Re: Convert to Short Path problem

Post by giaviv »

Hi,

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

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Product Guides - http://www.installaware.com/publication ... guides.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
tosch
Posts: 63
Joined: Thu May 27, 2010 8:44 am

Re: Convert to Short Path problem

Post 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
giaviv
Posts: 2039
Joined: Fri Dec 17, 2010 1:39 pm

Re: Convert to Short Path problem

Post by giaviv »

Sounds about right - InstallAware uses windows tools to get the different path, therefore it fails when there is no file..
Aviv Giladi
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Product Guides - http://www.installaware.com/publication ... guides.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
Post Reply