Ok.
It was a little tricky, since GPU-Z requires that any shell cmd.exe using taskkill.exe to stop it have administrator access, and that just causes UAC popups that are really annoying.
So I wrote a little AutoIt app which you can download here:
GPUZKill.zip
Here is the AutoIt code, so you can see what it does:
Code: Select all
#NoTrayIcon
If $CmdLine[0] < 3 Then
Exit
EndIf
$Process = $CmdLine[1]
$Log = $CmdLine[2]
$Command = $CmdLine[3]
While ProcessExists($Process)
ProcessClose($Process)
WEnd
FileDelete ($Log)
ShellExecute($Command)
Exit
Which will do the following:
1) Kill GPU-Z based on the first command line parameter passed to it.
2) Delete the log file based on the second command line parameter passed to it.
3) Start GPU-Z based on the third command line passed to it.
So with this skin code:
Code: Select all
[Rainmeter]
Update=1000
OnRefreshAction=["#@#GPUZKill.exe" "#Process#" "#LogFile#" "#Command#"]
[Variables]
Process=GPU-Z.exe
LogFile=C:\SomePath\GPU-Z Sensor Log.txt
Command=C:\SomePath\GPU-Z.exe
Anytime that skin is loaded or refreshed, Rainmeter will execute GPUZKill.exe in the @Resources folder of your skin, and pass those variables to it on the command line.
GPUZKill.exe will:
Based on the [Variable] #Process#, close that executable in Windows.
Based on the [Variable] #LogFile#, delete that log file.
Based on the [Variable] #Command#, restart GPU-Z.
Be sure you define everything correctly in [Variables]. In particular, if you run GPU-Z in "stand-alone" mode, (its "sorta portable" mode) the process and executable name will be something like GPU-Z.0.8.1.exe, not just GPU-Z.exe.
Let me know if you have any questions.
You do not have the required permissions to view the files attached to this post.