How to launch batch file?

so I created a batch file, but when I add to keyword to keebreeze .. and hit ok to set it.. and use the shortcut.. the dos window appears the disappears right away and nothing happens.. yet when I launch the .bat file normally it performs its actions how it should. 

 

What am I doing wrong?


2 comments.




Andrew Langford   6 years ago

Try adding the /k switch to your target. That will force the command prompt window to stay open after it runs.

For example, if your batch file was located at C:\test.bat, your target would be the following:

c:\windows\system32\cmd.exe /k C:\test.bat

Vegeta   6 years ago

Edit: Got it.... damn I'm retarded.. I just had to add exit at the end of the batch script.  Also how did you figure out what /k did?  I can't find any info on that on Keybreeze, or what other target commands there could be.

 

Ok so I used the /k switch.. it kept the window open like you said.. however in my batch file I am making use of "for" Here is the batch script I'm trying to use currently.

 

for /D %%f in ("%temp%*") do rmdir %%f /s /q

 

so in this case /q bypasses confirmation requests.. and it normally closes after I run the batch file, however in this case it leaves it open cuz of /k (I'm assuming). I'm trying to replicate it so it opens the batch file performs the actions and closes cmd out automatically. Like when running the batch file normally it opens, does its actions, then closes out, but through Keybreeze it remains open after it's done.