Simple Question
About 4 months ago I was given (forced) the duty of creating wise packages. Thus far I have created 6 packages, simple ones at that. Like a lab rat hitting the feeder bar with little to no understanding of how it actual works I have been taking snap shots of programs and deploying them, and saying “LOOK WHAT I CAN DOâ€Â. Now, I have been tasked with creating a script that deletes a Link to a web app no longer used from the all users desktop. Sounds simple right? Well, I have tried using the Command "Delete File†that does not work.
I am using Wise Package Studio 5, mainly the script template. If anyone is familiar with this I could really use the help.
I am using Wise Package Studio 5, mainly the script template. If anyone is familiar with this I could really use the help.
0 Comments
[ + ] Show comments
Answers (9)
Please log in to answer
Posted by:
MSIPackager
18 years ago
If you want to do it via VBScript (which you will still be able to push via SMS) try the following - obviosuly changing Adobe Reader 6.0.lnk to whatever you need...
---------------
Dim objFSO : Set objFSO = CreateObject("Scripting.FileSystemObject")
Dim strFileName : strFileName = "C:\Documents and Settings\All Users\Desktop\Adobe Reader 6.0.lnk"
objFSO.DeleteFile strFileName, True
---------------
Hope it helps,
Rob.
---------------
Dim objFSO : Set objFSO = CreateObject("Scripting.FileSystemObject")
Dim strFileName : strFileName = "C:\Documents and Settings\All Users\Desktop\Adobe Reader 6.0.lnk"
objFSO.DeleteFile strFileName, True
---------------
Hope it helps,
Rob.
Posted by:
MSIPackager
18 years ago
Hey,
It is a simple task if you are well acquainted with MSI packaging - there are few ways to achieve it, such as by the removefile table or using a conditioned custom action (e.g. running vb or wise script).
How about removing the unwanted shortcut via other means such as a script via the logon script?
Regarding being dropped in at the deep end, I'd advise at the very least that you do plenty of testing as far as the uninstall is concerned.. Just snap-shotting and deploying apps with little packaging experience is a dangerous game. If you've included system files or reg keys, or handled changed to the environment settings (e.g. path statement) incorrectly you could find that the uninstall routine breaks the machine.
Not trying to put the fear of god into you - just maybe worth mentioning to your manager as a disclaimer [;)]
Good luck,
Rob.
It is a simple task if you are well acquainted with MSI packaging - there are few ways to achieve it, such as by the removefile table or using a conditioned custom action (e.g. running vb or wise script).
How about removing the unwanted shortcut via other means such as a script via the logon script?
Regarding being dropped in at the deep end, I'd advise at the very least that you do plenty of testing as far as the uninstall is concerned.. Just snap-shotting and deploying apps with little packaging experience is a dangerous game. If you've included system files or reg keys, or handled changed to the environment settings (e.g. path statement) incorrectly you could find that the uninstall routine breaks the machine.
Not trying to put the fear of god into you - just maybe worth mentioning to your manager as a disclaimer [;)]
Good luck,
Rob.
Posted by:
SiteTech01
18 years ago
Thanks for the reply :)
Yeah, I would like to use a wise script to perform this action, that way I can push it out using SMS. I would try logon scripts but it’s out side the realm of my security clearance. I could not touch the logon scripts even if I contacted the group who manages it. Thanks for the warning, would tell my boss but it would not do any good. It’s not because he does not believe in God or anything like that. Just that he is the devil and I would be punished for my disobedience.
Yeah, I would like to use a wise script to perform this action, that way I can push it out using SMS. I would try logon scripts but it’s out side the realm of my security clearance. I could not touch the logon scripts even if I contacted the group who manages it. Thanks for the warning, would tell my boss but it would not do any good. It’s not because he does not believe in God or anything like that. Just that he is the devil and I would be punished for my disobedience.
Posted by:
turbokitty
18 years ago
I'll add my opinion... I think you should use a VBScript wherever possible. VBscripting is a skill you can use beyond your packaging days and will also be useful if your company switches to Installshield or if you start at a new company that uses a different packaging toolset.
Wisescript works fine, don't get me wrong... but as you're just starting out, I'd use a language that will help you out later in your career.
Wisescript works fine, don't get me wrong... but as you're just starting out, I'd use a language that will help you out later in your career.
Posted by:
SiteTech01
18 years ago
Posted by:
turbokitty
18 years ago
Posted by:
jonatas.lessa
18 years ago
If want go a little bit deeper in vbs scripting, you could try this:
VbsEditor - great vbs editor, and hundreds of examples to make your life easier - specially if your not experienced with the language - download it
Scriptomatic - for WMI edition, specially helpful if you are a system administrator - download it
AdminScriptEditor - quite script editor, not just for vbs - http://www.adminscripteditor.com/main.asp
Hope helps!
Johhny
ps: when I grow up, I want be like Rob lol...
VbsEditor - great vbs editor, and hundreds of examples to make your life easier - specially if your not experienced with the language - download it
Scriptomatic - for WMI edition, specially helpful if you are a system administrator - download it
AdminScriptEditor - quite script editor, not just for vbs - http://www.adminscripteditor.com/main.asp
Hope helps!
Johhny
ps: when I grow up, I want be like Rob lol...
Posted by:
edocshare
18 years ago
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
so that the conversation will remain readable.