Skip navigation

JSI Tip 3197. The command processor on your various O/S clients may react differently?


When writing a logon script, remember that the script is processed by the command processor that is native to the O/S that your client uses to log on.

Windows NT and Windows 2000 clients process the logon script using CMD.exe, while other clients generally use Command.com.

You should alway script with commands that can be processed by the least capable command processor on your network, unless you specifcally test:

if "%OS%"=="Windows_NT" goto WINNT
REM W9x, DOS, WFW, etc...

goto common
:WINNT
REM Windows NT and Windows 2000


:common
You should be specially careful when dealing with space characters in Long File Names. If you are creating a new folder, the proper syntax is:

md "This is a Directory"

If you forget the quotation marks, Windows 95 generates an error, Too many parameters - is, while Windows NT and Windows 2000 creates 4 separate folders, like:

   C:\This
   C:\is
   C:\a
   C:\Directory


Hide comments

Comments

  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
Publish