Windows 2000::Setup::Removing Games Automatically-REVISITED
I need to remove the Windows 2000 games automatically for all my domain's workstations
Setup a domain policy restricting users from running the EXE files associated with the games. This will prevent users from playing games even if they manage to reinstall them or copy them to another path or execute them from diskette.
But some bosses don't like elegant workarounds that save IT inordinate amounts of work while at the same time accomplishing more than what their micromanaging minds determine is necessary.
Being required to remove the games (and also do it silently) several sub-problems arise:
1. Most users do not have local administrator permission
2. Window File Protection protects these game files as if they were a vital OS component so you must run an uninstall to remove them or else the files will come back magically. If a BAT file removes them from the DLLCACHE directory in addition to their installed location then users will get a prompt that something tried to alter the system files and prompt them for a CD to remedy the catastrophe.
3. The default view under Control Panel > Add/Remove Programs > Windows Components doesn't even provide the option to remove the games.
Like always, on the way to the real solution I learned a lot of interesting things that *might* have contributed to some resolution that involved custom scripting.
For #2 above, I found that Windows File Protection can be totally disabled. See 2/23 Post
Although I've grow to despise WFP during my "just delete the darn files" stage of research, I doubt that is a good thing. (As I think back a few years to innocently installing Lotus 123v5 for Windows which just overwrites all the DLLs it wants to in C:\WINDOWS\SYSTEM with it's own older versions..... It's been a couple years since I sat down and compared lists of DLL's from working, partially working, and totally screwed up machines...)
Under topic#3 above I learned that under the default location C:\WINNT\INF the file SYSOC.INF can be modifed to remove "HIDE" from components to make them visible in Add/Remove Programs > Windows Components. See my prior post
Searching for resolutions to #1 I found a cool utility at AppDeploy.com which is quickly becoming one of my favorite sites. The tool is RunasPwd and provides a cmdline way to run a program as another user *and* provide the password (Win2K RUNAS won't let you provide the PW.)
I also found that individual items can be uninstalled using cmdlines:
rundll32.exe setupapi.dll,InstallHinfSection FreecellUninstall 132 c:\winnt\inf\games.inf
rundll32.exe setupapi.dll,InstallHinfSection MinesweeperUninstall 132 c:\winnt\inf\games.inf
rundll32.exe setupapi.dll,InstallHinfSection SolitaireUninstall 132 c:\winnt\inf\games.inf
rundll32.exe setupapi.dll,InstallHinfSection PINBALL.Remove 132 c:\winnt\inf\pinball.inf
However WFP would put the files back (grrrrrrr.)
From: MS KB#222444
Will silently run the Windows Components setup using the install script in UNATTEND.TXT which the article kindly tells the reader:
"can be any Windows answer file and only parses the [Components] and [NetOptionalComponents] sections. An example file is shown below: "
and proceeds to give an example in which the arguments are in lower case. It did not work for me until I used upper case like below:
Pinball = OFF
Solitaire = OFF
FreeCell = OFF
Minesweeper = OFF
And when testing this command line, it should be noted that, if you make a mistake, no matter what you have done wrong, you will always get SAME the error message:
Windows 2000 Setup: The application could not be initialized.
To run this on every machine in the system context (as local administrator) a system startup script can be specified in Active Directory and applied to every machine in the domain. Do this by creating the group policy object and then copying the BAT containing the cmdline to some ungodly location like:
After that it's all just fiddling to get it right.
I hope this can help someone avoid all the fun I had along the way.