Alert "Run a Program" doesn't work

I have created a .bat file that executes a python script when an alert triggers on my GPU Junc temp.
However, the bat file closes before the script runs.
I can see the cmd window pop up every few seconds after the target temperature is reached, but the script doesn't run.

I verified that manually running the .bat file works.
I even added a start /wait to the .bat file, but it still closes as soon as hwinfo triggers it.
 

Martin

HWiNFO Author
Staff member
If the bat file is run by HWiNFO, then there must be some other issue outside of HWiNFO.
Do you maybe use relative paths so that when HWiNFO runs the bat with a different current directory set, the bat can't locate your script? Should be easy to check by inserting checkpoints/debug outputs in the bat to figure out.
 
It was a full system path.
for some reason, if hwinfo launches the .bat file, it doesn't work if I add the python installation environment variable eg:
python "Path\To\File.py"

But launching it via just executing the batch file works no problem.

I was able to solve it by just removing the "python" from batch file.
But from my understanding of cmd and bat, there should be no issue with specifying the python installation first as it's best practice if there's more than one python installation.
So I'm still a bit confused as to root cause, but it works now.
 
Top