Advertisement

04.20.2006 at 03:46PM PDT, ID: 21821598
[x]
Attachment Details

Mapping Printers based on AD Sites

Asked by whoam in Visual Basic Programming

I am trying to map printers based on AD site.  I'm using the following approach.

 '+++++++BEGIN CREATING PRNTERS Per AD SITE++++++++++
Set objSysInfo = WScript.CreateObject("ADSystemInfo")
Set objNetwork = WScript.CreateObject("Wscript.Network")
strSiteName = objSysInfo.SiteName

    Select Case strSiteName  
        Case "Site1" &_    
            net.AddWindowsPrinterConnection "\\tb221002\PRMR",  "MB_HP"
            net.AddWindowsPrinterConnection "\\tb221002\PBMB",  "PBMB"
        Case "Site2" &_
             net.AddWindowsPrinterConnection "\\tb052002\HP4200",  "HP 4200"
             net.AddWindowsPrinterConnection "\\tb052002\HP4250",  "HP 4250"
        Case "Site3" &_
            net.AddWindowsPrinterConnection "\\tb022702\HP4250",  "HP 4200"
'++++++++++++++++++++++END PRINTER MAPPING PER AD SITE++++++++++++++++++++++++++++++++++++  

I'm getting an "Error 1024, Expected Statement"
at *here*
 
            net.AddWindowsPrinterConnection *here* "\\tb221002\PRMR",  "MB_HP"
           Start Free Trial
[+][-]04.20.2006 at 06:38PM PDT, ID: 16504059

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04.20.2006 at 10:08PM PDT, ID: 16504783

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]04.20.2006 at 10:15PM PDT, ID: 16504802

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]04.20.2006 at 10:16PM PDT, ID: 16504806

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]04.20.2006 at 10:18PM PDT, ID: 16504808

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]04.20.2006 at 10:26PM PDT, ID: 16504827

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]04.21.2006 at 03:10AM PDT, ID: 16505856

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04.21.2006 at 08:08AM PDT, ID: 16508146

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04.21.2006 at 09:15PM PDT, ID: 16513521

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]04.24.2006 at 06:30AM PDT, ID: 16524804

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04.26.2006 at 03:31PM PDT, ID: 16548679

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]04.26.2006 at 03:37PM PDT, ID: 16548710

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]04.26.2006 at 04:16PM PDT, ID: 16548891

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]04.26.2006 at 08:01PM PDT, ID: 16549832

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: Visual Basic Programming
Sign Up Now!
Solution Provided By: ddepastino
Participating Experts: 3
Solution Grade: A
 
 
[+][-]04.26.2006 at 08:51PM PDT, ID: 16550022

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]04.26.2006 at 08:52PM PDT, ID: 16550029

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]04.27.2006 at 06:26AM PDT, ID: 16552561

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04.27.2006 at 07:58PM PDT, ID: 16559016

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]04.28.2006 at 06:33PM PDT, ID: 16567068

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32