Is there a command/string of characters that can be set to have a batch file use a shortcut that uses the Windows Start Key?

Darkmatterx

Distinguished
Apr 8, 2003
552
6
19,015
Hi, I want to set one of my MS Erg 4000 keyboards 5 custom shortcut keys to put my computer to sleep. The old boards used to have an actual sleep key but the one I have doesn't. The custom shortcuts only allow you to put in a location, such as a location of a file. I haven't been able to find a way to use a shortcut in a batch file that uses the "Start" key. Does anyone know if this is even possible?

Thanks.
 

Colif

Win 11 Master
Moderator

Darkmatterx

Distinguished
Apr 8, 2003
552
6
19,015
Since my custom shortcut buttons needs a file it can run I found a program called before you posted Sleep.exe. Sorry about not updating my post or deleting it. I was still curious as to if a txt file can invoke the win key.

There are some good reviews from users of the program from what I read. Alsoit's been up on Github for a year I think. The program itself works perfectly. Computer is "lights out" and entering sleep mode very fast.

Thanks for looking into this for me though. I appreciate it.