Reputation: 157
Hi can someone pls help me to run powershell from vbscript as a administrator
MyPath = "c:\temp\folder1" Dim objShell Set objShell = CreateObject("Wscript.Shell") objShell.run("powershell.exe -noexit -file C:\temp\power.ps1 " & MyPath)
C:\temp\psfile.exe $args[0] -c
Upvotes: 1
Views: 2238
Reputation: 38755
In VBScript Set
is used for objects; so change
set input ="C:\temp\folder1\"
to
input = "C:\temp\folder1\"
Upvotes: 0