|
|
|||||||
Hi, I am very new to Kix scripts and just wondered if it was possible to have a script that can run on logon and check what printers are mapped on the PC and then export that information to a text file? Any help would be greatly appreciated. Many Thanks, Ben |
||||||||
|
|
|||||||
There is PrinterList, EnumPrinterConnections and EnumPrinterConnections2 in the UDF library. Would they be of any help? |
||||||||
|
|
|||||||
Sounds promising. As I am new to this site could you point me in the right direction please? |
||||||||
|
|
|||||||
http://www.kixtart.org/ubbthreads/ubbthreads.php?Cat=0 Click "UDF Library" Click "Search" (on top) Type in some search words and change options if needed Click "Submit" |
||||||||
|
|
|||||||
Thanks for that, much appreciated. Does this one: http://www.kixtart.org/ubbthreads/showfl...true#Post137527 Export the results to a text file anywhere? Sorry if its a stupid question or obvious answer |
||||||||
|
|
|||||||
no, udf's are user defined functions. they work just as kixtart functions (at least theoretically)... as example, open() is a function. it does not export anything to file, it just opens the file. same goes with that udf. it returns you the list of printers and if you want to place the data to a file, write couple of lines of script with open(), writeline() and close() to do the actual exporting. |
||||||||
|
|
|||||||
OK thanks for the info. I will post a new topic asking how to create, open, import the variable details and close a text file as I dont want this one to go off topice. Many thanks for your help |
||||||||
|
|
|||||||
Code:
|
||||||||
|
|
|||||||
Cool thanks for the code. I ran that and it just created an empty text file yet I have 2 mapped network printers. Any ideas? I do appreciate all your help with this. |
||||||||
|
|
|||||||
Did you copy/paste the UDF into the test script? |
||||||||
|
|
|||||||
You could also include the UDF and store it in a different file Code:
|
||||||||
|
|
|||||||
I was being a muppet and forgot to link in the UDF bit. Works like a treat now - thank you VERY much for all your help! |
||||||||
|
|
|||||||
One last and very cheeky question, is there a way to make the exported text file the same name as the PC name? ie PC Name = ID1234 would create ID1234.txt ???? |
||||||||
|
|
|||||||
yes, use the @wksta macro. |