Created
March 5, 2019 10:49
-
-
Save rileyz/9cef8a17700a9933c47983630601415e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'SYNOPSIS | |
'Script to execute a application without showing a black (Command Prompt) or blue (PowerShell) | |
'dialog box. Written to handle spaces within the the path and executable name. | |
'LINK | |
'Author:.......https://www.linkedin.com/in/rileylim | |
'Source Code:..https://gist.github.com/rileyz/9cef8a17700a9933c47983630601415e | |
'# Setting up housekeeping for variables ########################################################### | |
'Set the executable name below. | |
ExecutableName = "NameOfApplication.exe" | |
'#<<< End of Setting up housekeeping >>> | |
'# Start of script work ############################################################################ | |
CurrentDirectory = CreateObject("Scripting.FileSystemObject").GetParentFolderName(WScript.ScriptFullName) | |
ExecuteNow = chr(34) & CurrentDirectory & "\" & ExecutableName & chr(34) | |
CreateObject("WScript.Shell").Run ExecuteNow | |
'<<< End of script work >>> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment