• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

DOS question

RU482

Lifer
I am using a program in DOS that programs the serial number into the BIOS of a computer I am working with (long story)

The computer I am working with only has a numeric keypad, no letters. Thus far I have been able to write batch files using numeric digits to run certain tasks. But, for the serial number utility, I need to enter the characters SY. I normally do this using a USB keyboard. I would like to be able to automate this.

Currently, my batch file, named 2.bat, goes like this:

calldmia.exe 1


calldmia.exe is the utility, and one is the option that takes me to a prompt where I enter the serial number data. Is there any way to make the batch file automatically enter the characters SY at the prompt where I enter the serial number?

for instance, I call the batch file...it launches calldmia.exe and picks option 1, then when it gets to the prompt, it automatically enters SY and then I enter the numeric remainder of the serial number using the numeric keypad.

Any ideas?
I know there has to be a DOS guru around here somewhere!!
 
Simply use input redirection e.g.

calldmia.exe < infile.txt

Make infile.txt contain the characters you need inputed (including the crlf). So it might look like this (from your example)

(start of file next line)
1
SY000000
etc
 
Is there an ALT key? ALT 83 ALT 86 = SV

http://www.ka.net/jmenees/Dos/Ansikeycodes.htm

Otherwise, say your batch file is called 1.bat, and the user launches it with 1 serial# suffix

1.bat does something like

@echo off
echo calldmia.exe 2 SV%1 > callit.cmd
callit.cmd
del callit.cmd

Where I conveniently assume that option 2 takes the serial number from the command line. If not, then combine this with input redirection as bsobel wrote.
 
Back
Top