|
|
|
Comment about 'Turn Off the Documents Menu'
Friday, March 8, 2002 at 11:23 am Windows 95 Annoyances Discussion Forum
Posted by Derrick Diemont
(1 messages posted)
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\\*.*");
|
Responses to this message:
|
|
All messages in this thread [show all]
 | Comment about 'Turn Off the Documents Menu' (Derrick Diemont: Fri, Mar 8, 2002, 11:23 am) |
| |
| |
Return to the Windows 95 Discussion Forum
|
|
|
|