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

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
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.
Answered 06/15/2011 by: GillySpy
Seventh Degree Black Belt

Please log in to comment
0
My file is lnk files on user's desktop. Is this correct?
FileExists (%USERPROFILE%\DESKTOP\<appname>.lnk)
Answered 06/15/2011 by: divya_dogra
Orange Belt

Please log in to comment
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.
Answered 06/15/2011 by: GillySpy
Seventh Degree Black Belt

Please log in to comment
0
Logged in user dont have local admin rights on system.
Answered 06/15/2011 by: divya_dogra
Orange Belt

Please log in to comment
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
Answered 06/15/2011 by: GillySpy
Seventh Degree Black Belt

Please log in to comment
0
Ok Got it. it means I have to add custom software title, then create managed Install and then KScript to achieve this?
Answered 06/15/2011 by: divya_dogra
Orange Belt

Please log in to comment
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
Answered 06/15/2011 by: GillySpy
Seventh Degree Black Belt

Please log in to comment
0
alright thanks. One last questions plz, can I use environment variables in Verify portion of scripting in Verify if File Exists????
Answered 06/15/2011 by: divya_dogra
Orange Belt

Please log in to comment
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.
Answered 06/15/2011 by: GillySpy
Seventh Degree Black Belt

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