Command using Background Service
-
I just tested the foreground commands and they don't work either
-
@Forbidden-Duck
I've fixed the foreground commands, I just had to make a bat file which changed the directory to Windows\System32 and it worked. However, I'm having issues with sleep mode. I made the bat file for it, if I run it as Admin it works fine, however it doesn't work with the background service and just having the plain command in the background command doesn't work either. I don't know why. -
@Russ Are you able to help?
-
@Forbidden-Duck, what command are you using to put your computer to sleep? I just tested this command as a background command on my Windows 10 PC and it worked - it put my PC to sleep.
d:\tools\psshutdown.exe /d /t 1
-
@Russ I'm using the same command, however it just won't work.
psshutdown -d -t 10
-
@Forbidden-Duck, I notice your command didn't specify a folder, so do you have the psshutdown.exe downloaded to a folder in your PATH variable? Instead of using the PATH variable you could also specify the folder in your command like I did.
Psshutdown.exe doesn't come with Windows but you can download it from here.
-
@Russ I have psshutdown installed already. It worked fine until recently where it just stopped same with the foreground commands. I changed the foreground commands to batch files and they work fine now it's just the psshutdown fails to work. I changed the command to specify the PATH and it still doesn't work.
-
@Forbidden-Duck, some things to try or confirm:
Do you see "Command ran" in the Runs list for that command? If not, please try uninstalling the background service and re-installing it after a reboot.
Please confirm other background commands work, it's just this one that doesn't.
Try logging the output of the command like this:
"...psshudown.exe >> c:\folder\log.txt"Sorry for the trouble. I know we can make this work tho.
-
@Russ Appears it decided to start working again. I hadn't done anything and the other day I tested it and it worked. I'm unsure what was stopping it from working but it seems good for now.
-
@Forbidden-Duck, that's good. I hope it stays working.