cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
ZygoCorp
Level 6

start > programs shortcut not working

This is an INSTALLSCRIPT project running Windows 7, 64 bit.
My installer calls another installer that installs a bunch of stuff. I need to create a start > programs shortcut to one of the programs installed by this other program. I use the AddFolderIcon() command and the shortcut is created properly and shows up on the start > menu list.

HOWEVER, it will not run. The windows error when you select the shortcut is:
The item 'Program' that this shortcut refers to has been changed or moved, so this cshortcut will not work properly.

Looking at the properties of the shortcut everything is fine - the patha nd name to the exe, the working directory, etc. After opening the properties of the shortcut AND NOT CHANGING ANYTHING, I press 'OK' and I am prompted that I need administrator permission to change the properties. I can answer ok and then the shortcut works fine. So essentially the parameters set in AddFolderIcon are not actually applied.

I cannot use the ShortCut IDE because I do not install the exe and therefore cannot point the shortcut inthe ide to the exe. I will alos mention - and this is important - that the exe is located under Program Files.

Help. Of course, this is a new requirement and we are releasing in 4 days.......Thanks.
Labels (1)
0 Kudos
(4) Replies
TsungH
Level 12

Taking a wild guess here. Is the path to the executable enclosed by double quotes?
0 Kudos
ZygoCorp
Level 6

The path to the executable is sent to AddFolderIcon via a string variable and does not have quotes included. I can add them to the string, but given that the workaround/solution is to grant permission to the property "change" of the menu item, I'm not sure how that will help, but I will try.

The problem is that the exe lives in Program Files, and the system believes that I need administrator privilegesto set this shortcut's priorities.
0 Kudos
TsungH
Level 12

You could add the double quotes to the string before calling AddFolderIcon function, if that's the only reason preventing your shortcut from being launched correctly.
0 Kudos
ZygoCorp
Level 6

thanks. that seemed to work. I have only tried it through 'repair' (I deleted the start menu entries prior to running). Waiting to test on a clean install.
0 Kudos