JPamplin Posted April 25, 2004 Author Posted April 25, 2004 OK, after a bit more searching, I've come across exactly what we're looking for in a 1K freeware DOS utility - INPUT.COM by Horst Schaefferhttp://home.mnet-online.de/horst.muc/You'll find INPUT.COM in the PBAT sction on the left. The syntax is painfully simple:INPUT "Enter phrase here: " variablenameWill prompt the user to enter any alphanumeric string (words, spaces, etc.) and will save it in variablename after pressing enter. Sheesh, and I thought I was coming up with something new. Folks, this will solve your input problems. But at least Adam got some good code out of it. Ignore my CHOICE code, I am going to use INPUT from now on.Sigh,JP
ZoSTeR Posted April 26, 2004 Posted April 26, 2004 Hmm why don't you use the /p switch of the set command?set /P disksize="Please enter the desired size of C: in MB: "
RayOK Posted April 26, 2004 Posted April 26, 2004 getvar does the exact same thing as input.com.. haven't compared the two so maybe input.com may be a little smaller and user friendly.I'm pretty sure set /p only works in Windows 2000 and XP with cmd.exe, not in a older, pure DOS environment, with command.com..
JPamplin Posted April 26, 2004 Author Posted April 26, 2004 @Zoster,Thanks, but the SET /P doesn't work in DOS - that's what I was shooting for.@RayOKYes, I think GETVAR is even made by the same guy (I saw it on his website as well), but it's alot larger than INPUT. I'm putting INPUT on a boot floppy with lots of other tools, so size matters.I wonder what the WinME version of COMMAND.com would buy us, in terms of additional features. Anyone know?JP
RayOK Posted April 26, 2004 Posted April 26, 2004 Personally I would scrap MSDOS and use FreeDOS. Free and much more powerful.FreeDOS
Denney Posted April 28, 2004 Posted April 28, 2004 I have a problem with the INPUT.COM program.Here's my current test batch file:@echo offUtilities\INPUT "Enter a new administrator name: " newadminecho %newadmin%pauseNow, when I run this, I get this output:Enter a new administrator name: SomeAdminECHO is off.Press any key to continueas you can see, it's not actually setting the variable. Even if I set the variable beforehand, it just retains it's old value. Can anyone help me with this?Edit: Never mind.. just say this: Note: INPUT does not work under Win NT/2000/XP
JPamplin Posted May 1, 2004 Author Posted May 1, 2004 Folks,You will notice that I've rewritten my original post to include the INPUT.COM user input utility and simplified my script quite a bit.JP
Dj-Throll Posted October 7, 2004 Posted October 7, 2004 Hello.How can I put onto a boot cd ?Please help me.... I'm struggeling.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now