Windows Scripting & Policies

For those of you familiar with windows 2000 policies...
Windows 2000 allows you to use the gpedit utility to create a policy which will run a set of scripts at various times(Logon, logoff, startup, shutdown, etc). I would like to be able to setup a logon script to run when you login to the system and also a logoff script which will run when you log out of the system.

The problem I am having, is that I can only seem to get these scripts to work if I Manually create the policies by going through the gpedit tool that windows provides for this purpose. My goal is to be able to write a batch file script that will create these policies on the system without forcing the user to do it with gpedit.

I have been messing around with registry logon keys so far, and haven't been able to make it work.

Can someone help me out here?

I would assume that it would be a fairly common practice for a system programmer to want to run some scripts at logon time and logoff time...is there a better way to do this than through policies?
[1072 byte] By [partyman66] at [2007-11-19 1:55:30]