Page 1 of 1

shortcut to file on CDDRIVE not showing up

Posted: Tue Feb 21, 2017 3:57 pm
by realworld
I've created an installer that includes shortcuts that point to an executable on the $CDDRIVE$. This has worked just fine for years. I'm now using Studio X5, and am creating an installer for windows 10 for the first time. The shortcuts appear and work on windows 7 and older just fine, but don't appear in windows 10.

Now, more specifically, I have tried all sorts of options, including pin to start screen/menu (windows 10), and the shortcut doesn't show up.

The only TYPE of shortcut that DOES work is the $DESKTOPDIR$ one. (see pic). The same shortcut, using $SHORTCUTFOLDER$ or $SHORTCUTFILES$ doesn't appear (see pic). So the end result is that I get a shortcut on the user's desktop that works, but no shortcut to the program in the start menu.

I have other shortcuts to files that point to the $TARGETDIR$ and they work fine. The issue seems to be when pointing to a file on the $CDDRIVE$ (again...works for desktopdir shortcuts, but not shortcutfolder or shortcutfiles).

See pic of the msi code...pretty straightforward, and again...works on windows 7 and prior OS...just not on windows 10. I've reviewed the shortcuts sample project referenced in other forum topics on shortcuts and the code is good. What's unique is I'm not pointing to an file in the targetdir, but rather a file on $cddrive$.

So, wondering what I can do to get this to work. Any fancy coding tricks that would force the shortcut to be created?

Thanks.

Re: shortcut to file on CDDRIVE not showing up

Posted: Wed Feb 22, 2017 11:13 am
by FrancescoT
Dear Realworld,

I know that may look funny, but the MSI engine doesn't like the "CDDRIVE" location and this seems to be limited with the most recent systems only.

You may try to see if this behavior can be skipped using the IA NATIVE ENGINE.

In other words and for that shortcut, you may try;

Code: Select all

...
Set Variable NATIVE_ENGINE to TRUE
Create Shortcut \ to xxxx
Set Variable NATIVE_ENGINE to FALSE
...

With the above approach the "ShortCut" gets created immediately and not deferred to "Apply Install" execution.
This also causes that such ShortCut Creation will be not included with the generated MSI database and due of this, the Shortcut will be not removed at uninstall.

Consequently and in case the workaround works fine, you will need to explicitly delete that shortcut when uninstalling.

For example;

Code: Select all

...
if Variable REMOVE Equals TRUE
  Comment: Uninstall product
  Comment: TO-DO: Insert any additional uninstall commands here
  Apply Uninstall (get result into variable SUCCESS)
  
  Comment: DELETE SHORTCUT ON SUCCESS
  if Variable SUCCESS Equals COMPLETE
    Set Variable NATIVE_ENGINE to TRUE
    Delete Files xxx\ (when installing)
    Set Variable NATIVE_ENGINE to FALSE
  end
  Comment: END
  
  Set Variable PROGRESS to 100
 else
  ....

Hope this helps you.

Regards

Re: shortcut to file on CDDRIVE not showing up

Posted: Thu Feb 23, 2017 1:28 pm
by realworld
Thanks. I tried, but it didn't work. See attached installer. The only shortcuts it adds in windows 10 are the Read Me and Check for Updates.

Re: shortcut to file on CDDRIVE not showing up

Posted: Thu Mar 02, 2017 11:52 am
by realworld
This is still a problem for me. See my previous reply above if you can help. Thanks.

Re: shortcut to file on CDDRIVE not showing up

Posted: Thu Mar 02, 2017 2:19 pm
by FrancescoT
Dear Realworld,

as I said previously, this was a try.
If the OS doesn't permit to create such shortcut, I believe there isn't so much to do.

Regards

Re: shortcut to file on CDDRIVE not showing up

Posted: Fri Mar 03, 2017 10:25 am
by realworld
oh well. What is also pretty frustrating is that there is some inconsistency to the results. Sometimes, I have seen the shortcut at the main level of the start menu > all programs list (in alphabetic order, not on the recently installed), but NOT within the program group like it should be...and then I have also seen several times for different installs, where the first time I go to access the start menu > all programs...and navigate to the program folder for my app, I have seen the "uninstall" shortcut, but after I hover over it, it disappears...and never comes back.

Maybe I have a corrupt windows OS type situation?

Re: shortcut to file on CDDRIVE not showing up

Posted: Wed Mar 08, 2017 6:30 am
by FrancescoT
yes, this may be due a corruption.

Regards