0
votes

I have an Inno Setup script for installing my VB.NET program. I want to install my program in the My Documents folder. My Documents is my destination folder. In my Inno Setup script I have the following:

DefaultDirName=My Documents\{#MyAppName}

During the installation, for the destination folder, instead of coming up as

C:\Users\Rick\My Documents 

it comes up as

C:\Users\Rick\Downloads\My Documents 

Note Downloads is inserted before My Documents.

If I manually delete Downloads, it goes where I want. How can I change it so Downloads doesn't come up as part of the destination folder? I'm sure it has to do with the install .exe being in the Downloads folder. That's where it goes when it is downloaded. But I don't know how to fix it so Downloads doesn't appear as part of the destination file path. Can you help? I am not so good with the Inno Setup language so it's probably something simple.

1

1 Answers

1
votes

The DefaultDirName should be an absolute path.

You are using a relative path. In that case the path is resolved relatively to installer startup directory (what would be C:\Users\Rick\Downloads).

Use an absolute path and do not hard-code the My Documents name. You want this:

DefaultDirName={userdocs}\{#MyAppName}

See Inno Setup constants.