I would like to search a network domain for workstations then check each
work station found for the installation of a particular program and if found
ad a short cut to the all users startup.

Is VBscript (or VB6) a logical way to do this?

Where would I look to for information to start such a script?

Thanks
Martin

Re: Search Domain by jeff

jeff
Wed Oct 06 12:12:30 CDT 2004

On Wed, 6 Oct 2004 21:29:22 +1000, "Martin Wright"
<NoSpam@pacific.net.au> wrote:

>I would like to search a network domain for workstations then check each
>work station found for the installation of a particular program and if found
>ad a short cut to the all users startup.
>
>Is VBscript (or VB6) a logical way to do this?

As good as any.

>Where would I look to for information to start such a script?

Define exactly what you're looking for. A program EXE, a registry
entry, etc. Check scripts at:

http://cwashington.netreach.net/main/default.asp?topic=news
http://www.microsoft.com/technet/scriptcenter/default.mspx

For samples of parts of what you need. A lot depends on what the
domain is, what operating system(s), etc.

Jeff

Re: Search Domain by JHP

JHP
Wed Oct 06 16:07:13 CDT 2004

I've written something similar to what your asking, but I converted it from
VB to PB (PowerBuilder) - If your interested I could post what I have, and
you could convert it back to VB...

"Martin Wright" <NoSpam@pacific.net.au> wrote in message
news:e9dy7e5qEHA.2948@TK2MSFTNGP11.phx.gbl...
>I would like to search a network domain for workstations then check each
>work station found for the installation of a particular program and if
>found ad a short cut to the all users startup.
>
> Is VBscript (or VB6) a logical way to do this?
>
> Where would I look to for information to start such a script?
>
> Thanks
> Martin
>



Re: Search Domain by Martin

Martin
Wed Oct 06 16:26:46 CDT 2004

Thanks
I'm interested in anything that may help.


"JHP" <goawayspam@GFY.com> wrote in message
news:%23Ubz0h%23qEHA.2636@TK2MSFTNGP09.phx.gbl...
> I've written something similar to what your asking, but I converted it
from
> VB to PB (PowerBuilder) - If your interested I could post what I have, and
> you could convert it back to VB...
>
> "Martin Wright" <NoSpam@pacific.net.au> wrote in message
> news:e9dy7e5qEHA.2948@TK2MSFTNGP11.phx.gbl...
> >I would like to search a network domain for workstations then check each
> >work station found for the installation of a particular program and if
> >found ad a short cut to the all users startup.
> >
> > Is VBscript (or VB6) a logical way to do this?
> >
> > Where would I look to for information to start such a script?
> >
> > Thanks
> > Martin
> >
>
>



Re: Search Domain by JHP

JHP
Wed Oct 06 17:43:52 CDT 2004

To create a shortcut I know of an API (you may need to map the drive first):

fCreateShellLink
fCreateShellGroup
Found in the VB5STKIT.DLL

To see if a computer has a particular program you could check for a
directory or file:

FSO - FileSystemObject:
FileExists, DirectoryExists

This is the logic to get the computer names in a domain (PB):

ole_root = CREATE OLEObject
ole_root.ConnectToObject("LDAP://RootDSE")
ls_domain = ole_root.Get("DefaultNamingContext")
ole_domain = CREATE OLEObject
ole_domain.ConnectToObject("LDAP://" + ls_domain)
ls_base = "<" + ole_domain.ADsPath + ">"
ls_filter = "(&(ObjectCategory=computer))"
ls_attribute = "Name"
ls_depth = "SubTree"
ls_query = ls_base + ";" + ls_filter + ";" + ls_attribute + ";" + ls_depth
ole_conn = CREATE OLEObject
ole_conn.ConnectToNewObject("ADODB.Connection")
ole_conn.Open("Provider=AdsDSOObject;Data Source=Active Directory
Provider")
ole_rs = CREATE OLEObject
ole_rs.ConnectToNewObject("ADODB.RecordSet")
ole_rs = ole_conn.Execute(ls_query)
ole_rs.MoveFirst
ll_parent = tv_folders.InsertItemFirst(0, ls_domain, 1)

Do Until ole_rs.EOF
ls_computer = Lower(String(ole_rs.Fields("Name").Value))
tv_folders.InsertItemSort(ll_parent, ls_computer, 2)
ole_rs.MoveNext
Loop
tv_folders.SetFocus()
tv_folders.ExpandAll(ll_parent)
DESTROY ole_rs
DESTROY ole_conn
DESTROY ole_domain
DESTROY ole_root

"Martin Wright" <nospam@hotmail.com> wrote in message
news:eFXtxt%23qEHA.516@TK2MSFTNGP09.phx.gbl...
> Thanks
> I'm interested in anything that may help.
>
>
> "JHP" <goawayspam@GFY.com> wrote in message
> news:%23Ubz0h%23qEHA.2636@TK2MSFTNGP09.phx.gbl...
>> I've written something similar to what your asking, but I converted it
> from
>> VB to PB (PowerBuilder) - If your interested I could post what I have,
>> and
>> you could convert it back to VB...
>>
>> "Martin Wright" <NoSpam@pacific.net.au> wrote in message
>> news:e9dy7e5qEHA.2948@TK2MSFTNGP11.phx.gbl...
>> >I would like to search a network domain for workstations then check each
>> >work station found for the installation of a particular program and if
>> >found ad a short cut to the all users startup.
>> >
>> > Is VBscript (or VB6) a logical way to do this?
>> >
>> > Where would I look to for information to start such a script?
>> >
>> > Thanks
>> > Martin
>> >
>>
>>
>
>