re: Comment about 'Turn Off the Documents Menu'
Wednesday, April 23, 2003 at 6:13 pm Windows 95 Annoyances Discussion Forum
Posted by Joe
(1 messages posted)
Hi there,
for using that script on an english Win XP just the 4th line should be modified.
The script then is:
var fso, f, fc, fso2;
fso = new ActiveXObject("Scripting.FileSystemObject");
fso2 = new ActiveXObject("Scripting.FileSystemObject");
f = fso.GetFolder("c:\\Documents and Settings");
fc = new Enumerator(f.SubFolders);
for (; !fc.atEnd(); fc.moveNext())
{
if (fso2.FolderExists(fc.item() + "\\Recent"))
fso2.DeleteFile(fc.item() + "\\Recent\\*.*");
if (fso2.FolderExists(fc.item() + "\\Application Data\\Microsoft\\Office\\Recent"))
fso2.DeleteFile(fc.item() + "\\Application Data\\Microsoft\\Office\\Recent\\*.*");
}
if (fso2.FolderExists("c:\\windows\\Recent"))
fso2.DeleteFile("c:\\windows\\Recent\\*.*");
I´m running it on an english Win XP Pro SP1 and it´s running fine :-)
Joe
On Friday, March 8, 2002 at 11:23 am, Derrick Diemont wrote:
>Note that the Registry Edit Presented here only seems to run on Win98 and up machines...
> not win95...
>
>I have written the following javascript that can be run using the Windows Scripting
>Agent "WScript.exe" It will recursively go through the profiles directory and delete
>all of the files in each of the recent directories (For both the Documents in the
>startmenu and the Recently Used Files in the Office Programs)... ust copy the text
>below into notepad and save as "whatever_you_want_to_call_it.js" and it can be
run
>by either (a) double clicking it or (b) running "c:\windows\wscript.exe whatever_you_want_to_call_it.js"
>from the command line... If you want to understand how this is working go to http:\\msdn.microsoft.com\
>and search for Windows Scripting Host for info on how Wscript runs. You can also
>download the Windows Scripting host from here too if you don't have it. I have
posted
>this because the batch file that is on this page does not handle the instance where
>you have multiple profiles on a PC. If you decide to use this you are using it
at
>your own risk... I believe it to be work correctly, but don't be e-mailing me if
>you can't get it to work. thanks and enjoy...
>
>var fso, f, fc, fso2;
>fso = new ActiveXObject("Scripting.FileSystemObject");
>fso2 = new ActiveXObject("Scripting.FileSystemObject");
>f = fso.GetFolder("c:\\windows\\profiles");
>fc = new Enumerator(f.SubFolders);
>for (; !fc.atEnd(); fc.moveNext())
>{
> if (fso2.FolderExists(fc.item() + "\\Recent"))
> fso2.DeleteFile(fc.item() + "\\Recent\\*.*");
> if (fso2.FolderExists(fc.item() + "\\Application Data\\Microsoft\\Office\\Recent"))
> fso2.DeleteFile(fc.item() + "\\Application Data\\Microsoft\\Office\\Recent\\*.*");
>}
> if (fso2.FolderExists("c:\\windows\\Recent"))
> fso2.DeleteFile("c:\\windows\\Recent\\*.*");
|