Samba domain controller with PC logoff scripts

Hello all,

I have setup a samba domain controller, all machines attached to the domain are XP and vista machines. I was wondering what the most efficient way to run a log-off script would be.

Is it best to go to the GPO and edit the log-off setting computer by computer, or would there be a more elegant technique, such as copying and running a registry value, which the computer would execute.

With the registry settings I have no idea where I need to place the reg file.
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

What do you want the log off script to do, exactly?
blowflyAuthor Commented:
When the user logs off, I want the users .PST files (Outlook address books)  to be copied to a server.
Option Explicit

Dim objFSO, objFileCopy
Dim strFilePath, strDestination

strFilePath = "<server>\<share>\<folder>\file.pst"
strDestination =""<server>\<share>\<folder>\file.pst"

Set objFSO = CreateObject("Scripting.FileSystemObject")

Set objFileCopy = objFSO.GetFile(strFilePath)
' Copy the file to its destination
objFileCopy.Copy (strDestination)
WSCript.Echo "Copied to " & strDestination

Script the above - in a .vbs
so - run cscript.exe script.vbs , and add this into the log off scripts of the GPO (run the cscript.exe from a batch file - making sure that the .vbs and .bat are in the same folder and the Authenticated Users group has read and execute permissions)

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Thank you - hope the script was useful.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Legacy OS

From novice to tech pro — start learning today.