#108781 - 2003-11-23 12:30 PM
ClearHistory Script
|
NTDOC
Administrator
   
Registered: 2000-07-28
Posts: 11631
Loc: CA
|
Here is a script to clear your MRU and other history lists if you share a computer with someone else and you don't want them opening the documents you just opened.
Code:
Debug Off
Break On
Dim $iRC
$iRC=setoption('Explicit','on')
$iRC=setoption('NoVarsInStrings','on')
$iRC=setoption('WrapAtEOL','on')
ClearHistory
Function ClearHistory()
Dim $HKCUSMWCVESF,$HKLMSMWCVESF,$HKCUSMWCV,$HKLMSMWCV,$HKCUSM,$HKLMSM,$HKUDSM,
$,$CURecent,$CUCAD,$LMCAD,$DivxData,$DivxLog,$DivxPath,$WL,$AK,$Msngr01,$Msngr02,
$Key00,$Key01,$Key02,$Key03,$Key04,$Key05,$Key06,$Key07,$Key08,$Key09,
$Key10,$Key11,$Key12,$Key13,$Key14,$Key15,$Key16,$Key17,$Key18,$Key19,
$Key20,$Key21,$Key22,$Key23,$Key24,$Key25,$Key26
$HKCUSMWCVESF = 'HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders'
$HKLMSMWCVESF = 'HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders'
$HKCUSMWCV = 'HKCU\Software\Microsoft\Windows\CurrentVersion'
$HKLMSMWCV = 'HKLM\Software\Microsoft\Windows\CurrentVersion'
$HKCUSM = 'HKCU\Software\Microsoft'
$HKLMSM = 'HKLM\Software\Microsoft'
$HKUDSM = 'HKU\.DEFAULT\Software\Microsoft'
$Msngr01 = WriteValue('$HKCUSM\MSNMessenger','AppSettings', 22020000,'REG_BINARY')
$Msngr02 = WriteValue('$HKCUSM\MSNMessenger','PassportBalloon', 0A000000,'REG_BINARY')
$DivxPath = ReadValue('HKLM\SOFTWARE\DivXNetworks\DivX Player', 'InstallDir')
$DivxLog = 'DivXPlayer2.dbf'
$CURecent = ReadValue($HKCUSMWCVESF,'Recent')
$CUCAD = ReadValue($HKCUSMWCVESF, 'AppData')
$LMCAD = ReadValue($HKLMSMWCVESF, 'Common AppData')
$Key00 = $HKCUSMWCV + '\Applets\Regedit'
$Key01 = $HKCUSMWCV + '\Explorer\ComDlg32\LastVisitedMRU'
$Key02 = $HKCUSMWCV + '\Explorer\ComDlg32\OpenSaveMRU'
$Key03 = $HKCUSMWCV + '\Explorer\RunMRU'
$Key04 = $HKCUSMWCV + '\Explorer\UserAssist\{5E6AB780-7743-11CF-A12B-00AA004AE837}\Count'
$Key05 = $HKCUSMWCV + '\Explorer\UserAssist\{75048700-EF1F-11D0-9888-006097DEACF9}\Count'
$Key06 = $HKCUSMWCV + '\Explorer\StreamMRU'
$Key07 = $HKCUSMWCV + '\Applets\Wordpad\Recent File List'
$Key09 = $HKUDSM + '\Windows\CurrentVersion\Explorer\ComDlg32\LastVisitedMRU'
$Key10 = $HKUDSM + '\Windows\CurrentVersion\Explorer\ComDlg32\OpenSaveMRU'
$Key11 = $HKUDSM + '\Windows\CurrentVersion\Explorer\RunMRU'
$Key12 = $HKCUSM + '\Internet Explorer\TypedURLs'
$Key13 = $HKCUSM + '\MediaPlayer\Player\RecentFileList'
$Key14 = $HKCUSM + '\Search Assistant\ACMru'
$Key15 = 'HKCU\Software\Nico Mak Computing\WinZip\filemenu'
$Key16 = 'HKCU\Software\RealNetworks\RealPlayer\6.0\Preferences\MostRecentClips1'
$Key17 = 'HKCU\Software\RealNetworks\RealPlayer\6.0\Preferences\MostRecentClips2'
$Key18 = 'HKCU\Software\RealNetworks\RealPlayer\6.0\Preferences\MostRecentClips3'
$Key19 = 'HKCU\Software\RealNetworks\RealPlayer\6.0\Preferences\MostRecentClips4'
$Key20 = 'HKCU\Software\RealNetworks\RealPlayer\6.0\Preferences\MostRecentClips5'
$Key21 = 'HKCU\Software\RealNetworks\RealPlayer\6.0\Preferences\MostRecentClips6'
$Key22 = 'HKCU\Software\RealNetworks\RealPlayer\6.0\Preferences\MostRecentClips7'
$Key23 = 'HKCU\Software\RealNetworks\RealPlayer\6.0\Preferences\MostRecentClips8'
$Key24 = 'HKCU\Software\RealNetworks\RealPlayer\6.0\Preferences\LastOpenFileDir'
$Key25 = 'HKCU\Software\WinRAR\DialogEditHistory\ExtrPath'
$Key26 = 'HKCU\Software\WinRAR\ArcHistory'
$ = WriteValue($Key00,'LastKey','','REG_SZ')
$ = WriteValue($HKCUSM + '\MediaPlayer\Preferences', 'LastPlaylist', 00, 'REG_BINARY')
$ = WriteValue($HKCUSM + '\MediaPlayer\Preferences', 'DisableMRU', 01, 'REG_DWORD')
$ = WriteValue($HKCUSM + '\MediaPlayer\Preferences', 'LastPlaylistIndex', 00, 'REG_DWORD')
$ = WriteValue($HKCUSM + '\MediaPlayer\Preferences', 'LastPlaylistQuery', '', 'REG_SZ')
$ = WriteValue($HKCUSM + '\MediaPlayer\Preferences', 'UsageTracking', 00, 'REG_DWORD')
$ = WriteValue($HKCUSM + '\Office\10.0\Common\Internet', 'UseRWHlinkNavigation','','REG_SZ')
$ = WriteValue($HKCUSM + '\Office\10.0\Word\Data', 'Settings', 00, 'REG_BINARY')
$ = WriteValue($HKCUSM + '\Office\10.0\PowerPoint\RecentFolderList', 'MultimediaDir', '', 'REG_SZ')
$ = WriteValue($HKCUSM + '\Office\10.0\PowerPoint\RecentFolderList', 'SoundDir', '', 'REG_SZ')
If Exist($DivxPath + '\' + $DivxLog) Del $DivxPath + '\' + $DivxLog EndIf
$DivxData = '4uDa6O1DG0hEwP4qY-QWtmE3SLAWhTn2zzgAe8XJqWKEPVu_bJysd87SUy4by2JZfulI_2Cqh1YYXHe1DM9iJe_Z'
+ 'B4iiHd7QyBySRurIP93hz2c21NJPmxq197tlfFpii8i07f8JzD9sGhaA1Y6n-5d_4t3vZuyYCD9z6cewLymyTlWJl'
+ 'hiKRIWqZeEr_Mxj5En3FetMFgmYzDCWQelNA3EpjGgB8FTOKiEMbqaKmMdq2VzbyOVFn4BbUtD-KFP_U33K9jdJRF'
+ 'FwtiDtVYawCTWhd0_r8Da51eO8WsfO2KvrHCJT_2p-pNdbuqTXmMYhK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vazs8zsmhbtkLQqfAiFeQpAEfgUC0KX_2-FmfvRD4v'
+ 'bRGWTNhcf30ZAxMl2PMTUbd9Dbcpx8lQwJwZvu7f0KaJiZVbzr8uUVFjbFL4pAXGBm6ePgEepRwiV2CKuOrrtrlm8ezNS'
+ 'DAezILA9oVTnBYWy_KXu4TFkymjx1spOCzMGEDw4914bMGiSc62FkE3tHEKsceyTbdE1nGyNv53PGML5pqrYJNjIyIFj-'
+ 'XxQZ9m08sorS2kAyb9rubl0qChb4jq377C1IWtHynnts8jEf4ZPUX1oDOXpGMrsrrwocnVBeS4txg_sP-Bufwg='
$WL = Open(1, $DivxPath + '\' + $DivxLog,5) $WL = WriteLine(1,$DivxData) $WL = Close(1)
If Exist($CURecent + '\*.lnk') Del $CURecent + '\*.lnk' EndIf
If Exist($LMCAD + '\Microsoft\Media Player\*.DB') Del $LMCAD + '\Microsoft\Media Player\*.DB' EndIf
If Exist($CUCAD + '\Microsoft\Media Player\*.WPL') Del $CUCAD + '\Microsoft\Media Player\*.WPL' EndIf
If KeyExist($Key01) $ = DelKey($Key01) EndIf If KeyExist($Key02) $ = DelKey($Key02) EndIf
If KeyExist($Key03) $ = DelKey($Key03) EndIf If KeyExist($Key04) $ = DelKey($Key04) EndIf
If KeyExist($Key05) $ = DelKey($Key05) EndIf If KeyExist($Key06) $ = DelKey($Key06) EndIf
If KeyExist($Key07) $ = DelKey($Key07) EndIf If KeyExist($Key08) $ = DelKey($Key08) EndIf
If KeyExist($Key09) $ = DelKey($Key09) EndIf If KeyExist($Key10) $ = DelKey($Key10) EndIf
If KeyExist($Key11) $ = DelKey($Key11) EndIf If KeyExist($Key12) $ = DelKey($Key12) EndIf
If KeyExist($Key13) $ = DelKey($Key13) EndIf If KeyExist($Key14) $ = DelKey($Key14) EndIf
If KeyExist($Key15) $ = DelKey($Key15) EndIf If KeyExist($Key16) $ = DelKey($Key16) EndIf
If KeyExist($Key17) $ = DelKey($Key17) EndIf If KeyExist($Key18) $ = DelKey($Key18) EndIf
If KeyExist($Key19) $ = DelKey($Key19) EndIf If KeyExist($Key20) $ = DelKey($Key20) EndIf
If KeyExist($Key21) $ = DelKey($Key21) EndIf If KeyExist($Key22) $ = DelKey($Key22) EndIf
If KeyExist($Key23) $ = DelKey($Key23) EndIf If KeyExist($Key24) $ = DelKey($Key24) EndIf
If KeyExist($Key25) $ = DelKey($Key25) EndIf If KeyExist($Key26) $ = DelKey($Key26) EndIf
$AK = AddKey($Key01) $AK = AddKey($Key02) $AK = AddKey($Key03) $AK = AddKey($Key04) $AK = AddKey($Key05)
$AK = AddKey($Key06) $AK = AddKey($Key07) $AK = AddKey($Key08) $AK = AddKey($Key09) $AK = AddKey($Key10)
$AK = AddKey($Key11) $AK = AddKey($Key12) $AK = AddKey($Key13) $AK = AddKey($Key14) $AK = AddKey($Key15)
$AK = AddKey($Key16) $AK = AddKey($Key17) $AK = AddKey($Key18) $AK = AddKey($Key19) $AK = AddKey($Key20)
$AK = AddKey($Key21) $AK = AddKey($Key22) $AK = AddKey($Key23) $AK = AddKey($Key24) $AK = AddKey($Key25)
$AK = AddKey($Key26) $AK = AddKey($Key26)
EndFunction
Edited by NTDOC (2003-11-23 10:37 PM)
|
|
Top
|
|
|
|
#108782 - 2003-11-23 01:49 PM
Re: ClearHistory Script
|
Radimus
Moderator
   
Registered: 2000-01-06
Posts: 5187
Loc: Tampa, FL
|
this would be useful for prepping a sysprep image...
if you could throw in empty the recycle bin, delecting contents of %temp% and C:\temp, and possibly turn off 'Show hidden folders' and turn off 'Show System files'
|
|
Top
|
|
|
|
#108784 - 2003-11-23 07:16 PM
Re: ClearHistory Script
|
NTDOC
Administrator
   
Registered: 2000-07-28
Posts: 11631
Loc: CA
|
Hmmm... yeah, but that's not KiX Les. 
Actually this was written for Windows 2000, just ran it on XP and it really pissed off some Internet apps. I need to review this and see what's going on with XP running it.
|
|
Top
|
|
|
|
#108786 - 2003-11-23 10:08 PM
Re: ClearHistory Script
|
Radimus
Moderator
   
Registered: 2000-01-06
Posts: 5187
Loc: Tampa, FL
|
I'd also like it to do the .Default profile
|
|
Top
|
|
|
|
Moderator: Glenn Barnas, NTDOC, Arend_, Jochen, Radimus, Allen, ShaneEP, Ruud van Velsen, Mart
|
0 registered
and 293 anonymous users online.
|
|
|