|
|
|||||||
Hello Together, I would like log with KIXTART installed local - and network printers. Can someone help me? THANKS |
||||||||
|
|
|||||||
Hello and Welcome to the board. Please take the time to read some of the FAQs and look in the UDF forum for code to do as you ask. I will move this post to the STARTERS forum as the SCRIPTS forum is for discussion of code. |
||||||||
|
|
|||||||
Have a look at PrinterList() - Creates an Array/List of Printers |
||||||||
|
|
|||||||
As an answer to your question here two examples. The first writes to the screen the second writes to a file on c:\ Code:
|
||||||||
|
|
|||||||
Wow, Thanks for your help. I test this Script exactly. |
||||||||
|
|
|||||||
I'm getting this error when trying the script ... (kix 4.53) I'm using windows XP and haven't installed anything of WMI, but isn't that included in windows XP ? ERROR : Error in expression: this type of array not supported in expressions.! Script: C:\kix\test.kix Line : 39 Line 39 includes : $PrinterList=$printerdesc |
||||||||
|
|
|||||||
Dear pvanwelt Could you start your own thread to ask a new question? I think you do not equal the PrinterList() UDF to something Code: Break On Dim $arrPrinterList, $strPrinter $arrPrinterList = PrinterList() For Each $strPrinter in $arrPrinterList ? $strPrinter Next ; Do not forget to include the PrinterList() UDF |
||||||||
|
|
|||||||
Could it be that the PrinterList() UDF only returns system printers installed or does it depends on the user performing the WMI query? I tried to get a list of installed printers for the current users logged on the the pc's, however i get the feeling that i get a list of printers for my useraccount on the pc's. PrinterList with option 0 to 3 gives me a list with results on the remote pc's, option 4 & 5 has no results. The same query on the pc's i use (logged on or not) give good results with option 0,1,4 and 5. Options 2 & 3 resturn only local system printers. how is it possible to retrieve the list of printer(s) of the current user logged on? |
||||||||
|
|
|||||||
You must have the proper permissions to get the list on the remote computer, as this UDF does rely on WMI. |