You will need AutoIt to make this script run, install this software and then you can continue. The “Help File” is definitely your friend in this program. It is necessary to reference as you will not remember everything.
You will need to make a folder containing your entire script (name it whatever you like). Then create another folder inside of the script folder called “Source”.
Open AutoIt and create a new blank script. Saving it in the folder that contains your “Source” folder.
I always give my scripts a header by pasting this at the top and including details about the script I am creating. AutoIt will include a header for you depending on how you create it.
1 2 3 4 5 6 7 8 9 10 11 12 |
#cs ---------------------------------------------------------------------------- AutoIt Source File NAME: What is a simple name for your script? AUTHOR: Your Name Here DATE : Today's Date Here COMMENT: What is your Script Doing??? #ce ---------------------------------------------------------------------------- |
You wont actually need anything in your “Source” folder for this script. So you can just leave it or delete it.
Here is the code you will need to paste into your new blank script under your header.
1 2 3 4 |
#NoTrayIcon ;Uninstall KB:xxxxxxx RunWait (@SystemDir & "\wusa.exe /uninstall /kb:xxxxxxx /norestart /quiet") |
I have made this script silent.
Optional Changes
If you like you can put a “;” in front of “#NoTrayIcon” and you will see the icon for your script in the taskbar.
Save your script, right click the “*.au3” file and click compile script. This will create an “*.exe” that you can right click and “Run as administrator” locally, or push out as a package or application in SCCM.