msdos bat file

shornesr
shornesr used Ask the Experts™
on
I am trying to boot into old school dos and map a network drive...

I created a batch file with the following command but it does not work.
(GHOST is the server name and COMPUTER-IMAGES is the share name)

net use z: \\ghost\computer-images
I want to boot into DOS and map a drive to that shared folder.
What am I doing wrong?
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®

Commented:
Did you load the network drivers activate the network card in dos and the msclient to map the drive so that it can be accessible?

Here are step by step to create a dos ghost boot disk:

http://service1.symantec.com/SUPPORT/on-technology.nsf/docid/2000062113392125

http://service1.symantec.com/SUPPORT/on-technology.nsf/docid/2000040710064725

Hope this helps.

ou_dober

Commented:
I'm assuming your batch file sets up networking?  Is the share you are trying to get to on a NTFS partition?

You might want to start with one of the several available boot disks out there already, such as this one:

http://netbootdisk.com/about.htm
JohnBusiness Consultant (Owner)
Most Valuable Expert 2012
Expert of the Year 2018

Commented:
Typically, DOS would need some LANMAN.DOS-type statements in config.sys to start up the networking protocols, and then a NET START statement in the autoexec.bat file (or done manually) to start up the network itself. Do you have such statements (related to your own networking)?  

Even then, DOS cannot talk to any host machine. I have mapped to Windows XP Pro and less, but not Vista 64-bit and so I expect some servers would reject the mapping as well.
... Thinkpads_User
11/26 Forrester Webinar: Savings for Enterprise

How can your organization benefit from savings just by replacing your legacy backup solutions with Acronis' #CyberProtection? Join Forrester's Joe Branca and Ryan Davis from Acronis live as they explain how you can too.

Author

Commented:
I get attached to the Windows Server 2003 R2 but ir says I have not validated...
JohnBusiness Consultant (Owner)
Most Valuable Expert 2012
Expert of the Year 2018

Commented:
I am not surprised at all. I guess it depends on how much work you wish to do. DOS is dead. Long, long, long DEAD. It was time to move on in terms of applications over a decade ago. So if you really must make it work, connect it to a workstation running Windows XP and then move whatever data or whatever is the object of your connection from XP to the Server.
 ... Thinkpads_User.

Author

Commented:
How can I do that... Not sure what commands to use in the config.sys and autoexec.bat files...

Can you show a possible example of just those commands? Say that the computer is named "testcomputer".
JohnBusiness Consultant (Owner)
Most Valuable Expert 2012
Expert of the Year 2018

Commented:
You need to get a networking package for your DOS computer (say like Lan Manager) and let us know what it is. The commands you want depend entirely on which networking package. This stuff was not built into any DOS, so you must obtain it and install it. Below is a sample of the kinds of commands you will need.   ... Thinkpads_User

In Config.sys, you need commands like

DEVICE=C:\DOS\HIMEM.SYS
DEVICE=C:\LANMAN.DOS\DRIVERS\DOSUTILS\EMM386.EXE NoEMS
DOS=HIGH,UMB
LASTDRIVE=Z
BUFFERS=30,0
FILES=50
STACKS=9,256
DEVICEHIGH=C:\CDROM\IBMIDECD.SYS /D:IBMCD100  (only if you need a CD drive)
DEVICE=C:\LANMAN.DOS\DRIVERS\PROTMAN\PROTMAN.DOS /i:C:\LANMAN.DOS
DEVICE=C:\LANMAN.DOS\DRIVERS\ETHERNET\PCNTND\PCNTND.DOS
DEVICE=C:\LANMAN.DOS\DRIVERS\PROTOCOL\tcpip\tcpdrv.dos /i:C:\LANMAN.DOS
DEVICE=C:\LANMAN.DOS\DRIVERS\PROTOCOL\tcpip\nemm.dos


In Autoexec.bat, you need commands like:

LH c:\cdrom\mscdex /d:ibmcd100 /m:10  (if you need a CD Drive)
C:\DOS\MOUSE.COM
C:\Dosidle\Dosidle    (optional)

@REM ==== LANMAN 2.2a == DO NOT MODIFY BETWEEN THESE LINES == LANMAN 2.2a ====
SET PATH=C:\LANMAN.DOS\NETPROG;%PATH%
rem C:\LANMAN.DOS\DRIVERS\PROTOCOL\tcpip\umb.com
rem NET START WORKSTATION
rem LOAD MSDLC
rem LOAD TCPIP
rem LOAD NETBEUI
rem NET LOGON  *
@REM ==== LANMAN 2.2a == DO NOT MODIFY BETWEEN THESE LINES == LANMAN 2.2a ====

Author

Commented:
Here is what I have so far...
********************************************************************
AUTOEXEC.BAT

;@echo off
mscdex /d:Micron /m:10
call mouse.bat

SET TZ=GHO+06:00
SET PATH=\NET\;\;%PATH%;
SET TEMP=\
SET TCPHELP=\NET
SET ETCDIR=\NET
SET DOMAIN=HORNEDOMAIN

\NET\NET START
\net\net.exe
\NET\NET.EXE USE G: \\horne\shared
CD \GHOST
GHOST.EXE

***************************************************************************
CONFIG.SYS

lastdrive=z
device=HIMEM.SYS /testmem:off
device=emm386.exe noems
dos=high,umb
files=60
buffers=30
stacks=9,256
DEVICEHIGH=\NET\PROTMAN.DOS /i:\NET
DEVICEHIGH=\NET\e1000.dos
DEVICEHIGH=\NET\DLSHELP.SYS
DEVICEHIGH=\NET\DIS_PKT.DOS
devicehigh=cdrom\oakcdrom.sys /d:Micron
set cdrom=Micron

SET ENDFLAG=1

************************************************************************
Business Consultant (Owner)
Most Valuable Expert 2012
Expert of the Year 2018
Commented:
I do not have or use what you are using, so I probably cannot help you much more.

First, when you get your DOS machine going as per the post above, can you PING the target machine? That is, is there a physical connection?

Second, once that is sorted out, the userid and password for the DOS machine (likely in a password file) must be the same as for the target machine. DOS has no concept of authentication.

... Thinkpads_User

Author

Commented:
Thinkpads_User...

You've actually been very helpful. Thank You!
JohnBusiness Consultant (Owner)
Most Valuable Expert 2012
Expert of the Year 2018

Commented:
Thank you and good luck to you. ... Thinkpads_User

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial