Archive: CreateDirectory fails


CreateDirectory fails
I've got a script with the following code:

Var /GLOBAL HPATH
ReadEnvStr $HPATH HOMEPATH
CreateDirectory "$HPATH\Femtosoft\QuickFrog"

When I run the installer, it says "Created directory \Users\Ken\Femtosoft\QuickFrog".

However, the directory is not created.

I've tried various permutations of this with no success.

I'm attaching the whole install script in case someone would like to look at it.

Thanks for any help.


That is because HOMEPATH does not contain the drive.
Now the path is a relative path, so the folder will be created in the $INSTDIR.
You need to get the HOMEDRIVE as well:

Var /GLOBAL HDRIVE
Var /GLOBAL HPATH
ReadEnvStr $HDRIVE HOMEDRIVE
ReadEnvStr $HPATH HOMEPATH
CreateDirectory "$HDRIVE$HPATH\Femtosoft\QuickFrog"

try $PROFILE. But you are not supposed to store files at the root of the profile, use appdata or localappdata


Both of you were so right! It's working! Thanks!