I have an app that places a shortcut on the desktop. If installed on XP I can delete the the desktop shortcut from within my Wise Script Editor package after the installer is done but running cmd.exe /c del Icon.lnk

But this does not work on Windows 7. On Windows 7 I have tried the following and nothing works.

cmd.exe /c del "c:\users\public\desktop\Icon.lnk"
cmd.exe /c del "c:\users\public desktop\desktop\Icon.lnk"

Is this a special folder that does not allow scripts to access it?
0 Comments   [ + ] Show Comments

Comments

Please log in to comment

Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.

Answers

0
Its not a problem with the command which can be easily tested (just did infact). I think its a problem with how you are running it. You will likely need to right click and select run as admin to make it work completely.
Answered 07/27/2011 by: jmaclaurin
Third Degree Blue Belt

Please log in to comment
0
The command should work.

Just check the shortcut location once .
It shouldn't be like : C:\Users\%username%\Desktop\Icon.lnk
If so , then you need to go to that location and delete.
Answered 07/28/2011 by: rock_star
Black Belt

Please log in to comment
0
Personally, the post is in fact the most excellent on this impressive topic.
I harmonize with your conclusions and will keenly look further to your future updates.
Answered 07/31/2011 by: sammaustria
Yellow Belt

Please log in to comment
0
doing this on Win7 with UAC enabled will require elevation.

You can send an elevated command using elevate.exe but this will only work on an admin based account. Standard users will still fail.

is your UAC on?
Answered 08/01/2011 by: jmcfadyen
Fifth Degree Black Belt

Please log in to comment
0
If the app's package is an MSI, why not simply condition-out the shortcut's creation in your transform? If it's not, why not create an MSI for that explicit purpose?
Answered 08/04/2011 by: VBScab
Red Belt

Please log in to comment
Answer this question or Comment on this question for clarity