Dagimp
April 10th, 2008, 01:57 PM
I've just started using this. Basically I'm trying to map network printers based upon department. All of my PC's are named by dept. For example accounting could be ACCT01, ACCT02 and so on.
So using kixtart I should be able to script out auto installation of the printer. The problem is my users move around to different departments and when they login nothing is setup for them.
If I can get this nailed down then it will be the last piece in the puzzle so EVERYTHING will be setup for them on any PC.
I'm using a centralized login script, tho not being handed out by the domain.
I took turbo Pascal and C++ in college but that was years ago and my only programing experience. I'm pretty handy with batch files tho.
So I think my sytax here is all fooked up.
--Begin KiX script--
;* Add printer by computer name
;* "- Deleting any printers present - "
;* $printer = DelTree("HKEY_CURRENT_USER\Printers\connections")
"- Setup printer for Office 01 - "
if instr("%computername%","LAPTOP")
if AddPrinterConnection("\\PrintServer01\PRINTER01") = 0
"Done"
$printer = SetDefaultPrinter("\\PrintServer01\PRINTER01")
Endif
else
"No Printer"
endif
?
--End KiX script--
Reading the manual right now, but I really dont want to learn the whole damn scripting of kixtart just for this simple task.
So using kixtart I should be able to script out auto installation of the printer. The problem is my users move around to different departments and when they login nothing is setup for them.
If I can get this nailed down then it will be the last piece in the puzzle so EVERYTHING will be setup for them on any PC.
I'm using a centralized login script, tho not being handed out by the domain.
I took turbo Pascal and C++ in college but that was years ago and my only programing experience. I'm pretty handy with batch files tho.
So I think my sytax here is all fooked up.
--Begin KiX script--
;* Add printer by computer name
;* "- Deleting any printers present - "
;* $printer = DelTree("HKEY_CURRENT_USER\Printers\connections")
"- Setup printer for Office 01 - "
if instr("%computername%","LAPTOP")
if AddPrinterConnection("\\PrintServer01\PRINTER01") = 0
"Done"
$printer = SetDefaultPrinter("\\PrintServer01\PRINTER01")
Endif
else
"No Printer"
endif
?
--End KiX script--
Reading the manual right now, but I really dont want to learn the whole damn scripting of kixtart just for this simple task.