Setting Default Printer Based on computer OU

Author Message
InsightOnsite

  • Total Posts : 2
  • Scores: 0
  • Reward points : 0
  • Joined: 5/17/2005
  • Location:
  • Status: offline
Setting Default Printer Based on computer OU Tuesday, May 17, 2005 6:13 AM (permalink)
0
I have multiple classrooms, each with a networked printer. I have logon scripts installing each of these printers based on the student OU, however I would like to set the default based on the computer OU (ie classroom number)
I have the following script to set the default printer
Option Explicit
Dim objNetwork, strUNCPrinter
strUNCPrinter = "\\nyci-fpsrv01\nyci-301-hp"
Set objNetwork = CreateObject("WScript.Network")
objNetwork.AddWindowsPrinterConnection strUNCPrinter
objNetwork.SetDefaultPrinter strUNCPrinter
WScript.Quit

which works great on it's own, however when I add it to the GP of the classroom OU it does not run.

any help would be greatfull
 
#1
    netmarcos

    • Total Posts : 55
    • Scores: 0
    • Reward points : 0
    • Joined: 12/7/2004
    • Location: USA
    • Status: offline
    Re: Setting Default Printer Based on computer OU Tuesday, May 17, 2005 6:47 AM (permalink)
    0
    Are you adding this as part of the user logon script?
     
    #2
      InsightOnsite

      • Total Posts : 2
      • Scores: 0
      • Reward points : 0
      • Joined: 5/17/2005
      • Location:
      • Status: offline
      Re: Setting Default Printer Based on computer OU Tuesday, May 17, 2005 7:15 AM (permalink)
      0
      I have this as a login script yes, but this one is on its own.
      the regular login script runs based on the user (student) OU group policy.

      I want this one to run based on the computer (room_301) OU group policy
       
      #3
        token

        • Total Posts : 1917
        • Scores: 0
        • Reward points : 0
        • Joined: 1/14/2005
        • Location:
        • Status: offline
        Re: Setting Default Printer Based on computer OU Tuesday, May 17, 2005 7:18 AM (permalink)
        0
        If the script doesn't even run, the problem is most likely related to GPO or other configurations rather than the script itself. Try to create a file or something within the script to determine whether the script runs or not. If it does, then you can work on the script itself.

         
        #4
          fosterr_2000

          • Total Posts : 115
          • Scores: 2
          • Reward points : 0
          • Joined: 12/18/2004
          • Location:
          • Status: offline
          Re: Setting Default Printer Based on computer OU Tuesday, May 17, 2005 7:32 AM (permalink)
          0
          I don't think that this is possible. The default printer is related to the users profile and is not machine related. I believe that the computer will only process the startup script from the computer section of the policy which happens before a user is logged on and since no user is logged on then there is nothing to tie the default printer setting too. I hope that I am wrong because it would be cool to be able to do this.

          Good luck.
           
          #5
            netmarcos

            • Total Posts : 55
            • Scores: 0
            • Reward points : 0
            • Joined: 12/7/2004
            • Location: USA
            • Status: offline
            Re: Setting Default Printer Based on computer OU Tuesday, May 17, 2005 7:51 AM (permalink)
            0
            It is possible to have the logon script executed on a per-machine basis with a loopback. Just be sure to set it up in merge mode. That way, any user logging on to machine subject to that GPO will recieve the user settings defined therein.
             
            #6
              fosterr_2000

              • Total Posts : 115
              • Scores: 2
              • Reward points : 0
              • Joined: 12/18/2004
              • Location:
              • Status: offline
              Re: Setting Default Printer Based on computer OU Tuesday, May 17, 2005 7:53 AM (permalink)
              0
              Cool
               
              #7

                Online Bookmarks Sharing: Share/Bookmark

                Jump to:

                Current active users

                There are 0 members and 1 guests.

                Icon Legend and Permission

                • New Messages
                • No New Messages
                • Hot Topic w/ New Messages
                • Hot Topic w/o New Messages
                • Locked w/ New Messages
                • Locked w/o New Messages
                • Read Message
                • Post New Thread
                • Reply to message
                • Post New Poll
                • Submit Vote
                • Post reward post
                • Delete my own posts
                • Delete my own threads
                • Rate post

                2000-2012 ASPPlayground.NET Forum Version 3.9