- Messages
- 301
I have a gadget that has buttons for hibernate and standby to run a shortcut. If I run the short cut directly by clicking it, it works, but if I try to run it from the html button, it will not acknowledge the run as administrator setting. I have tried it with VBScript and cannot change the powercfg - h state.
Here is the html:
Here is the shortcut:
Here is the VBScript:
Here is the html:
HTML:
<a id="hibernate" onMouseOver='ShowTip(1,"Hibernate");' onMouseOut='HideTip(1);' href="../core/Hibernate.lnk" >
<img src="../images/Hibernate.png" border="0" width="20" height="20" >
<span id='tooltip1' class='tooltip'></span>
</a>
Here is the shortcut:
Code:
C:\Windows\System32\cmd.exe /c powercfg -h on & rundll32.exe powrprof.dll,SetSuspendState 0,1,0
Here is the VBScript:
Code:
Set WshShell = WScript.CreateObject("WScript.Shell")
WshShell.Run "%COMSPEC% /c POWERCFG /Hibernate ON"
WshShell.Run "rundll32.exe PowrProf.dll SetSuspendState Hibernate"
My Computer
System One
-
- OS
- Windows 8 Pro
- System Manufacturer/Model
- Dell Inspiron 1750
- CPU
- Duo Core 2.5 G HZ