Logon Scripts in VB for NT logons 
Author Message
 Logon Scripts in VB for NT logons

Can anyone help?
We have just rolled out NT4.0, Exchange5.5 , and IIS4.0 in a corporate
environment.
The consultants used DOS scripting for the logon scripts.
We now want to roll out some applications and centralise the location of the
"ini" files etc.

The idea was to have a User environment variable set in the logon script eg
Set iniroot = "q:\iniroot" this is fine for the VDM window but does not
actually set the real environment variable.

I can use windows scripting host to set the registry keys with the following
code
Dim WSHShell
Set WSHShell = WScript.CreateObject("WScript.Shell")
WSHShell.RegWrite "HKCU\Environment\iniroot", "q:\iniroot"

This does what is required but we don't have WSH installed on all the
clients (would require updates to our standard Image and would like to avoid
this).

Are there any easier ways to install the required DLL's and OCX files (so we
can run WSH vb scripts without having to create an install program i.e.
something we could run in our existing scripts.

Any other suggestions ideas would be good too.

Andy A



Thu, 21 Mar 2002 03:00:00 GMT  
 Logon Scripts in VB for NT logons
Andy,

The NT command SETX will accomplish what you need in DOS batch.  
Alternatively, there are simple batch files to be found/written to
install WSH if it is not already present.  Of course, admin privs are
required on the workstation.

Some good WSH sites for starters:

        http://wsh.glazier.co.nz
        http://cwashington.netreach.net


Quote:
> Can anyone help?
> We have just rolled out NT4.0, Exchange5.5 , and IIS4.0 in a corporate
> environment.
> The consultants used DOS scripting for the logon scripts.
> We now want to roll out some applications and centralise the location of the
> "ini" files etc.

> The idea was to have a User environment variable set in the logon script eg
> Set iniroot = "q:\iniroot" this is fine for the VDM window but does not
> actually set the real environment variable.

> I can use windows scripting host to set the registry keys with the following
> code
> Dim WSHShell
> Set WSHShell = WScript.CreateObject("WScript.Shell")
> WSHShell.RegWrite "HKCU\Environment\iniroot", "q:\iniroot"

> This does what is required but we don't have WSH installed on all the
> clients (would require updates to our standard Image and would like to avoid
> this).

> Are there any easier ways to install the required DLL's and OCX files (so we
> can run WSH vb scripts without having to create an install program i.e.
> something we could run in our existing scripts.

> Any other suggestions ideas would be good too.

> Andy A

--

Director, Information Technology                Kastle Systems, LLC
                                                (703) 528-8800


Fri, 22 Mar 2002 03:00:00 GMT  
 Logon Scripts in VB for NT logons
Andy,

firstly you might be better using policies to achieve what you want?
Otherwise, WSH can be installed silently using /Q in a standard login
script.

Cheers,

Nick.

Quote:
> -----Original Message-----

> Posted At: 03 October 1999 22:54
> Posted To: microsoft.public.scripting.VBScript
> Conversation: Logon Scripts in VB for NT logons
> Subject: Logon Scripts in VB for NT logons

> The idea was to have a User environment variable set in the
> logon script eg
> Set iniroot = "q:\iniroot" this is fine for the VDM window
> but does not
> actually set the real environment variable.

> I can use windows scripting host to set the registry keys
> with the following
> code
> Dim WSHShell
> Set WSHShell = WScript.CreateObject("WScript.Shell")
> WSHShell.RegWrite "HKCU\Environment\iniroot", "q:\iniroot"

> This does what is required but we don't have WSH installed on all the
> clients (would require updates to our standard Image and
> would like to avoid
> this).

> Are there any easier ways to install the required DLL's and
> OCX files (so we
> can run WSH vb scripts without having to create an install
> program i.e.
> something we could run in our existing scripts.

> Any other suggestions ideas would be good too.

> Andy A



Fri, 22 Mar 2002 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Preventing the Windows Logon Dialog box for Logons

2. Writing an NT logon script with VB5

3. NT logon script Error

4. App Registry Settings for NT Multiple logons

5. WSH Script in NT Logon Script

6. How can I get logon server name and IP address from logon script using wsh

7. vb script as network logon script

8. Logon Script and NT

9. How do I run a .vbs file a NT logon script

10. Logon Scripts in Windows NT

11. Run WSH logon script before NT shell starts?

12. NT 40 Domain Logon Scripts

 

 
Powered by phpBB® Forum Software