Page 1 of 1

problem with new folder with leading space

Posted: Wed Sep 19, 2007 5:41 pm
by zipzap
A customer used our InstallAware to install our product. They entered the following custom directory for installing:
c:\\cprogs\\Test\\ Folder

The install finished without error. The problem is that Windows won't allow you to have leading spaces in folder names. So it created:
c:\\cprogs\\Test\\Folder. The desktop shortcut had the above path with the leading space in it, which doesn't work.

Is there a way to remove the leading spaces in the path?

Posted: Thu Sep 20, 2007 11:45 am
by zipzap
I figured out a way to remove the leading zero.

I created the following loop after the wizard loop:

Code: Select all

Label: Lead_Space
if Variable TARGETDIR Contains "\\ "
    Replace "\\ " with "\\" in variable TARGETDIR
    Goto Label: Lead_Space
end

Works great!