Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. Keegans

    Working with Scripting.Dictionary and pritners

    Changes made This was added at the end of the code Function addToDict(ByVal strPrinterPath) If Not objDictPrnts.Exists(strPrinterPath) Then objDictPrnts.Add strPrinterPath, strPrinterPath End If End Function All printer statements were changed to the following [Code} If...
  2. Keegans

    Working with Scripting.Dictionary and pritners

    Well in this case it may. This is being written for a school setting. If the teacher has requested that they have a specific printer anywhere they log in, and we want the computer to have the same printer by default (no matter who is sitting there) then we will have overlapping printers and we...
  3. Keegans

    Working with Scripting.Dictionary and pritners

    Completely new to vbs. I know in php I could add a ! to make it the opposite and eliminate the Then with nothing to do there. I don't know if that can be done in vbs. Function addToDict(ByVal strPrinterPath) If objDictPrnts.Exists(strPrinterPath) Then Else objDictPrnts.Add...
  4. Keegans

    Working with Scripting.Dictionary and pritners

    To avoid this, I am thinking I need to write a function for adding to the array that checks to see if the key is already taken. That way we can move beyond this error and onto others :)
  5. Keegans

    Working with Scripting.Dictionary and pritners

    Script: logon.vbs Line: 176 Char: 6 Error: This key is already associated with an element of this collection Code: 800A01C9 Source: Microsoft VBScript runtime error. 'Line 176 objDictPrnts.Add strPrintServer & "CHS LMC Copier" & strPrintArch, strPrintServer & "CHS LMC Copier" & strPrintArch
  6. Keegans

    Working with Scripting.Dictionary and pritners

    I shortened the code a bit here to make it fit. The omitted stuff is drive mapping Option Explicit On Error Resume Next Dim objNetwork, objSysInfo, strUserDN Dim objGroupList, objUser, objFSO Dim strComputerDN, objComputer 'change made to correct users losing the H drive KS 10/24/2012 Dim...
  7. Keegans

    Working with Scripting.Dictionary and pritners

    To be perfectly honest, I have no idea. Its how they had it in the FAQ I mentioned. Do you have another way of doing that command? It should take in the already mapped printers and then go through the mapped ones and delete them if they exist in the objDictPrnts.
  8. Keegans

    Working with Scripting.Dictionary and pritners

    msgbox PrinterPath Does not show a message box at all.
  9. Keegans

    Working with Scripting.Dictionary and pritners

    Hello everyone! I found this FAQ and I am trying to implement part of it: http://www.tek-tips.com/faqs.cfm?fid=5798 --- Set WSHNetwork = CreateObject("WScript.Network") 'Install only missing printers from predefined list 'Thanks go to DM4Ever for this section 'Create a dictionary to store our...

Part and Inventory Search

Back
Top