VBS run commands as Admin

Hewlett-packard / Sd2100
March 8, 2010 at 20:20:48
Specs: Windows 7, 1024
heres a sample script i wrote


sub defrag
Dim objShell
Set objShell = CreateObject("WScript.Shell")
objShell.Run "%comspec% /k c:\Windows\system32\defrag.exe c:"
WScript.Quit
End Sub

this opens a defrag CMD windows but needs admin rights how do i go about doing that ?

thank you


See More: VBS run commands as Admin

Report •


#1
Report •
Related Solutions


Ask Question