Category: Basic VBScript

Running VBScripts with UAC Elevation

User1 Task Manager Notepad Process Results

Overview Since the introduction of User Account Control (UAC), scripts do not run with administrator privileges despite being a local administrator.  You must elevate your script to run with administrator privileges. I’ll start by showing you a simple example.  The script below will list all of the processes on the local computer as well as …

Continue reading


‘========================================================================= ‘ ElevateWscript.vbs ‘ VERSION: 1.0 ‘ AUTHOR: Brian Steinmeyer ‘ EMAIL: [email protected] ‘ WEB: ‘ DATE: 1/25/2012 ‘ COMPATIBLE: Windows Vista, Server 2008, and Above ‘ COMMENTS: Since the introduction of UAC in Windows, despite being an ‘ administrator you may still need to run a script with elevated ‘ privileges. For example …

Continue reading


‘========================================================================= ‘ ListRunningScripts.vbs ‘ VERSION: 1.1 – Null value is returned when a script is launched by another user on the local computer and the script is not elevated for UAC. I added a check to look for this and alert the user. ‘ AUTHOR: Brian Steinmeyer ‘ EMAIL: [email protected] ‘ WEB: ‘ DATE: …

Continue reading


‘========================================================================= ‘ IDK.vbs ‘ VERSION: 1.0 ‘ AUTHOR: Brian Steinmeyer ‘ EMAIL: [email protected] ‘ WEB: ‘ DATE: 12/8/2012 ‘ COMMENTS: If you have ever had an issue making a decision like “What Should ‘ I eat for dinner” or “What should I do tonight?” then IDK aka “I Don’t Know” ‘ is the script …

Continue reading


‘========================================================================= ‘ EmailParts.vbs ‘ VERSION: 1.0 ‘ AUTHOR: Brian Steinmeyer ‘ EMAIL: [email protected] ‘ WEB: ‘ DATE: 4/1/2012 ‘ COMMENTS: Four methods to break an email address into the local and ‘ domain parts. I prefer the string methods because you can make them ‘ 1-liners, doesn’t require additional variables, and simplifies error ‘ …

Continue reading


‘========================================================================= ‘ ScriptSuicide.vbs ‘ VERSION: 1.0 ‘ AUTHOR: Brian Steinmeyer ‘ EMAIL: [email protected] ‘ WEB: ‘ DATE: 1/1/2011 ‘ COMMENTS: Deletes the current script. This is useful when you are running ‘ scripts to automate tasks such as installations, logins, etc and you want ‘ to remove the script after it executes. ‘ EXAMPLE: …

Continue reading