Quote:

Rad,

What is wrong with the following? Most often when printers move is because you bring up a print server and you have to move 84 printers from one server to another..

Prevent special printers from being deleted

PriMapState() - Checks for existent printerconnection

Thanks,

Kent




well, it does word to detect a specific printer... I suppose if I called it from another UDF it would give me the same functionality.

All that aside I bet it is probably faster than WMI...

function replaceprinter($old, $new, $force)
$PMS = primapstate($old)
if $pms
$_=addprinterconnection($new)
if @error exit 1 endif
$_=delprinterconnection($old)
if $pms = 2 or $force
$_ = setdefaultprinter($new)
endif
endif
endfunction

or something to that effect
_________________________
How to ask questions the smart way <-----------> Before you ask