VB / ADSI Prompt User for OU.


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 1 of 1

Thread: VB / ADSI Prompt User for OU.

Hybrid View

  1. #1
    Join Date
    Aug 2005
    Posts
    1

    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 10:10 AM.

Similar Threads

  1. Replies: 8
    Last Post: 07-18-2007, 11:22 AM
  2. Script for scrolling
    By Mark in forum Web
    Replies: 3
    Last Post: 08-30-2001, 12:45 PM
  3. Replies: 0
    Last Post: 07-17-2001, 09:26 AM
  4. user control in VB
    By tami in forum VB Classic
    Replies: 0
    Last Post: 01-09-2001, 03:00 PM
  5. VB vs. Access user interface
    By Ken McLean in forum authorevents.vaughn
    Replies: 1
    Last Post: 05-30-2000, 10: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
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

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