Page 1 of 1

[undocumented]MSG special characters and escaping them

Posted: 2021-Aug-14, 7:48 pm
by MigrationUser
11 Dec 2015 14:51

Some tests I've made over MSG command (aware that you need installed terminal services to make this command available) showed that there are some special characters that cannot be set at the beginning of the message ( / and - ):

Code: Select all

msg "%username%" "--#"
msg "%username%" "//#"
both lines will print the help message .

They can be esacped with \ (only the first appearance need to be escaped):

Code: Select all

msg "%username%" "\--#"
msg "%username%" "\//#"

it can be used also to put as message with quotes in :

Code: Select all

msg "%username%" "\"message with quotes\""
I havent found other special sequences that can be used with \

Max length of the symbols in the message is 255

Last edited by npocmaka (11 Dec 2015 15:11)


#2 11 Dec 2015 23:41
Simon Sheppard

I've updated with this

Thanks npocmaka