FIM ScriptBox Item
Summary
If you you want to run a PowerShell script by just double-clicking it, you can do this calling the PowerShell script from a VBScript. The VBScript code below shows an example for this.
To use the VBScript, save the VBS file in the folder where your PowerShell script is assign the name of your PowerShell script to the VBScript (with a .vbs extension) .
Script Code
Option
Explicit
Dim
oShell, appCmd
Set
oShell = CreateObject(
"WScript.Shell"
)
appCmd =
"powershell -noexit &'"
& Replace(WScript.ScriptFullName,
".vbs"
,
".ps1"
) &
"'"
oShell.Run appCmd, 4, false