PRTG Notification bat file

Can you provide some more details on how you are executing this bat? Script source? PRTG screenshot config?

Try logging steps in your bat by outputting to a text file so you can see what's going on.

I've had a similar issue with a EXEXML sensor bat that should start an exe to retrieve temperatures and fan rpm from SpeedFan. And this exe would not run properly, no matter how I tried. The exe I was running was a small command line program that would read values from SpeedFan's shared memory. And the exe could NEVER get access to SpeedFan's shared memory, and would report that SpeedFan was not running.

I spent a whole week troubleshooting this, and tried maybe 20-30 different variants of launching the exe. All kinds of combinations, nesting the launch commands into other commands. And nesting nested launch command into nested launch commands. Well you get the idea.

  • CMD /C
  • START
  • hstart.exe
  • psexec
  • hstart.exe psexec

I even tried all kinds of variants of this as well

  • START CMD /C psexec
  • psexec CMD /C START

... and this went on forever, trying to figure out a way to "trick" the system into launching the exe on the same base as a regular user

Running the bat manually in a cmd would work perfectly. It was ONLY when launching it through PRTG I would get this problem. It seems like PRTG is launching it's scripts/exe in a "restricted" environment that doesn't give it full access to the system (I don't know a better way to describe it). I thought it might be because it needed to interact with the desktop, that's why I also tested psexec -i ... but it didn't help. I also tried elevated token. No help there either. Even tried using psexec to run it as System account. I tried everything imaginable.

In the end I had to give up.

/r/prtg Thread