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 strongm 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. Anatec

    Map network printers based on workstation IP addresses

    Yeah.. I feel bad making mark work so hard to help me. We found this article and implemented this instead... http://www.grouppolicy.biz/2010/01/how-to-use-group-policy-preferences-to-dynamically-map-printers-with-roaming-profiles/
  2. Anatec

    Map network printers based on workstation IP addresses

    Your way will probably be a more efficient way to remove all the networked printers... I'm just confused where to put that in the following code. I've tried a variety of different options.. can't seem to figure it out : set objNetwork = WScript.CreateObject("WScript.Network") sIP = GetIP() If...
  3. Anatec

    Map network printers based on workstation IP addresses

    So this is the most ideal code for this situation? This seems like it would clear the existing printers before adding the new ones, correct? case "146","147" objNetwork.RemoveWindowsPrinterConnection "\\NESVR-PRT01\FLR1_HP_CLR1" objNetwork.RemoveWindowsPrinterConnection...
  4. Anatec

    Map network printers based on workstation IP addresses

    You can identify where a computer is by the IP address. Each floor has 2 subnets designated to it differentiated by the 3rd octet. 10.231.144 & 145 = 1st floor 10.231.146 & 147 = 2nd floor 10.231.148 & 149 = 3rd Floor
  5. Anatec

    Map network printers based on workstation IP addresses

    Yes Mark that helps a lot thank you... I do have 1 last question. I will attach 1 floor of printers, I have another 2 to add... I want to make it so that it will remove other floor printers if a PC is connect to a new floor. (Ex, there a PC on floor 1 that moves to floor 2... will remove floor 1...
  6. Anatec

    Map network printers based on workstation IP addresses

    I guess I could just manually list out every printer.. just not sure if that would effect performance since it will be a logon script.
  7. Anatec

    Map network printers based on workstation IP addresses

    Sorry if that was confusing... this is what it looks like now with an error on line 15 stating "the network path was not found." FYI, "\\nesvr-prt01\!Print drivers\Omaha Printers\add_2nd_flr_printers.bat" is a shared path on our printer server that everyone can access Dim objShell Set...
  8. Anatec

    Map network printers based on workstation IP addresses

    Haha.. figured it out after I thought about it. Now with the following code I get an error on line 13 that says "the printer name is invalid." but I think it is because I'm am trying to run a .bat file. I replaced \\nesvr-prt01\!Print drivers\Omaha Printers\add_2nd_flr_printers.bat with...
  9. Anatec

    Map network printers based on workstation IP addresses

    Okay Mark, that seems easier than what I had... how would you replace that in the current code so that it is functional? I tried the following but get an error on line 6. Sorry I'm so new at scripting, literally picked it up this last week. set objNetwork =...
  10. Anatec

    Map network printers based on workstation IP addresses

    Ok so I updated a few things... I do not get any error codes but when I run the vbscript the printer scripts from the print server are not running so I'm assuming something isn't right.. do you have any idea what that might be? set objNetwork = WScript.CreateObject("WScript.Network") sIP =...
  11. Anatec

    Map network printers based on workstation IP addresses

    Sounds good.. I made a few tweaks. My goal is to have this be a logon script where it pulls the IP from the workstation and then determines, based on the third octet of the IP, which printer script to run. Does that make sense? I appreciate your help. dim NIC1, Nic, sIP Set NIC1 =...
  12. Anatec

    Map network printers based on workstation IP addresses

    Honestly, I don't know anything about scripting so I was hoping to just use some of the code that was in the previous post. Here's what I have... Set objShell = CreateObject("Wscript.Shell") set objExec = objShell.Exec("%comspec% /c ipconfig.exe") set objNetwork =...
  13. Anatec

    Map network printers based on workstation IP addresses

    thread329-1642011 Does anyone know what the resolution to this thread was for the network printing portion? I'm in the same spot as this guy was... I am looking for a VBScript that automatically adds printers based on the third octet in the IP address to determine which set of printers get...

Part and Inventory Search

Back
Top