Microsoft Knowledge Base Email Alertz

(203492) - This article describes how to prevent GAMES from appearing under Accessories in the Control Panel's Add/Remove Programs. Accessories is on the Windows Setup tab in Add/Remove Programs.

Search KbAlertz

Advanced Search

Receive Microsoft Knowledge Base articles by E-Mail?

Every night we scan the Microsoft Knowledge Base. If technologies you're interested in are updated, we'll send you an e-mail. You only get one e-mail a day, and only when new articles are added.

Click here to create a
FREE account
Already have an account?
[Click here to Login]











Microsoft Knowledge Base Article

This article contents is Microsoft Copyrighted material.
©2005-©2007 Microsoft Corporation. All rights reserved. Terms of Use | Trademarks

Article ID: 203492 - Last Review: February 12, 2007 - Revision: 1.4

How To Remove Games from Windows Setup, Add Remove Programs

System TipThis article applies to a different version of Windows than the one you are using. Content in this article may not be relevant to you. Visit the Windows Vista Solution Center
This article was previously published under Q203492

On This Page

SUMMARY

This article describes how to prevent GAMES from appearing under Accessories in the Control Panel's Add/Remove Programs. Accessories is on the Windows Setup tab in Add/Remove Programs.

MORE INFORMATION

To remove the option for GAMES under Add/Remove Programs, rename the section [GAMES] to [NOGAMES]:
  • For Windows 95 the file to modify is Windows\Inf\Applets.inf
  • For Windows 98 the file to modify is WINDOWS\Inf\Appletpp.inf
Administrators can automate the process by adding a line similar to the following in the login script:
Cscript \\<server>\<share>\NOGAMES.VBS //T:5 //B
				
Where <server> is the name of the server and <share> is the name of the share. //T:5 Terminates the script after five seconds if it is still running. //B Tells the script to run in non-interactive mode.

Sample Code

The NoGames.vbs sample below automatically renames the section to NOGAMES.

NOTE: Windows Script Host (WSH) must be installed on a Windows 95 machine to run VBScript. For more information on WSH and how to install it please visit the Scripting Web site on the MSDN Scripting site (http://msdn.microsoft.com/scripting) . Using a text editor, create a VBScript file called NoGames.vbs with the following lines:
' NOGAMES.VBS removes games from Add/Remove under Windows setup
' Windows 95 requires Windows Script Host to run the script.
' Windows Script Host is built into Windows 98

Const ForReading = 1, ForWriting = 2, ForAppending = 8

'*** The following 3 lines get the path of the INF folder
Set WSHShell = WScript.CreateObject("WScript.Shell")
Set WshSysEnv = WshShell.Environment("PROCESS")
INFfolder = WshSysEnv("WINDIR") & "\INF"  

'*** The applet function returns the name of the INF
'*** that has the game section based on Windows version.
Function Applet()
  WinVerPath = _
  "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\VersionNumber"
  On Error Resume Next
  WinVer = WSHShell.RegRead(WinVerPath)
  If WinVer = "4.00.950" then
    Applet = INFfolder & "\APPLETS"  'Win95 or Win95a
  ElseIf WinVer = "4.00.1111" then
    Applet = INFfolder & "\APPLETS"  'Win95b or Win95c
  ElseIf WinVer = "4.10.1998" then
    Applet = INFfolder & "\APPLETPP" 'Win98
  ElseIf WinVer = "4.10.2222" then   
    Applet = INFfolder & "\APPLETPP" 'Win98 Second Edition
  Else
    WScript.Quit        'Unknown version exit script
  End If
End Function

'*** The following section copies the file to be modified
'*** to *.bak then recreates the original file with [nogames]
Set fs = CreateObject("Scripting.FileSystemObject")
File1 = Applet() & ".INF"   'path and file with [games]
File2 = Applet() & ".BAK"   'name of backup file.
fs.copyfile file1, file2    'copy file1 to file2
Set A = fs.OpenTextFile(File2, ForReading, False)
Set b = fs.CreateTextFile(File1, True)
Do While a.AtEndOfStream <> True    
  textline = a.ReadLine    
  if StrComp(trim(textline), "[GAMES]", vbTextCompare)=0 then
    textline ="[NOGAMES]"
  end if
  b.WriteLine textline
Loop
a.Close
b.Close
				
For additional information about how to determine which folder Windows is installed in, click the article number below to view the article in the Microsoft Knowledge Base:
305792  (http://kbalertz.com/Feedback.aspx?kbNumber=305792/EN-US/ ) How to Determine Which Folder Windows Is Installed In

REFERENCES

For additional information on scripting, and the Windows Script Host, see the MSDN Scripting site (http://msdn.microsoft.com/scripting) .

APPLIES TO
  • Microsoft Windows 95
  • Microsoft Windows 98 Standard Edition
  • Microsoft Windows 98 Second Edition
Keywords: 
kbhowto KB203492
       

Community Feedback System

Very often, it takes hours to solve a problem. Very often, you've looked high and low, and have tried a lot of solutions. When you finally found it, chances are, it was because someone else helped you. Here's your chance to give back. Use our community feedback tool to let others know what worked for you and what didn't.

Please also understand that the community feedback system is not warranted to be correct, it's simply a system that we've built to let people try and help each other. If something in a feedback response doesn't make sense to you, or you're not comfortable making changes that the feedback talks about (like registry edits), please consult a professional.

Thank you for using kbAlertz.com Feedback System.

-- Scott Cate

Anonymous User Report As Irrelevant  
Written: 7/7/2004 9:19 AM
I have two O/S (window 98 and window xp) stored in the hard drive. After powered on the PC, window displayed 'window 98' and 'windpw xp' for selection. How do I get rid of one of the O/S without reformat the hard dirve?