obulldog27
Programmer
My company prints to a remote printer thru dos foxpro. before the program is executed the printer is added using net use. However I get a what is username and then password which i can type in to access our remote lan but i would like to automate this process.
here is the bat file that i have to start foxpro
and i have tried doing echo but does not work
---------------------------------------------------
F:
cd\apps\invprod
net use lpt1: \\serverip\printer sharename
echo <username>
echo <password>
pause
C:\FOXPRO25\FOXPROX MAINMENU
net use lpt1: /delete
CD\C:\WINDOWS
EXIT
--------------------------------
here is the respone i get when clicking the bat file
before foxpro startup
--------------------------------------------
F:\>cd\apps\invprod
F:\Apps\INVPROD>net use lpt1: \\serverip\printername
The password is invalid for \\serverip\printername
Enter the user name for 'serverip': <enter username>
Enter the password for 'serverip': <enter password>
-----------------------------
so basically i want the maching to answer this for me
here is the bat file that i have to start foxpro
and i have tried doing echo but does not work
---------------------------------------------------
F:
cd\apps\invprod
net use lpt1: \\serverip\printer sharename
echo <username>
echo <password>
pause
C:\FOXPRO25\FOXPROX MAINMENU
net use lpt1: /delete
CD\C:\WINDOWS
EXIT
--------------------------------
here is the respone i get when clicking the bat file
before foxpro startup
--------------------------------------------
F:\>cd\apps\invprod
F:\Apps\INVPROD>net use lpt1: \\serverip\printername
The password is invalid for \\serverip\printername
Enter the user name for 'serverip': <enter username>
Enter the password for 'serverip': <enter password>
-----------------------------
so basically i want the maching to answer this for me