We help IT Professionals succeed at work.

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.
Comment
Watch Question

What do you want the log off script to do, exactly?

Author

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
Wscript.Quit


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)
Thank you - hope the script was useful.

Explore More ContentExplore courses, solutions, and other research materials related to this topic.