Microsoft Utilities and invoking an elevated command prompt

k.norberg97

Prominent
Sep 18, 2017
19
0
510
Hi all,

I've been working on smart home integration and I've run into an issue. I would like to put my computer into sleep mode using my Google Home, and I use IFTTT to push a note to my Pushbullet account, which a program running on my computer listens for, and once it detects it, it invokes a batch file.

Problem #1 I had was that Windows 10 does not have a command line utility for sleep mode, only shutdown and hibernate. So, I installed the psshutdown utility from Microsoft and put all the files in my System32 folder.

Problem #2 that I still have, is I am able to use the commands if I directly invoke them from within command prompt, manually run a batch file with the command, or manually run a shortcut with the commands. BUT, if I give a program (that listens for the note from Pushbullet) administrative access, and set the batch files and shortcut to "run as administrator" and let the program invoke the batch file or the shortcut, I get "psshutdown.exe is not recognized as an internal or external command, operable program, or batch file" or sometimes I get "Access Denied".

I have tried changing directory in the batch file to my System32 and checked my Environment variables.

Any ideas? I have spent hours on this and can't figure it out for the life of me.