I have two scripts, perhaps not programmed the most efficient way, but
anyways they work. How do i put this into one script, right now i need
to execute them seperately, how do i say when script1 is finnished
goto script 2 ?

The reason i would like to know this is, because i do like to build in
some conditions, like when people do connect over RRAS, do not run the
auditing

Thanks in advance

Ralph




script 1:


'On Error Resume Next

Const OTTOYORK_GROUP = "cn=wij_ottoyork"
Const ENGINEERING_GROUP = "cn=wij_engineering"
Const ACCOUNTING_GROUP = "cn=wij_accounting"
Const GLITSCH_GROUP = "cn=wij_glitsch"
Const ENGINEERING_RO_GROUP = "cn=wij_engineering_ro"
Const ITIS_GROUP = "cn=wij_itis"
Const SDWORX_GROUP = "cn=wij_sdworx"
Const SALES_GROUP = "cn=wij_sales"
Const ISABEL_GROUP = "cn=wij_isabel"
Const KMS_GROUP = "cn=wij_kms"
Const ISO9000_GROUP = "cn=wij_iso9000"
Const INTRASTAT_GROUP = "cn=wij_intrastat"


Set wshNetwork = CreateObject("WScript.Network")

wshNetwork.MapNetworkDrive "i:", "\\koytest\Users\" &
wshNetwork.UserName

Set ADSysInfo = CreateObject("ADSystemInfo")
Set CurrentUser = GetObject("LDAP://" & ADSysInfo.UserName)
strGroups = LCase(Join(CurrentUser.MemberOf))

If InStr(strGroups, ENGINEERING_GROUP) Then

WSHNetwork.MapNetworkDrive "l:", "\\koytest\engineering"

End If

If InStr(strGroups, ENGINEERING_RO_GROUP) Then

WSHNetwork.MapNetworkDrive "l:", "\\koytest\engineering"

End If

If InStr(strGroups, OTTOYORK_GROUP) Then
wsh.Network.MapNetworkDrive "k:", "\\koytest\ottoyork"

End If

If InStr(strGroups, ACCOUNTING_GROUP) Then

wshNetwork.MapNetworkDrive "o:", "\\koytest\org_o"
wshNetwork.MapNetworkDrive "p:", "\\koytest\org_p"

End If

If InStr(strGroups, GLITSCH_GROUP) Then

WSHNetwork.MapNetworkDrive "g:", "\\koytest\glitsch"

End If

If InStr(strGroups, ITIS_GROUP) Then

wshNetwork.MapNetworkDrive "m:", "\\koytest\it$"
wshNetwork.MapNetworkDrive "v:", "\\koytest\software$"


End If

If InStr(strGroups, SDWORX_GROUP) Then

WSHNetwork.MapNetworkDrive "x:", "\\koytest\sd worx"

End If

If InStr(strGroups, SALES_GROUP) Then

WSHNetwork.MapNetworkDrive "s:", "\\koytest\sales"

End If

If InStr(strGroups, ISABEL_GROUP) Then

WSHNetwork.MapNetworkDrive "u:", "\\koytest\isabel"

End If

If InStr(strGroups, KMS_GROUP) Then

wshNetwork.MapNetworkDrive "k:", "\\koytest\koch"
wshNetwork.MapNetworkDrive "s:", "\\koytest\shared"
wshNetwork.MapNetworkDrive "x:", "\\koytest\project"


End If

If InStr(strGroups, ISO9000_GROUP) Then

WSHNetwork.MapNetworkDrive "v:", "\\koytest\iso9000"


End if





script 2:

Dim objFSO, objShell

Set objFSO = Createobject("Scripting.Filesystemobject")
Set objShell =CreateObject("WScript.Shell")
objShell.Run "\\khmerd01n04\ezaudit\ezstart.exe /auto" ,1 , False

Set objFSO = Nothing
Set objShell = Nothing

Re: executing scripts by name

name
Wed Feb 11 02:03:25 CST 2004

Try object oriented approach.

These constanst and variables are all

but totally useless for serious scripters

since the dawning of javascript.

---------

You start with Literals to embrace your objective.

That's how Gutenberg started with movable letters
500 years ago.

--------------

In short, you approach to work with electricity (software)

strongly resembles Edison and Telephone companies

(8 WATT global constant $300Tone) agenda.

===========

Learn your lingo before you do your dingo.


------------

Why not uppercase your constant "intelligence" and send a $20 check
to your government.


+++++++++++++++++++++


You were right, your post is fading to ever become
a golden moment.














"Ralph Klos" <rklos@xs4all.be> wrote in message
news:8djj209lgdp844pu7da3fbpmqbh823li81@4ax.com...
> I have two scripts, perhaps not programmed the most efficient way, but
> anyways they work. How do i put this into one script, right now i need
> to execute them seperately, how do i say when script1 is finnished
> goto script 2 ?
>
> The reason i would like to know this is, because i do like to build in
> some conditions, like when people do connect over RRAS, do not run the
> auditing
>
> Thanks in advance
>
> Ralph
>
>
>
>
> script 1:
>
>
> 'On Error Resume Next
>
> Const OTTOYORK_GROUP = "cn=wij_ottoyork"
> Const ENGINEERING_GROUP = "cn=wij_engineering"
> Const ACCOUNTING_GROUP = "cn=wij_accounting"
> Const GLITSCH_GROUP = "cn=wij_glitsch"
> Const ENGINEERING_RO_GROUP = "cn=wij_engineering_ro"
> Const ITIS_GROUP = "cn=wij_itis"
> Const SDWORX_GROUP = "cn=wij_sdworx"
> Const SALES_GROUP = "cn=wij_sales"
> Const ISABEL_GROUP = "cn=wij_isabel"
> Const KMS_GROUP = "cn=wij_kms"
> Const ISO9000_GROUP = "cn=wij_iso9000"
> Const INTRASTAT_GROUP = "cn=wij_intrastat"
>
>
> Set wshNetwork = CreateObject("WScript.Network")
>
> wshNetwork.MapNetworkDrive "i:", "\\koytest\Users\" &
> wshNetwork.UserName
>
> Set ADSysInfo = CreateObject("ADSystemInfo")
> Set CurrentUser = GetObject("LDAP://" & ADSysInfo.UserName)
> strGroups = LCase(Join(CurrentUser.MemberOf))
>
> If InStr(strGroups, ENGINEERING_GROUP) Then
>
> WSHNetwork.MapNetworkDrive "l:", "\\koytest\engineering"
>
> End If
>
> If InStr(strGroups, ENGINEERING_RO_GROUP) Then
>
> WSHNetwork.MapNetworkDrive "l:", "\\koytest\engineering"
>
> End If
>
> If InStr(strGroups, OTTOYORK_GROUP) Then
> wsh.Network.MapNetworkDrive "k:", "\\koytest\ottoyork"
>
> End If
>
> If InStr(strGroups, ACCOUNTING_GROUP) Then
>
> wshNetwork.MapNetworkDrive "o:", "\\koytest\org_o"
> wshNetwork.MapNetworkDrive "p:", "\\koytest\org_p"
>
> End If
>
> If InStr(strGroups, GLITSCH_GROUP) Then
>
> WSHNetwork.MapNetworkDrive "g:", "\\koytest\glitsch"
>
> End If
>
> If InStr(strGroups, ITIS_GROUP) Then
>
> wshNetwork.MapNetworkDrive "m:", "\\koytest\it$"
> wshNetwork.MapNetworkDrive "v:", "\\koytest\software$"
>
>
> End If
>
> If InStr(strGroups, SDWORX_GROUP) Then
>
> WSHNetwork.MapNetworkDrive "x:", "\\koytest\sd worx"
>
> End If
>
> If InStr(strGroups, SALES_GROUP) Then
>
> WSHNetwork.MapNetworkDrive "s:", "\\koytest\sales"
>
> End If
>
> If InStr(strGroups, ISABEL_GROUP) Then
>
> WSHNetwork.MapNetworkDrive "u:", "\\koytest\isabel"
>
> End If
>
> If InStr(strGroups, KMS_GROUP) Then
>
> wshNetwork.MapNetworkDrive "k:", "\\koytest\koch"
> wshNetwork.MapNetworkDrive "s:", "\\koytest\shared"
> wshNetwork.MapNetworkDrive "x:", "\\koytest\project"
>
>
> End If
>
> If InStr(strGroups, ISO9000_GROUP) Then
>
> WSHNetwork.MapNetworkDrive "v:", "\\koytest\iso9000"
>
>
> End if
>
>
>
>
>
> script 2:
>
> Dim objFSO, objShell
>
> Set objFSO = Createobject("Scripting.Filesystemobject")
> Set objShell =CreateObject("WScript.Shell")
> objShell.Run "\\khmerd01n04\ezaudit\ezstart.exe /auto" ,1 , False
>
> Set objFSO = Nothing
> Set objShell = Nothing
>
>


Re: executing scripts by john6666

john6666
Wed Feb 11 15:44:00 CST 2004

Gutenberg was pressed though. :-)

"name" <nospam@user.com> wrote in message news:<uK$SHWH8DHA.2576@TK2MSFTNGP11.phx.gbl>...
> Try object oriented approach.
>
> These constanst and variables are all
>
> but totally useless for serious scripters
>
> since the dawning of javascript.
>
> ---------
>
> You start with Literals to embrace your objective.
>
> That's how Gutenberg started with movable letters
> 500 years ago.
>
> --------------
>
> In short, you approach to work with electricity (software)
>
> strongly resembles Edison and Telephone companies
>
> (8 WATT global constant $300Tone) agenda.
>
> ===========
>
> Learn your lingo before you do your dingo.
>
>
> ------------
>
> Why not uppercase your constant "intelligence" and send a $20 check
> to your government.
>
>
> +++++++++++++++++++++
>
>
> You were right, your post is fading to ever become
> a golden moment.
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> "Ralph Klos" <rklos@xs4all.be> wrote in message
> news:8djj209lgdp844pu7da3fbpmqbh823li81@4ax.com...
> > I have two scripts, perhaps not programmed the most efficient way, but
> > anyways they work. How do i put this into one script, right now i need
> > to execute them seperately, how do i say when script1 is finnished
> > goto script 2 ?
> >
> > The reason i would like to know this is, because i do like to build in
> > some conditions, like when people do connect over RRAS, do not run the
> > auditing
> >
> > Thanks in advance
> >
> > Ralph
> >
> >
> >
> >
> > script 1:
> >
> >
> > 'On Error Resume Next
> >
> > Const OTTOYORK_GROUP = "cn=wij_ottoyork"
> > Const ENGINEERING_GROUP = "cn=wij_engineering"
> > Const ACCOUNTING_GROUP = "cn=wij_accounting"
> > Const GLITSCH_GROUP = "cn=wij_glitsch"
> > Const ENGINEERING_RO_GROUP = "cn=wij_engineering_ro"
> > Const ITIS_GROUP = "cn=wij_itis"
> > Const SDWORX_GROUP = "cn=wij_sdworx"
> > Const SALES_GROUP = "cn=wij_sales"
> > Const ISABEL_GROUP = "cn=wij_isabel"
> > Const KMS_GROUP = "cn=wij_kms"
> > Const ISO9000_GROUP = "cn=wij_iso9000"
> > Const INTRASTAT_GROUP = "cn=wij_intrastat"
> >
> >
> > Set wshNetwork = CreateObject("WScript.Network")
> >
> > wshNetwork.MapNetworkDrive "i:", "\\koytest\Users\" &
> > wshNetwork.UserName
> >
> > Set ADSysInfo = CreateObject("ADSystemInfo")
> > Set CurrentUser = GetObject("LDAP://" & ADSysInfo.UserName)
> > strGroups = LCase(Join(CurrentUser.MemberOf))
> >
> > If InStr(strGroups, ENGINEERING_GROUP) Then
> >
> > WSHNetwork.MapNetworkDrive "l:", "\\koytest\engineering"
> >
> > End If
> >
> > If InStr(strGroups, ENGINEERING_RO_GROUP) Then
> >
> > WSHNetwork.MapNetworkDrive "l:", "\\koytest\engineering"
> >
> > End If
> >
> > If InStr(strGroups, OTTOYORK_GROUP) Then
> > wsh.Network.MapNetworkDrive "k:", "\\koytest\ottoyork"
> >
> > End If
> >
> > If InStr(strGroups, ACCOUNTING_GROUP) Then
> >
> > wshNetwork.MapNetworkDrive "o:", "\\koytest\org_o"
> > wshNetwork.MapNetworkDrive "p:", "\\koytest\org_p"
> >
> > End If
> >
> > If InStr(strGroups, GLITSCH_GROUP) Then
> >
> > WSHNetwork.MapNetworkDrive "g:", "\\koytest\glitsch"
> >
> > End If
> >
> > If InStr(strGroups, ITIS_GROUP) Then
> >
> > wshNetwork.MapNetworkDrive "m:", "\\koytest\it$"
> > wshNetwork.MapNetworkDrive "v:", "\\koytest\software$"
> >
> >
> > End If
> >
> > If InStr(strGroups, SDWORX_GROUP) Then
> >
> > WSHNetwork.MapNetworkDrive "x:", "\\koytest\sd worx"
> >
> > End If
> >
> > If InStr(strGroups, SALES_GROUP) Then
> >
> > WSHNetwork.MapNetworkDrive "s:", "\\koytest\sales"
> >
> > End If
> >
> > If InStr(strGroups, ISABEL_GROUP) Then
> >
> > WSHNetwork.MapNetworkDrive "u:", "\\koytest\isabel"
> >
> > End If
> >
> > If InStr(strGroups, KMS_GROUP) Then
> >
> > wshNetwork.MapNetworkDrive "k:", "\\koytest\koch"
> > wshNetwork.MapNetworkDrive "s:", "\\koytest\shared"
> > wshNetwork.MapNetworkDrive "x:", "\\koytest\project"
> >
> >
> > End If
> >
> > If InStr(strGroups, ISO9000_GROUP) Then
> >
> > WSHNetwork.MapNetworkDrive "v:", "\\koytest\iso9000"
> >
> >
> > End if
> >
> >
> >
> >
> >
> > script 2:
> >
> > Dim objFSO, objShell
> >
> > Set objFSO = Createobject("Scripting.Filesystemobject")
> > Set objShell =CreateObject("WScript.Shell")
> > objShell.Run "\\khmerd01n04\ezaudit\ezstart.exe /auto" ,1 , False
> >
> > Set objFSO = Nothing
> > Set objShell = Nothing
> >
> >