Start command with special characters (CMD)

Asked

Viewed 1,360 times

2

I am creating a batch file that executes this command:

start jogo.exe user:USUARIO pwd:SENHA

The above command causes a character to automatically enter a given game. The command works perfectly if typed through the Command Prompt itself. But I have to run the same thing constantly during the day...

The problem is: I want to create a batch file that runs this command, but when the pwd:PASSWORD field has some special character like "<,' and ?" prompt says it does not exist with the following message:

El sistema no puede encontrar el Archivo especificado. "'b*5" is not reconditioned as an internal or external command, Program the Archivo by ejecutable batches.

Sorry, the windows of my computer is in Spanish.

I’ve noticed that the problem only occurs when you have a special character like < (minor), > (greater), ' (apostrophe), " quotation marks ("""...

1 answer

5


  1. Delimite the password with double quote.
  2. Double quote exhaust with another double quote

Example for the password a.qui<>_a_s'enha_";)_

pwd:"a.qui<>_a_s'enha_"";)_"
  • thank you, exactly that. It worked!

  • after a few tests, I realized that even with the command you passed, it doesn’t work when the password has the percentage character (%), is there any other way to execute the command? When executing the file . bat which has the %character, I realized that this character simply disappears at the time of execution, causing in incorrect password.

  • sorry, I just found the solution, I just added a double percentage signal, thus making %% https://stackoverflow.com/a/14510117/5429657. Still grateful.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.