Logon Script and NT 
Author Message
 Logon Script and NT

I have a logon script that needs to be called when the user logs into the
Domain.  The script itself works fine but what I need to know is, is there a
way to call just the script and not a .bat file in User Manager, if not how
can I set it up so that the .bat file waits until the VBScript is done
running before it continues.

We are using NT servers and 98 clients.  I think I remember reading somewhere
that I had to have a .bat file in User Manager, but I need some help on
getting the .bat file to wait.

I have tried to use a pause in the .bat file and then SendKeys to unpause the
bat but that does not work.  Also if I set Uaser Manager's logon script to
read:

wscript.exe script.vbs

then I get a GPF error and that is something that I do not want.

If I could get any help I would be very happy as would my superiors.  

Darren Sloppy

 -----  Posted via NewsOne.Net: Free (anonymous) Usenet News via the Web  -----
  http://www.*-*-*.com/ ,000+ groups
   NewsOne.Net prohibits users from posting spam.  If this or other posts



Sun, 14 Sep 2003 03:33:07 GMT  
 Logon Script and NT
Try

start wscript script.vbs /wait


Quote:
> I have a logon script that needs to be called when the user logs into the
> Domain.  The script itself works fine but what I need to know is, is there
a
> way to call just the script and not a .bat file in User Manager, if not
how
> can I set it up so that the .bat file waits until the VBScript is done
> running before it continues.

> We are using NT servers and 98 clients.  I think I remember reading
somewhere
> that I had to have a .bat file in User Manager, but I need some help on
> getting the .bat file to wait.

> I have tried to use a pause in the .bat file and then SendKeys to unpause
the
> bat but that does not work.  Also if I set Uaser Manager's logon script to
> read:

> wscript.exe script.vbs

> then I get a GPF error and that is something that I do not want.

> If I could get any help I would be very happy as would my superiors.

> Darren Sloppy

>  -----  Posted via NewsOne.Net: Free (anonymous) Usenet News via the
eb  -----
>   http://newsone.net/ -- Free reading and anonymous posting to 60,000+
groups
>    NewsOne.Net prohibits users from posting spam.  If this or other posts
> made through NewsOne.Net violate posting guidelines, email




Sun, 14 Sep 2003 04:08:02 GMT  
 Logon Script and NT
In your batch file, it should read like this:
Wscript \\servername\Netlogon\Scriptname.vbs

I know of no other way to pause a batch file, other than the pause command
or using a 3rd party command utility to do that. You can pause your script
file at any point and even have it execute a seperate batch file after it
has completed it's major tasks. So a batch file to run a script and that
script to execute another batch file.



Sun, 14 Sep 2003 04:13:43 GMT  
 Logon Script and NT
Even better (unless you've only got 1 DC) would be to code the batch
file thusly:

wscript %0\..\Scriptname.vbs

This is much more flexible because it pulls the actual logon script
from the authenticating server, not just one (potential single
point of failure) server, and will work on any client that supports
logon scripts (Win9x, WinNT and Win2K).

Wayne


Quote:

>In your batch file, it should read like this:
>Wscript \\servername\Netlogon\Scriptname.vbs

>I know of no other way to pause a batch file, other than the pause command
>or using a 3rd party command utility to do that. You can pause your script
>file at any point and even have it execute a seperate batch file after it
>has completed it's major tasks. So a batch file to run a script and that
>script to execute another batch file.

Standard Disclaimer: I said it, they didn't, so blame me, not them!
Spam Avoidance: My reply address is invalid to confuse the spambots.
You can reach me at 'Wayne_Tilton at yahoo dot com'


Sun, 14 Sep 2003 04:45:00 GMT  
 Logon Script and NT
In Windows 2000, you can use WSH script files directly as logon scripts.
(You can enter files with the extensions .vbs, .js, and .wsf in the Logon
Script text box.) Windows NT 4 supports only logon script files with the
extensions .exe, .cmd, and .bat, so you must create a .bat file that
launches the WSH logon script, store the .bat file in the script path, and
enter the name of the .bat file in the Logon Script text box.

Sample LoginScript.BAT


    call LoginScript.VBS
    echo The End

I tested this and it didn't return the last echo until the VBS script was
done (on W2K Pro/WSH 2.0).

Cheers,
Chris


Quote:
> I have a logon script that needs to be called when the user logs into the
> Domain.  The script itself works fine but what I need to know is, is there
a
> way to call just the script and not a .bat file in User Manager, if not
how
> can I set it up so that the .bat file waits until the VBScript is done
> running before it continues.

> We are using NT servers and 98 clients.  I think I remember reading
somewhere
> that I had to have a .bat file in User Manager, but I need some help on
> getting the .bat file to wait.

> I have tried to use a pause in the .bat file and then SendKeys to unpause
the
> bat but that does not work.  Also if I set Uaser Manager's logon script to
> read:

> wscript.exe script.vbs

> then I get a GPF error and that is something that I do not want.

> If I could get any help I would be very happy as would my superiors.

> Darren Sloppy

>  -----  Posted via NewsOne.Net: Free (anonymous) Usenet News via the
eb  -----
>   http://newsone.net/ -- Free reading and anonymous posting to 60,000+
groups
>    NewsOne.Net prohibits users from posting spam.  If this or other posts
> made through NewsOne.Net violate posting guidelines, email




Sun, 14 Sep 2003 10:02:01 GMT  
 Logon Script and NT
This works but I would like something else (how times has that been
said...)Anyway, when this runs Windows continues to login without the script
completing.  I guess I should give a little more explination, forgive me if
this gets boring or too long.  

The script's first screen is a disclaimer that the user agrees to sign their
life away along with their first born son going into the military of a small
third world country, ok not really but something like "we are watching you
and use this computer for business only."  The user clicks OK and continues.
However the problem is that Windows will actually log them in all the way
before they even click OK and that sort of defeats the purpose.  How can I
get Windows to wait until the script is finished before it lets me in.  Thank
you for your help.


Quote:

>Even better (unless you've only got 1 DC) would be to code the batch
>file thusly:

>wscript %0\..\Scriptname.vbs

>This is much more flexible because it pulls the actual logon script
>from the authenticating server, not just one (potential single
>point of failure) server, and will work on any client that supports
>logon scripts (Win9x, WinNT and Win2K).

>Wayne



>>In your batch file, it should read like this:
>>Wscript \\servername\Netlogon\Scriptname.vbs

>>I know of no other way to pause a batch file, other than the pause command
>>or using a 3rd party command utility to do that. You can pause your script
>>file at any point and even have it execute a seperate batch file after it
>>has completed it's major tasks. So a batch file to run a script and that
>>script to execute another batch file.

>Standard Disclaimer: I said it, they didn't, so blame me, not them!
>Spam Avoidance: My reply address is invalid to confuse the spambots.
>You can reach me at 'Wayne_Tilton at yahoo dot com'

 -----  Posted via NewsOne.Net: Free (anonymous) Usenet News via the Web  -----
  http://newsone.net/ -- Free reading and anonymous posting to 60,000+ groups
   NewsOne.Net prohibits users from posting spam.  If this or other posts



Sun, 14 Sep 2003 22:00:57 GMT  
 Logon Script and NT
There is a registry entry that will stop the windows shell loading until
the script has finished.
Software\Microsoft\Windows NT\CurrentVersion\Winlogon\RunLogonScriptSync

Cheers, Nick.

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

> Posted At: 28 March 2001 15:01
> Posted To: microsoft.public.scripting.vbscript
> Conversation: Logon Script and NT
> Subject: Re: Logon Script and NT

> This works but I would like something else (how times has that been
> said...)Anyway, when this runs Windows continues to login
> without the script
> completing.  I guess I should give a little more explination,
> forgive me if
> this gets boring or too long.  

> The script's first screen is a disclaimer that the user
> agrees to sign their
> life away along with their first born son going into the
> military of a small
> third world country, ok not really but something like "we are
> watching you
> and use this computer for business only."  The user clicks OK
> and continues.
> However the problem is that Windows will actually log them in
> all the way
> before they even click OK and that sort of defeats the
> purpose.  How can I
> get Windows to wait until the script is finished before it
> lets me in.  Thank
> you for your help.



> >Even better (unless you've only got 1 DC) would be to code the batch
> >file thusly:

> >wscript %0\..\Scriptname.vbs

> >This is much more flexible because it pulls the actual logon script
> >from the authenticating server, not just one (potential single
> >point of failure) server, and will work on any client that supports
> >logon scripts (Win9x, WinNT and Win2K).

> >Wayne



> >>In your batch file, it should read like this:
> >>Wscript \\servername\Netlogon\Scriptname.vbs

> >>I know of no other way to pause a batch file, other than
> the pause command
> >>or using a 3rd party command utility to do that. You can
> pause your script
> >>file at any point and even have it execute a seperate batch
> file after it
> >>has completed it's major tasks. So a batch file to run a
> script and that
> >>script to execute another batch file.

> >Standard Disclaimer: I said it, they didn't, so blame me, not them!
> >Spam Avoidance: My reply address is invalid to confuse the spambots.
> >You can reach me at 'Wayne_Tilton at yahoo dot com'

>  -----  Posted via NewsOne.Net: Free (anonymous) Usenet News
> via the Web  -----
>   http://newsone.net/ -- Free reading and anonymous posting
> to 60,000+ groups
>    NewsOne.Net prohibits users from posting spam.  If this or
> other posts
> made through NewsOne.Net violate posting guidelines, email




Sun, 14 Sep 2003 22:34:51 GMT  
 Logon Script and NT
From:

Q185590 - Guide To Windows NT 4.0 Profiles and Policies (Part 5 of 6)
http://support.microsoft.com/support/kb/articles/Q185/5/90.ASP

[...]
Logon Scripts:
Category: Windows NT System
Subcategory: Logon
Selection: Run logon scripts synchronously
Description: Determines whether the shell waits for the logon script to complete or not. If the
value is 0, the logon script is run during the startup of the shell and allows items in the Startup
group to start. If the value is 1, the logon script completes before the shell or any items in the
Startup group are started. If this value is also set in the User section, this value takes
precedence.
Key: HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion \Winlogon

Registry Value Registry Data Description
RunLogonScriptSync REG_SZ Off = 0 or value is removed; On = 1
[...]

--
Michael Harris
Microsoft.MVP.Scripting
--

Please do not email questions - post them to the newsgroup instead.
--



Quote:
> There is a registry entry that will stop the windows shell loading until
> the script has finished.
> Software\Microsoft\Windows NT\CurrentVersion\Winlogon\RunLogonScriptSync

> Cheers, Nick.

> > -----Original Message-----

> > Posted At: 28 March 2001 15:01
> > Posted To: microsoft.public.scripting.vbscript
> > Conversation: Logon Script and NT
> > Subject: Re: Logon Script and NT

> > This works but I would like something else (how times has that been
> > said...)Anyway, when this runs Windows continues to login
> > without the script
> > completing.  I guess I should give a little more explination,
> > forgive me if
> > this gets boring or too long.

> > The script's first screen is a disclaimer that the user
> > agrees to sign their
> > life away along with their first born son going into the
> > military of a small
> > third world country, ok not really but something like "we are
> > watching you
> > and use this computer for business only."  The user clicks OK
> > and continues.
> > However the problem is that Windows will actually log them in
> > all the way
> > before they even click OK and that sort of defeats the
> > purpose.  How can I
> > get Windows to wait until the script is finished before it
> > lets me in.  Thank
> > you for your help.



> > >Even better (unless you've only got 1 DC) would be to code the batch
> > >file thusly:

> > >wscript %0\..\Scriptname.vbs

> > >This is much more flexible because it pulls the actual logon script
> > >from the authenticating server, not just one (potential single
> > >point of failure) server, and will work on any client that supports
> > >logon scripts (Win9x, WinNT and Win2K).

> > >Wayne



> > >>In your batch file, it should read like this:
> > >>Wscript \\servername\Netlogon\Scriptname.vbs

> > >>I know of no other way to pause a batch file, other than
> > the pause command
> > >>or using a 3rd party command utility to do that. You can
> > pause your script
> > >>file at any point and even have it execute a seperate batch
> > file after it
> > >>has completed it's major tasks. So a batch file to run a
> > script and that
> > >>script to execute another batch file.

> > >Standard Disclaimer: I said it, they didn't, so blame me, not them!
> > >Spam Avoidance: My reply address is invalid to confuse the spambots.
> > >You can reach me at 'Wayne_Tilton at yahoo dot com'

> >  -----  Posted via NewsOne.Net: Free (anonymous) Usenet News
> > via the Web  -----
> >   http://newsone.net/ -- Free reading and anonymous posting
> > to 60,000+ groups
> >    NewsOne.Net prohibits users from posting spam.  If this or
> > other posts
> > made through NewsOne.Net violate posting guidelines, email




Mon, 15 Sep 2003 01:07:52 GMT  
 Logon Script and NT
I added the registry key, for the 98 version and it didn't work.  It waited
until windows had loaded and then ran the script when I need the script to
finish before the policies are set.

In article


Quote:
>There is a registry entry that will stop the windows shell loading until
>the script has finished.
>Software\Microsoft\Windows NT\CurrentVersion\Winlogon\RunLogonScriptSync

>Cheers, Nick.

>> -----Original Message-----

>> Posted At: 28 March 2001 15:01
>> Posted To: microsoft.public.scripting.vbscript
>> Conversation: Logon Script and NT
>> Subject: Re: Logon Script and NT

>> This works but I would like something else (how times has that been
>> said...)Anyway, when this runs Windows continues to login
>> without the script
>> completing.  I guess I should give a little more explination,
>> forgive me if
>> this gets boring or too long.  

>> The script's first screen is a disclaimer that the user
>> agrees to sign their
>> life away along with their first born son going into the
>> military of a small
>> third world country, ok not really but something like "we are
>> watching you
>> and use this computer for business only."  The user clicks OK
>> and continues.
>> However the problem is that Windows will actually log them in
>> all the way
>> before they even click OK and that sort of defeats the
>> purpose.  How can I
>> get Windows to wait until the script is finished before it
>> lets me in.  Thank
>> you for your help.



>> >Even better (unless you've only got 1 DC) would be to code the batch
>> >file thusly:

>> >wscript %0\..\Scriptname.vbs

>> >This is much more flexible because it pulls the actual logon script
>> >from the authenticating server, not just one (potential single
>> >point of failure) server, and will work on any client that supports
>> >logon scripts (Win9x, WinNT and Win2K).

>> >Wayne



>> >>In your batch file, it should read like this:
>> >>Wscript \\servername\Netlogon\Scriptname.vbs

>> >>I know of no other way to pause a batch file, other than
>> the pause command
>> >>or using a 3rd party command utility to do that. You can
>> pause your script
>> >>file at any point and even have it execute a seperate batch
>> file after it
>> >>has completed it's major tasks. So a batch file to run a
>> script and that
>> >>script to execute another batch file.

>> >Standard Disclaimer: I said it, they didn't, so blame me, not them!
>> >Spam Avoidance: My reply address is invalid to confuse the spambots.
>> >You can reach me at 'Wayne_Tilton at yahoo dot com'

>>  -----  Posted via NewsOne.Net: Free (anonymous) Usenet News
>> via the Web  -----
>>   http://newsone.net/ -- Free reading and anonymous posting
>> to 60,000+ groups
>>    NewsOne.Net prohibits users from posting spam.  If this or
>> other posts
>> made through NewsOne.Net violate posting guidelines, email


 -----  Posted via NewsOne.Net: Free (anonymous) Usenet News via the Web  -----
  http://newsone.net/ -- Free reading and anonymous posting to 60,000+ groups
   NewsOne.Net prohibits users from posting spam.  If this or other posts



Mon, 15 Sep 2003 02:58:55 GMT  
 Logon Script and NT
That key does not apply to Win9x, only WinNT and Win2K...

--
Michael Harris
Microsoft.MVP.Scripting
--

Please do not email questions - post them to the newsgroup instead.
--

Quote:

> I added the registry key, for the 98 version and it didn't work.  It waited
> until windows had loaded and then ran the script when I need the script to
> finish before the policies are set.

> In article


> >There is a registry entry that will stop the windows shell loading until
> >the script has finished.
> >Software\Microsoft\Windows NT\CurrentVersion\Winlogon\RunLogonScriptSync

> >Cheers, Nick.

> >> -----Original Message-----

> >> Posted At: 28 March 2001 15:01
> >> Posted To: microsoft.public.scripting.vbscript
> >> Conversation: Logon Script and NT
> >> Subject: Re: Logon Script and NT

> >> This works but I would like something else (how times has that been
> >> said...)Anyway, when this runs Windows continues to login
> >> without the script
> >> completing.  I guess I should give a little more explination,
> >> forgive me if
> >> this gets boring or too long.  

> >> The script's first screen is a disclaimer that the user
> >> agrees to sign their
> >> life away along with their first born son going into the
> >> military of a small
> >> third world country, ok not really but something like "we are
> >> watching you
> >> and use this computer for business only."  The user clicks OK
> >> and continues.
> >> However the problem is that Windows will actually log them in
> >> all the way
> >> before they even click OK and that sort of defeats the
> >> purpose.  How can I
> >> get Windows to wait until the script is finished before it
> >> lets me in.  Thank
> >> you for your help.



> >> >Even better (unless you've only got 1 DC) would be to code the batch
> >> >file thusly:

> >> >wscript %0\..\Scriptname.vbs

> >> >This is much more flexible because it pulls the actual logon script
> >> >from the authenticating server, not just one (potential single
> >> >point of failure) server, and will work on any client that supports
> >> >logon scripts (Win9x, WinNT and Win2K).

> >> >Wayne



> >> >>In your batch file, it should read like this:
> >> >>Wscript \\servername\Netlogon\Scriptname.vbs

> >> >>I know of no other way to pause a batch file, other than
> >> the pause command
> >> >>or using a 3rd party command utility to do that. You can
> >> pause your script
> >> >>file at any point and even have it execute a seperate batch
> >> file after it
> >> >>has completed it's major tasks. So a batch file to run a
> >> script and that
> >> >>script to execute another batch file.

> >> >Standard Disclaimer: I said it, they didn't, so blame me, not them!
> >> >Spam Avoidance: My reply address is invalid to confuse the spambots.
> >> >You can reach me at 'Wayne_Tilton at yahoo dot com'

> >>  -----  Posted via NewsOne.Net: Free (anonymous) Usenet News
> >> via the Web  -----
> >>   http://newsone.net/ -- Free reading and anonymous posting
> >> to 60,000+ groups
> >>    NewsOne.Net prohibits users from posting spam.  If this or
> >> other posts
> >> made through NewsOne.Net violate posting guidelines, email

>  -----  Posted via NewsOne.Net: Free (anonymous) Usenet News via the Web  -----
>   http://newsone.net/ -- Free reading and anonymous posting to 60,000+ groups
>    NewsOne.Net prohibits users from posting spam.  If this or other posts




Mon, 15 Sep 2003 06:05:31 GMT  
 
 [ 10 post ] 

 Relevant Pages 

1. Run WSH logon script before NT shell starts?

2. Logon Scripting for NT 4.0 using WSH.... do they work

3. WSH Script in NT Logon Script

4. Writing an NT logon script with VB5

5. NT logon script Error

6. Logon Scripts in VB for NT logons

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

8. Logon Scripts in Windows NT

9. NT 40 Domain Logon Scripts

10. NT logon scripts

11. Sample NT Logon Scripts?

12. Permission Denied in NT 4.0 Logon Script

 

 
Powered by phpBB® Forum Software