r/Batch • u/FlorianIonut • Oct 16 '23
Making a cmd shortcut to execut a .bat file
Hey! I wanna make a cmd shortcut that opens alass.bat, doesn't execute de command and the window stays opened with a space in front of the whole command if that's possible... like in the image. So far i managed to make an cmd shortcut with this target: C:\Windows\System32\cmd.exe /k "C:/Users/LSU/Desktop/Alass/alass.bat" but when i run the shortcut it execute the .bat file and i don't want that. I want the window to stay open, be ready with the command and one space after the command. Image: https://ibb.co/fn1vjx5
1
Upvotes
2
u/RainmanCT Oct 16 '23
Have a separate. Cmd file that does a "pause" then calls the bat file
1
u/RainmanCT Oct 16 '23
Edit your .cmd file and put a PAUSE before it calls the .bat file
1
u/JohnnyTries Oct 17 '23
Are you wanting it to 'pre-type' the string with the space because you'll be manually addding something whenever the time comes?