Title: Message

VBScript executes by using cscript.exe or wscript.exe. The code itself doesn’t compile into an executable. Some alternatives would be to create the same functionality in VB, or use Perl and compile it into a Perl executable. Typically I just write a simple batch file that includes something like:

 

cscript C:\Path\vbscriptfile.vbs

 

Is that what you’re asking?

<mc>

-----Original Message-----
From: Pennell, Ronald B. [mailto:[EMAIL PROTECTED]
Sent: Friday, October 17, 2003 8:54 AM
To: [EMAIL PROTECTED]
Subject: RE: [ActiveDir] LDAP'ing a computer object in AD

 

How can I take your code and save as an executable script?

 

Ron

 

-----Original Message-----
From: Michael B. Smith [mailto:[EMAIL PROTECTED]
Sent: Friday, October 17, 2003 8:34 AM
To: [EMAIL PROTECTED]
Subject: RE: [ActiveDir] LDAP'ing a computer object in AD

 

compname = InputBox ("Enter name of computer", "GetComputerName", "mycomputername")

domname  = InputBox ("Enter name of domain", "GetDomainName", "myhostname")

blah blah blah

 


From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Friday, October 17, 2003 8:21 AM
To: [EMAIL PROTECTED]
Subject: RE: [ActiveDir] LDAP'ing a computer object in AD

Anyway to make screen pops asking for compname and domname?

 

 

Shawn

-----Original Message-----
From: Frederic Allaert [mailto:[EMAIL PROTECTED]
Sent: Friday, October 17, 2003 3:17 AM
To: '[EMAIL PROTECTED]'
Subject: RE: [ActiveDir] LDAP'ing a computer object in AD

OK, I figured it out using your tip on the SAM account:

 

Dim compname
Dim domname
compname = "MYHOSTNAME"
domname = "MYDOMAIN"

 

Set
Set oTrans = CreateObject("NameTranslate")
oTrans.Init 1, domname
oTrans.Set 3, domname &"\"& compname &"$"
sAdsPath = oTrans.Get(1)
Set > Set oTrans = Nothing
wscript.echo "LDAP path: " & sAdsPath

Thanks & greetings,
 
Frederic Allaert
System Engineer
Johnson Pump AB


-----Original Message-----
From: Ken Cornetet [mailto:[EMAIL PROTECTED]
Sent: Thursday, October 16, 2003 3:55 PM
To: [EMAIL PROTECTED]
Subject: RE: [ActiveDir] LDAP'ing a computer object in AD

I think this is what you want. Search for samaccountname=computername$ (append a "$" to the computer name).

-----Original Message-----
From: Frederic Allaert [mailto:[EMAIL PROTECTED]
Sent: Thursday, October 16, 2003 8:50 AM
To: [EMAIL PROTECTED]
Subject: [ActiveDir] LDAP'ing a computer object in AD

Hello all,

I have been searching some good, clear examples how to determine the LDAP path
for a computer object, (without knowing the "location" in AD), with the only input being
the hostname of the computer, and the DNS-name for the domain. All this using a .VBS-script...

Can someone produce such an example, or direct me to some good resource websites on this topic?

Greetings,

Frederic Allaert

Reply via email to