Runas or whatelse?

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
einstein1969
Expert
Posts: 976
Joined: 15 Jun 2012 13:16
Location: Italy, Rome

Runas or whatelse?

#1 Post by einstein1969 » 17 Jun 2014 12:54

Hi,

What is the best method for run this how administrator?

CPU_temperature.hta

Code: Select all

<html>
<head>
<script language=vbscript>
resizeTo 200,100
Set WMI=GetObject("winmgmts:\\.\root\WMI")
Sub window_onload

For Each oItem In WMI.ExecQuery("SELECT * FROM MSAcpi_ThermalZoneTemperature")
t=(oItem.CurrentTemperature - 2732) / 10
d1.innerText=t
d2.style.width=t
If t>90 Then
d2.style.backgroundColor="red"
ElseIf t>80 Then
d2.style.backgroundColor="orangered"
ElseIf t>70 Then
d2.style.backgroundColor="orange"
ElseIf t>60 Then
d2.style.backgroundColor="yellow"
Else
d2.style.backgroundColor="blue"
End If
document.title=t & String(t/10-5,"þ")
setTimeout "window_onload",10000
Next
End Sub
</script>
</head>
<body>
<table border=0>
<tr>
<td id=d1></td><td><div id=d2 style="background-color: red; width: 142px; font-size:10px;">&nbsp;</div></td>
</tr>
</table>
</body>
</html>


and...

it is possible to include in a Cmd with chimera? How to do?


einstein1969

einstein1969
Expert
Posts: 976
Joined: 15 Jun 2012 13:16
Location: Italy, Rome

Re: Runas or whatelse?

#2 Post by einstein1969 » 17 Jun 2014 13:13

For completeness and sharing this run under powershell:

Code: Select all

powershell start-process -verb runas mshta 'E:\x264\provini\CPUterm.hta'


einstein1969

Post Reply