excel vba - VBA run shell command with admin privileges -
i need run "powercfg -hibernate off" admin privileges in order able put computer sleep (instead of hibernate). feasible? if so, how can it?
function dosleep() shell "powercfg -hibernate off" #this needs admin privileges shell "c:\windows\system32\rundll32.exe powrprof.dll,setsuspendstate 0,1,0" shell "powercfg -hibernate on" #this needs admin privileges end function
Comments
Post a Comment