/build/static/layout/Breadcrumb_cap_w.png

shortcut delete

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

Answers (5)

Posted by: jmaclaurin 12 years ago
Third Degree Blue Belt
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.
Posted by: rock_star 12 years ago
4th Degree Black Belt
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.
Posted by: sammaustria 12 years ago
Yellow Belt
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.
Posted by: jmcfadyen 12 years ago
5th Degree Black Belt
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?
Posted by: anonymous_9363 12 years ago
Red Belt
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?
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ