[wpkg-users] SOLVED: Migrating printer ports to different subnet

ejs ejs at seniejitrakai.net
Wed Oct 20 15:50:07 CEST 2010


Here is the package:

<package
     id="updateprintservers"
     name="Update print servers to 158. subnet"
     revision="ą"
     reboot="false"
     priority="0">

     <variable name="old_subnet" value="192.168.3" />
	<variable name="new_subnet" value="192.168.4" />
	
	<variable name="updatefile" value="psupdated.%COMPUTERNAME%" />
	
     <check type="file" condition="exists" 
path="%SYSTEMDRIVE%\%updatefile%"/>

     <install cmd='%COMSPEC% /C copy /y 
%SOFTWARE%\WindowsSettings\zero.txt %SYSTEMDRIVE%\%updatefile%'/>
	<install cmd='%COMSPEC% /C cscript 
%SOFTWARE%\WindowsSettings\chprinterport.vbs %old_subnet% %new_subnet%'/>

     <remove cmd='%COMSPEC% /C del %SYSTEMDRIVE%\%updatefile%'/>

     <upgrade cmd='%COMSPEC% /C cscript 
%SOFTWARE%\WindowsSettings\chprinterport.vbs %old_subnet% %new_subnet%'/>

   </package>


zero.txt - just an empty file on the share;

I've tested it today on site. The only problem is it can not change 
print server's port ir there are pending jobs to the selected printer. 
This conditions shoul never happen when running WPKG at startup.
-- 
ejs



More information about the wpkg-users mailing list