Want to run a batch file invisibly

  • Thread starter Thread starter Harrison Midkiff
  • Start date Start date
H

Harrison Midkiff

Hello:

I have a batch file that I want to run on all my users workstations every
they logon. When the batch file runs it takes about 30 seconds to finish.
I would like to run the batch file invisibly and have it so it does not slow
down the computer. I tried toying around with the User
Configuration\Administrative Templates\System\Logon/Logoff polices but it
didn't seem to work. I tried:

Run logon scripts visible Disabled
Run logon scripts synchronously Enable

Does anyone know how I can speed this up this and hide the batch file so the
user does not see it?

Harrison Midkiff
 
If you use the user login script feature of Group Policy (rather than
placing it in each user's profile settings), it will run invisibly.

Oli
 
Hi Harrison ,

As Oli has suggested, I believe logon script is the better choice.You can
assign a logon script to an individual user account when you type the path
to the logon script file in the Login script box of the Profile tab in the
UserName Properties dialog box in Computer Management. When a user logs on
and a path to the logon script for the user account appears, the server
locates and runs the script.

You can also use the Group Policy to assign a logon/logoff,
startup/shutdown script to all the accounts contained in an OU. Therefore,
the batch file will sliently run after the user logon to the computer.

For the concept of Logon, Logoff, Startup, and Shutdown script, please
refer to the following article:

Overview of Logon, Logoff, Startup, and Shutdown Scripts in Windows 2000
http://support.microsoft.com/default.aspx?scid=kb;en-us;198642

The detailed steps how to use logon script in group policy is addressed in
the following article:

How to assign scripts in Windows 2000
http://support.microsoft.com/kb/322241/EN-US/#2

Any update, let us get in touch!

Best regards,

Rebecca Chen

MCSE2000 MCDBA CCNA


Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security

=====================================================

When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.

=====================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
 
Something I wasn't clear about (for my own edification)... the login script
in group policy runs just once, or does it run every time the user logs in?

Ken
 
Something I wasn’t clear about (for my own edification)... the
login script in group policy runs just once, or does it run every time
the user logs in?

It is a logon script so it runs everytime a user logs in. A startup
script runs when a computer starts up.

Cheers,

Lara
 
Rebecca:

Thanks for replying to my post.

I tried using a startup script to execute my batch file. When the file
launched on my W2K Pro computers it hung the computer for about 10 minutes
before they could get to there desktops. XP computers seemed fine. Even
when I move the batch file to logon it still took 10 minutes to apply. I
can run the batch file on the computer directly and it only takes about 10
seconds to execute which is acceptable.

Do you have any ideas of what might be going on or know of a way to have
this batch file apply in back ground so not to effect the logon time?
Thanks

Harrison Midkiff
 
Harrison,

Is there any possibility you could copy and paste the batch file to the
thread? That way we may be able to get an idea of why it runs slowly when
launched from a login script.

Oli
 
More info....

Looks like it was only old slow machines which were having the problem. I
made a change to help it run a little faster. Seems to be running fine
now....

Thanks for your help.

Harrison Midkiff
 
Hi Harrison ,

You are weclome!


Glad to hear you have found the cause, yes, it will take long time to run
the script on a machine with low performance. :)

Any update, let us get in touch!

Best regards,

Rebecca Chen

MCSE2000 MCDBA CCNA


Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security

=====================================================

When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.

=====================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
 
Back
Top