Jump to content

Dos Batch File To Get User Input


Recommended Posts

Soory about the questions.

Just 1 more. Really!!

The command prompt way isn't much different, just adds a tiny amount of extra time. Is this a problem?

My unattended approach means u could get everything done with no rebooting and only removal of floppy once.

If the drive isn't formatted or anything it would mean just 1 reboot and 1 floppy removal.

Slightly more scripting initially but way easier to put ur feet up after.

Kev

Well some extra time shouldn't be any problem since it's all unattended anyway. But does it support NTFS or will I have to convert later on? (just 1 command I know =])

Other than that let's hear it =p

Link to comment
Share on other sites


OK.

(Best Shakespearean voice)..My approach is thus:-

Do a search for ramdrive.sys, strings.com and setparam.exe. Setparam was on NT Res Kit I believe. If not I can send u them.

Setup dos boot disk as normal with a ramdrive of 1 or 2 megs.

U r gonna stick ur unattended file in here. I've found that floppies these days aren't as tough as the old days. 2 much reading and writing mashes them.

Keep a semi-populated unattended file on the floppy which is gonna be copied to the ram drive. Include things like all the necessary labels and stuff but leave out the bits u wanna change.

eg. Mine kinda looks like this.

;SetupMgrTag

;

;Kev da Butcher

[Data]

Autopartition=1

blah

[unattended]

blah

[userData]

ProductID=12345-67890- blah

FullName=

OrgName=

ComputerName=

So basically, any areas that u wanna input urself get left blank.

Then in ur autoexec.bat u call strings.com.

a:\dos\strings.com usrname=ask Type in User Name

This stores the name as a variable which u access by-

a:\dos\setparam %ramdrv%\unattend.txt UserData FullName %usrname%

And u repeat this for any values u want to append.

eg. say u want to add to domain:

a:\dos\strings.com domname=ask Enter Domain Name

a:\dos\setparam %ramdrv%\unattend.txt Identification JoinDomain %domname%

Then of course winnt /u:%ramdrv%\unattend.txt /s:cdrom:\i386

I've used this technique to create massive monster unattends that include different settings for NT, 2K, XP and Server 2K3 using static ip, dhcp, and all the other bits the unattend can control.

Kev

Link to comment
Share on other sites

Thanks! I'll give it a try, looks like might work better then what I have now. One question though:

I already have a ramdisk created when the PC boots from the floppy disk, but when I start the setup it can't file any partition to install to.

c:\ is ramdisk, d:\ is CDROM and the normal NTFS partition(s) is not reachable from the command prompt.

So the setup doesn't know where to install to, I aborted the setup there so it me be that you can still choose a partition but I'm quite sure it wasn't possible.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...