MUI Start Menu page -- Error creating shortcut (Was: Can't open file for writing)
Thanks, kichik. That was the problem. I see now how I misunderstood the documentation.
However, I'm still having trouble with the switch to MUI. I'm having problems creating shortcut icons, and I seem to have traced it to a faulty value being set for $StartMenuGroup by the MUI Start Menu macro.
I use the following to set the variable for the Start Menu Group selected during the install dialog
insertmacro MUI_PAGE_STARTMENU install_page_1 $StartMenuGroup
This variable should be set to the filepath selected by the user. Using DetailPrint, I find that it is actually set to
c\Documents and Settings\Mark\Start Menu\Programs\jRAM
Note that the ":" is missing after the "C"
The result is then that the installer gives error message "Failed to create shortcut" for each Start Menu shortcut. I also get in my Start Menu Programs folder the following folder with subfolders:
c\Documents and Settings\Mark\Start Menu\Programs\jRAM
This is apparently caused by the
CreateDirectory $StartMenuGroup
command, but why the folder gets created in the Start Menu is beyond me. But apparently the failure to create the shortcuts is caused by the missing ":".
I can certainly write a function to insert the ":", but I'm wondering if I'm missing something. I didn't find a bug report about this, and it seems doubtful I'm the first one to find it.
I attached my script file once again, as I made some changes from the last post, to account for the fact that $StartMenuGroup contains the entire path when using MUI, while with the function I was using previously (still in the script, but not called) it only contained the last segment of the path.