DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 1 of 1

Threaded View

  1. #1
    Join Date
    Aug 2005

    VB / ADSI Prompt User for OU.

    I am creating an HTML document for My company's IT maintenance. On this page, will be several vbscripts that will perform various inventory and data collection tasks. The data will be collected on a 'per OU' basis. I have a working script which binds to a specific OU, however I would like to be able to prompt the user to type an OU name and have the script run against that OU. Here is a piece of the code:

    Set objOU = GetObject("LDAP://ou=MY OU,dc=MY DC,dc=com")
    objOU.Filter = Array("Computer")

    For Each objComputer in objOU
    strComputer = objComputer.CN

    Set objShell = CreateObject("WScript.Shell")
    strCommand = "%comspec% /c ping -n 3 -w 1000 " & strComputer & ""
    Set objExecObject = objShell.Exec(strCommand)

    Do While Not objExecObject.StdOut.AtEndOfStream
    strText = objExecObject.StdOut.ReadAll()
    If Instr(strText, "Reply") > 0 Then

    I have a Dim statement that will prompt, however I cannot get the variable into the LDAP statement. This has been tearing at me for over a week.

    Any help would be graciously appreciated.
    Last edited by ScriptRookie; 08-26-2005 at 09:10 AM.

Similar Threads

  1. Replies: 8
    Last Post: 07-18-2007, 10:22 AM
  2. Script for scrolling
    By Mark in forum Web
    Replies: 3
    Last Post: 08-30-2001, 11:45 AM
  3. Replies: 0
    Last Post: 07-17-2001, 08:26 AM
  4. user control in VB
    By tami in forum VB Classic
    Replies: 0
    Last Post: 01-09-2001, 02:00 PM
  5. VB vs. Access user interface
    By Ken McLean in forum authorevents.vaughn
    Replies: 1
    Last Post: 05-30-2000, 09:25 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center
Latest Articles
Questions? Contact us.
Web Development
Latest Tips
Open Source

   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center

We have made updates to our Privacy Policy to reflect the implementation of the General Data Protection Regulation.