Logon script not running, help!

M

Marco Bancale

Hi!

I just want a batch file to be runned when a user logins on my pc.
I tried to set the name of the script (test.bat) in Logon Script in
the user properties, but it doesn't run when he logins.
If I run the batch file directly, it works fine (it just opens the
notepad).

I'v already searched through the forums, but I can't figure it out.

Anyway, three important things:
- I have Win2k Professional (not server)
- I am NOT in a LAN, there's ONLY my pc.
- The domain on Win2k is NOT defined (N/D) because I don't need it.

Where do I have to put the script?

I've read in many threads about the MMC, Active Directory, Group
Policy... but I don't have a network, I just want to run a script on
logon... please help me!

Thx!!!

Bye Bye
Marco
 
P

Pegasus \(MVP\)

Defining a logon script in your user profile is possible but not
really appropriate. Use the Task Scheduler instead - it lets you
run jobs at startup time or at logon time.
 
M

Marco Bancale

Thank you Pegasus,

I'll try this at home.
But I need to run different batch files for different users, can I do
it using the Task Scheduler?

Anyway, just for curiosity... where should I put the script if I
wanted to use the Logon Script feature?

Thanks a lot,

Marco
 
P

Pegasus \(MVP\)

For a logon script to execute, it must reside in the "netlogon"
share. Create a suitable directory wherever you like, then create
a share called "netlogon" that points to this directory.
 
P

Pegasus \(MVP\)

If you want to use the Task Scheduler then you can define the
script like so:

c:\Tools\Netlogon.bat

c:\Tools\Netlogon.bat contains these lines:

@echo off
call c:\Tools\%UserName%.bat
(you can add common lines here)

You must, of course, create c:\Tools\%UserName%.bat,
e.g. c:\Tools\Marco.bat.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top