problem with new folder with leading space

Got a problem you cannot solve? Try here.
Post Reply
zipzap
Posts: 17
Joined: Wed Nov 08, 2006 2:01 pm

problem with new folder with leading space

Post 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?
zipzap
Posts: 17
Joined: Wed Nov 08, 2006 2:01 pm

Post 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!
Post Reply