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

Popular posts from this blog

html - Firefox flex bug applied to buttons? -

html - Missing border-right in select on Firefox -

python - build a suggestions list using fuzzywuzzy -