Associate
Firstly I apoloise for this thread I will try to make as simple to understand as possible.I have written a dos based script with a number of options, this allows the use of R Client to perform various functions via use of batch files copies of which are on the users home directory.
What I want to do is to be able to to write a command that on launch will ask me first workstation I want to choose and then what printer I want to redirect it to from its original default.
This is how far I have got
@Echo off
cls
set ssss=%STORENUM%
echo -- Printer Redirect --
echo.
echo This BOW is currently pointing to: %PRINTERNAME%
echo.
echo.
echo Options:
echo.
echo 1. Redirect to Printer 1
echo 2. Redirect to Printer 2
echo 3. Redirect to Printer 3 (not in all stores)
echo -
for /f %%a in ('c:\temp\ask.exe') do set prtoption=%%a
if %prtoption%==1 c:\temp\setx PRINTERNAME \\WWS%ssss%BDC01\WWS%ssss%PRT0%prtoption%
if %prtoption%==2 c:\temp\setx PRINTERNAME \\WWS%ssss%BDC01\WWS%ssss%PRT0%prtoption%
if %prtoption%==3 c:\temp\setx PRINTERNAME \\WWS%ssss%BDC01\WWS%ssss%PRT0%prtoption%
echo.
echo Now directed to: %PRINTERNAME%
pause
the problem is that even though the command changes the printer variables to the correct printer, for example if I wanted pritner 2 to be the printer I wanted a workstation to be re directed to. It will not physicaly change the register to make the workstation redirect the jobs unless I dial into it and go into the enviromental settings and change them manualy.
Is there a way round this if you can help I would appreciate it and hope that you can follow my method?
What I want to do is to be able to to write a command that on launch will ask me first workstation I want to choose and then what printer I want to redirect it to from its original default.
This is how far I have got
@Echo off
cls
set ssss=%STORENUM%
echo -- Printer Redirect --
echo.
echo This BOW is currently pointing to: %PRINTERNAME%
echo.
echo.
echo Options:
echo.
echo 1. Redirect to Printer 1
echo 2. Redirect to Printer 2
echo 3. Redirect to Printer 3 (not in all stores)
echo -
for /f %%a in ('c:\temp\ask.exe') do set prtoption=%%a
if %prtoption%==1 c:\temp\setx PRINTERNAME \\WWS%ssss%BDC01\WWS%ssss%PRT0%prtoption%
if %prtoption%==2 c:\temp\setx PRINTERNAME \\WWS%ssss%BDC01\WWS%ssss%PRT0%prtoption%
if %prtoption%==3 c:\temp\setx PRINTERNAME \\WWS%ssss%BDC01\WWS%ssss%PRT0%prtoption%
echo.
echo Now directed to: %PRINTERNAME%
pause
the problem is that even though the command changes the printer variables to the correct printer, for example if I wanted pritner 2 to be the printer I wanted a workstation to be re directed to. It will not physicaly change the register to make the workstation redirect the jobs unless I dial into it and go into the enviromental settings and change them manualy.
Is there a way round this if you can help I would appreciate it and hope that you can follow my method?