I am trying to create a registry key which gets populated with a value if a service is actually running. The keys gets created but the value is not inserted. I plan to use this value to refer to in a larger script which needs to ensure the particular service is running, after all the actions are completed, if it was running before.
Any idea what I am doing wrong?
I have stripped the bit below out of the script to test.
The debugger does not throw an error either??
Createfile until EOF
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\wow6432node\Syntegra\IFM]
“ScangatewayRunning”=dword:00000003
EOF
dos regedit __Createfile
if {exists running service “scangateway”} then regset “HKLM\SOFTWARE\wow6432node\Syntegra\IFM” “ScangatewayRunning”=“1”