How USERIDMGREX.EXE works is not clear from the question. If it is a program that displays it's own prompt and waits for the user to type an input then it may be possible to redirect standard input from a file. This is most easily demonstrated with the command processor itself and a text file containing one command per line.
e.g. commands.txt
echo Display system time and date
time /t
date /t
At a command prompt we can issue the command
e:>cmd < commands.txt
and see the output
e:> cmd < commands.txt
Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.
e:>echo Displaying time and date
Displaying time and date
e:>time /t
10:55
e:>date /t
11/11/2011
USERIDMGREX.EXE may respond to redirected input in the same manner
e.g. commands.txt
dumpids
delid TMOODLEY
and
USERIDMGREX awd.ini < commands.txt
Alan.