Microsoft KB Archive/63969

= Using the AT Command Correctly in an OS/2 Command File =

Article ID: 63969

Article Last Modified on 9/30/2003

-

APPLIES TO


 * Microsoft LAN Manager 2.0 Standard Edition
 * Microsoft LAN Manager 2.1 Standard Edition
 * Microsoft LAN Manager 2.1a
 * Microsoft LAN Manager 2.2 Standard Edition

-



This article was previously published under Q63969



SUMMARY
The AT command should be used only to run programs that do no screen, keyboard, etc. I/O. When the AT command spawns a process, it runs detached in the background.

Unfortunately, when that process is spawned, it will not have a path. Therefore, if anything is run that is not in the \LANMAN\NETPROG subdirectory, or is an internal OS/2 command (such as COPY), a complete path must be specified. For example, the following command can be used:   c:\binp\cp \autoxec.bat \save\autoexec.bat However, if a PATH statement is inserted in OS2INIT.CMD, this PATH statement will be valid while the process is running. This works because OS2INIT.CMD is executed when the new process is spawned.



Example
Suppose you have a command file with the following command in it:   AT 10:10 /every:M,T,W,Th,F&quot;c:\cmd\os2save.cmd&quot; The command file, OS2SAVE.CMD, merely saves files from one subdirectory into another subdirectory. OS2SAVE.CMD contains the following lines:   cp \autoexec.bat \save\autoexec.bat cp \config.sys \save\config.sys Running the command file without the AT command from the OS/2 prompt works properly. However, running the command with the AT command does not work. Changing &quot;cp&quot; to &quot;copy&quot; in OS2SAVE.CMD and using the OS/2 COPY command works properly.

Additional query words: 2.00 2.10 2.0 2.1 2.1a 2.10a 2.20

Keywords: KB63969

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.