Using wntAddDrive versus w95AddDrive Functions
Keywords: wntAddDrive w95AddDrive
Question:
I am using a similar script for NT and 95, but am using the appropriate extenders for each platform. The NT script works, but the 95 does not. What gives?Here is sample code I am using for NT that works:
******************************************* wntAddDrive("Guest","","\\ISD_DB\SYS",@NONE,@FALSE) RunZoomWait("\\ISD_DEV\VOL1\apps\view31\views.exe", "\\ISD_DEV\VOL1\isddocs\folio\nfo\main.nfo") wntCancelCon("\\ISD_DB\SYS",@TRUE,@TRUE) ********************************************This Win95 code does not work:********************************************* w95AddDrive("Guest","","\\ISD_DB\SYS",@NONE,@FALSE) RunZoomWait("\\ISD_DEV\VOL1\apps\view31\views.exe", "\\ISD_DEV\VOL1\isddocs\folio\nfo\main.nfo") w95CancelCon("\\ISD_DB\SYS",@TRUE,@TRUE)Answer:
Your error is on w95AddDrive. You are trying to log in as Guest. I think this is a no-no on Win95.You might try changing GUEST to @DEFAULT and log in as the current user....
This is NOT a limitation of WinBatch but of Windows 95. Unlike NT, Win95 will NOT let you logon as a different user or as Guest. You also can only logon ONCE to the system and that's it.
Tip:
When w95AddDrive tries to use @default, we just instruct windows to use the current default. Apparently sometimes it is not set yet. So sometimes, if you try to connect to a Novell volume, the w95AddDrive does not pass the @default user ID reliably, even if the user ID is synchronized on the PC. To counteract this, get the user ID from the w95UserInfo(0) function and pass that in a variable to w95AddDrive.
Article ID: W13556Filename: w95AddDrive versus wNTAddDrive.txt