|
|
|||||||
Instead of move a printer (wich i found on these forums) i'm looking for a script to add a new printer includes the driver. Also with possibility to configure the settings. Can anyone help me ? I looked everywhere, but even in the usermanuel i can't find the solution. ps. i want to add this script for my RIS installation (unattended for winXP) |
||||||||
|
|
|||||||
add printer? is it local printer? if yes, it is installed automatically, no? if not, use addprinterconnection() as descriped in manual. |
||||||||
|
|
|||||||
It is a networkprinter. If i use addprinterconnection() how can i link it to his IP ? |
||||||||
|
|
|||||||
you are not using printer server but directly connecting to the printers port? |
||||||||
|
|
|||||||
Hi JohnLennon and welcome to korg, Not sure if this is what you are looking for but maybe it’s a start. For these functions to work you must have the printer drivers already installed. Code:
|
||||||||
|
|
|||||||
benny, your udf's are just wscript versions of the inbuilt kixtart functions and nobody should use them for anything but testing because of the extra overheat, right? but if he is talking about IP printer, he can use instead of the addprinterconnection() this udf by Allen: http://www.kixtart.org/UDF/UDF_lister.php?what=post&code=83350 |
||||||||
|
|
|||||||
JohnLennon, Jooel will be a much better guide for you and will be able to give you better advice. |
||||||||
|
|
|||||||
Jooel, if i look at the script (from Allen) i see the green text, but what must i change to config it to my personal settings ? This line: $=WriteValue($IPPrinterKey,"IPAddress","$Port","REG_SZ") or: ; IPAddress (xxx.xxx.xxx.xxx) |
||||||||
|
|
|||||||
it's udf and what you need to do is place the whole code somewhere in your script file. normally it's right at the end. then you use it like any kixtart's internal function. the examples section in the green... the first line probably is the way you are wanting to do it. benny, sorry if I depressed your helping will... |
||||||||
|
|
|||||||
na, you da man! |
||||||||
|
|
|||||||
The lines after the ";" symbol doesn't count ? |
||||||||
|
|
|||||||
; is a single line comment symbol. so each line starting with it (they are colored green in the post) are informatic comments. |
||||||||
|
|
|||||||
o.k. so it doesn't matter if i delete those lines |
||||||||
|
|
|||||||
well, basically not. but you should not. if you place the whole code right after your script, at the very end, they are not bothering you at all but they do inform you about the usability and such of the UDF. so, for your own good, you should just simply copy everything from the first line that says: ;function to the very last: endfunction just as it is into your script file. unmodified and 100% functional, tested and proved code. |
||||||||
|
|
|||||||
Or just paste the entire UDF code into a separate file, save the file in the same dir your script is or create a functions dir inside the dir your script is in (I prefer the second option) and call the function once at the beginning of your script. This way they are not in your primary script and can still be used but they just don't make your script that long. This way you will also get a nice clean separation between your code and code somebody else wrote. Code:
or Code:
|