| 1. |
Solve : set command doesn't work with if as it says on the explanation? |
|
Answer» In the explanation of the set command in the cmd it says to write a program like this: it doesn't recognize the value of the !var! , why is that? TRY reading the entire help blurb, especially the part about delayed environment variable expansion. Quote from: kyou8 on April 26, 2011, 04:32:32 AM another question, can i set a permanent variable that won't disapear after i close cmd, like windir,cd,errorlevel and such... Not thru batch code. You can USE any Windows Script language or use the GUI by RIGHT clicking on My Computer==>Properties==>Advanced==>Environmental Variables. By the way, cd, errorlevel, and such are context DRIVEN and do not have permanent values. Windir was set when the OS was installed, why do you want to change it? Quote from: kyou8 on April 26, 2011, 04:32:32 AM another question, can i set a permanent variable that won't disapear after i close cmd yes, use SETX. |
|