Results 1 to 2 of 2

Thread: Enabling Bidirectional Support (printers)

  1. #1

    Thread Starter
    New Member
    Join Date
    Mar 2008
    Posts
    2

    Enabling Bidirectional Support (printers)

    I use the following script (in a start up file) to automatically find local printers and share them when a user logs onto a terminal server (MS Terminal Server 2003). I need to be able to make this script also disable bidirectional support for these printers without affecting the settings on the local machine.

    Does anyone know how I would go about this?

    I've searched all over the internet and couldn't find anything similar. I also don't really know any VB, although I have some programming experience. Sorry if I sound dumb. Any help is appreciated.

    Code:
    'strComputer = "." 
    'Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2") 
     
    Set objWMIService = GetObject("winmgmts:\\.\root\cimv2") 
     
    'WScript.Sleep 5000 'Wait 5 seconds to ensure no errors occur
     
    Set colPrinters =  objWMIService.ExecQuery _ 
       ("Select * From Win32_Printer Where (DeviceID like 'an%') or (DeviceID like 'cc%') or (DeviceID like 'me%') or (DeviceID like 'ta%')")
    '"Or DeviceID like '%'" This can be added at the end of the above string for when we have printers that start with something other than "an".
     
    For Each objPrinter in colPrinters 
      If (not (objPrinter.Shared)) Or (objPrinter.ShareName <> left(objPrinter.DeviceID,7)) Then
      objPrinter.Shared = TRUE 
      objPrinter.ShareName = left(objPrinter.DeviceID,7)
       
      objPrinter.Put_
      
     End If 
    Next

  2. #2

    Thread Starter
    New Member
    Join Date
    Mar 2008
    Posts
    2

    Re: Enabling Bidirectional Support (printers)

    I tried adding the following with no luck:

    Code:
     obj.Printer.EnableBIDI = False
    This is the only thing I can find from MSDN and other tech support forums.

    Anyone know anything?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width