/build/static/layout/Breadcrumb_cap_w.png

Custom inventory rule for desktop shortcut

I haev to deploy an exe which removes desktop shortcut of of the application. I added "Remove Desktop Shortcut" software in custom inventory. Need help in creating custom inventory rule for this.

0 Comments   [ + ] Show comments

Answers (9)

Posted by: GillySpy 13 years ago
7th Degree Black Belt
0
Are you wanting a custom inventory rule to detect the shortcut? Where is the shortcut located? Sounds like you could use

FileExists(path)


Then deploy your exe as an MI that does an uinstall. The uninstall command would be your exe.
Posted by: divya_dogra 13 years ago
Orange Belt
0
My file is lnk files on user's desktop. Is this correct?
FileExists (%USERPROFILE%\DESKTOP\<appname>.lnk)
Posted by: GillySpy 13 years ago
7th Degree Black Belt
0
You cannot use environment variables in those.

If it's on the user's desktop then i would run it as a script which runs on login as the user. The verify portion of the task would check for the existence of the file . Then in the success phase of the task the script could have a batch task that runs your exe.
Posted by: divya_dogra 13 years ago
Orange Belt
0
Logged in user dont have local admin rights on system.
Posted by: GillySpy 13 years ago
7th Degree Black Belt
0
if you require local admin rights to delete a shortcut on the user's desktop then you'll have to do something to determine that current user then delete their shortcut.

Something like this script would help you discover that.
http://www.kace.com/support/kb/index.php?action=artikel&cat=5&id=698&artlang=en
Posted by: divya_dogra 13 years ago
Orange Belt
0
Ok Got it. it means I have to add custom software title, then create managed Install and then KScript to achieve this?
Posted by: GillySpy 13 years ago
7th Degree Black Belt
0
The custom inventory rule is irrelevant to you now.

Because of your combination of requiring that a local admin delete something discovered in the local user context then you should use a custom batch or vbs. This can be deploy with an MI or via scripting.

I would go with scripting because it gives you more control over a complex set of steps
Posted by: divya_dogra 13 years ago
Orange Belt
0
alright thanks. One last questions plz, can I use environment variables in Verify portion of scripting in Verify if File Exists????
Posted by: GillySpy 13 years ago
7th Degree Black Belt
0
Off the top of my head I'm not certain (anyone else?), but what environment variable would you use here?

As you already said the script is not going to run in the context of that user, but rather the admin (or by default the SYSTEM account). Thus, you would need to verify it as part of your code -- might as well just skip the verify step in the script.
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.

Don't be a Stranger!

Sign up today to participate, stay informed, earn points and establish a reputation for yourself!

Sign up! or login

Share

 
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