Cleaning up Windows 2k at logoff
Results 1 to 3 of 3

Thread: Cleaning up Windows 2k at logoff

  1. #1
    Junior Member
    Join Date
    Nov 2002
    Posts
    2

    Cleaning up Windows 2k at logoff

    I have been digging around for a while to find ways to automate cleaning up a user session of win 2k to hide opened files and wipe cache at logoff. I would love to hear any suggestions on how to do it better. Here is what I have so far.:

    First, add this to the registry(create text file, paste, save as .reg, double click):
    ----------------------------------

    Windows Registry Editor Version 5.00

    [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer]
    "NoDriveTypeAutoRun"=dword:00000095
    "NoRecentDocsHistory"=hex:01,00,00,00
    ---------------------------------------------------------

    That prevents office MRU and Documents on the start menu from showing anything as well as in office progs.

    Next create a Batch file to run eraser and to clean some registry settings using a script:

    BATCH:
    ----------------------------------
    cd c:\Documents and Settings\[USERNAME]
    c:\progra~1\eraser\eraserd -folder Cookies -subfolders -keepfolder -passes 7
    c:\progra~1\eraser\eraserd -folder Locals~1\temp -subfolders -keepfolder -passes 7
    c:\progra~1\eraser\eraserd -folder Locals~1\Tempor~1 -subfolders -keepfolder -passes 7
    c:\progra~1\eraser\eraserd -folder Recent -subfolders -keepfolder -passes 7
    c:\progra~1\eraser\eraserd -folder UserData -subfolders -keepfolder -passes 7
    c:\progra~1\eraser\eraserd -folder Micros~1\Office\Recent -subfolders -keepfolder -passes 7
    c:\delMRUs.vbs
    ----------------------------------------


    The delMRUs.vbs:
    ----------------------------------
    'MRU Cleaner

    RegKey = "HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Explorer Bars\{C4EE31F3-4768-11D2-BE5C-00A0C9A83DA1}\ContainingTextMRU\"

    DelKey()

    RegKey = "HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Explorer Bars\{C4EE31F3-4768-11D2-BE5C-00A0C9A83DA1}\FilesNamedMRU\"

    DelKey()

    RegKey = "HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\TypedURLs\"

    DelKey()

    RegKey = "HKEY_CURRENT_USER\Software\Microsoft\Microsoft Management Console\Recent File List\"

    DelKey()

    RegKey = "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\ComDlg32\LastVisitedMRU\"

    DelKey()

    RegKey = "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\ComDlg32\OpenSaveMRU\"

    DelKey()

    RegKey = "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\CopyMoveTo\"

    DelKey()

    RegKey = "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\DesktopStreamMRU\"

    DelKey()

    RegKey = "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\"

    DelKey()

    RegKey = "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\RecentDocs\"

    DelKey()

    RegKey = "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\RunMRU\"

    DelKey()

    RegKey = "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\StreamMRU\"

    DelKey()

    RegKey = "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Streams\"

    DelKey()

    RegKey = "HKEY_CURRENT_USER\SOFTWARE\Microsoft\MediaPlayer\Player\RecentFileList\"

    DelKey()

    WScript.Quit() ' All Done

    Sub DelKey()
    Dim WSHShell
    Set WSHShell = CreateObject("WScript.Shell")
    On Error Resume Next
    WshShell.RegDelete RegKey
    On Error GoTo 0
    End Sub

    ---------------------------------


    Put the batch and the script in the c: root and add the batch to the system policy for logoff script and voila! Of course you have to have eraser and may need to change paths for your own config.

    Cheers!

  2. #2
    AO übergeek phishphreek's Avatar
    Join Date
    Jan 2002
    Posts
    4,325
    I use a freeware program called Xteq (for personal use... commercial costs $) available at http://www.xteq.com.

    It basically does everything you have posted and a whole lot more.
    It has a lot of cool plug-ins and you can run the "update" to get the latest tweaks.

    This program is good for people who don't like messing with the registry.

    I like to poke around in there (the registry) from time to time and feel pretty comfortabe with it but am not an expert.

    Thanks for the tips!
    Quitmzilla is a firefox extension that gives you stats on how long you have quit smoking, how much money you\'ve saved, how much you haven\'t smoked and recent milestones. Very helpful for people who quit smoking and used to smoke at their computers... Helps out with the urges.

  3. #3
    Senior Member faust's Avatar
    Join Date
    Oct 2001
    Location
    Chicagoland/Murphysboro
    Posts
    105
    i use the group policy editor, gpedit.msc, it allows you to do most of the registry settings for all users. Also you can use templates and such to make it easier

    http://www.microsoft.com/technet/tre...to/grpolwt.asp
    The gene pool has no life guard!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •