Microsoft KB Archive/94309

= Unable to Share Printer when SUBST Is Used for TEMP Directory =

Article ID: 94309

Article Last Modified on 10/14/2003

-

APPLIES TO


 * Microsoft Windows for Workgroups 3.1
 * Microsoft Windows for Workgroups 3.11

-



This article was previously published under Q94309



SYMPTOMS
The following error message appears if a Windows for Workgroups server is attempting to share a printer in Print Manager and the TEMP directory is set to a drive that was created using the MS-DOS SUBST command:

The specified drive letter or device is invalid. If you specified a drive, it may be past the value specified by the LASTDRIVE command in the CONFIG.SYS file.



CAUSE
The SUBST command allows specifying a drive letter for a PATH, which enables easier access to programs and data files. In Windows for Workgroups, these virtual drives cannot be shared, and because the TEMP directory is used during printing, TEMP also cannot be shared.



WORKAROUND
To work around this problem, assign the TEMP variable to a valid (not virtual) directory. For example, if Windows is installed on the local drive C in the WINDOWS directory, add the following line in the AUTOEXEC.BAT file:

SET TEMP=C:\WINDOWS\TEMP (or any other valid directory)



Steps to Reproduce Problem
  Add the following lines to the AUTOEXEC.BAT file: SUBST X: C:\WINDOWS\TEMP SET TEMP=X:  Add the following command to the CONFIG.SYS file if it is not already present:

LASTDRIVE=Z

 Restart the computer and then start Windows for Workgroups. From the Main Group, run Print Manager. Select the printer to be shared. From the Printer menu, choose Share Printer As.</li> Choose the OK button.</li> The above error message appears.</li></ol>

For more information on Windows for Workgroups and the SUBST command, query on the following words in the Microsoft Knowledge Base:

subst and wfwg

Additional query words: 3.10 ms-dos

Keywords: KB94309

-

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

© Microsoft Corporation. All rights reserved.