Annoyances.org
Home » Windows 95 Discussion Forum » Message 1051146785 Search | Help | Home
  
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\\*.*");



Written in response to:
Comment about 'Turn Off the Documents Menu' (Derrick Diemont: Friday, March 8, 2002 at 11:23 am)

There are presently no replies 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)
*re: Comment about 'Turn Off the Documents Menu' (Steve Easton: Fri, Mar 8, 2002, 1:23 pm)
*re: Comment about 'Turn Off the Documents Menu' (Joe: Wed, Apr 23, 2003, 6:13 pm)
Return to the Windows 95 Discussion Forum

All content at Annoyances.org is Copyright © 1995-2008 Creative Elementtm All rights reserved.
Please do not plagiarize; redistributing these pages without permission is strictly prohibited.