#189969 - 2008-10-01 04:50 PM
SCRIPT TO DELETE GAMES - Solitaire and the like
|
UhOh
Just in Town
Registered: 2007-07-17
Posts: 3
|
I've been tasked to remove all those old games that came with windows from all 7,000 hard drives in our environment. You know, solitaire, Freecell etc....
I've ran an SMS report that gives path's to all the exe's..... Folks have them peppered all over their hard drives....
What do the fine folks here on the forum think about a simple file ran from root "del sol.exe /s" script? This seem a little dangerous too?? But then it would have to be ran again for freecell and the others.... This would pull a lot of system resources. I can hear my clients calling the helpdesk already
I'm really not concerned about uninstalling the games just deleting the *.exe's
Surely there is a nice kix script already designed to do just this?
Any help would be greatly appreciated!!
|
|
Top
|
|
|
|
#190017 - 2008-10-03 10:37 PM
Re: SCRIPT TO DELETE GAMES - Solitaire and the like
[Re: NTDOC]
|
UhOh
Just in Town
Registered: 2007-07-17
Posts: 3
|
Hello all thanks for the replies,
Here is something I got from another admin off the military forum. This seem to work locally haven't pushed it via SMS yet but will soon. I know, I know, it's not a kix script. VBS is below:
DIM WSHShell: Set WSHShell = CreateObject("WScript.Shell") DIM Computer: Computer = WSHShell.ExpandEnvironmentStrings("%COMPUTERNAME%") Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
Set colFiles = objWMIService.ExecQuery _ ("Select * from CIM_DataFile Where Extension = 'exe' AND (FileName = 'sol' OR FileName = 'blah' OR FileName = 'stuff')")
For Each objFile in colFiles objFile.Delete Next
|
|
Top
|
|
|
|
#190113 - 2008-10-13 09:09 PM
Re: SCRIPT TO DELETE GAMES - Solitaire and the like
[Re: Björn]
|
Kdyer
KiX Supporter
   
Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
|
If memory serves, there is a FAQ that was created to do this. However, I am with the school of thought that this is better served under a GPO.
You maybe able to leverage information here: http://www.gpanswers.com
Thanks,
Kent
|
|
Top
|
|
|
|
#190120 - 2008-10-14 06:19 PM
Re: SCRIPT TO DELETE GAMES - Solitaire and the like
[Re: Kdyer]
|
Reese_G
Just in Town
Registered: 2005-04-18
Posts: 1
|
I am in a similar boat.
While I agree that GPO is the way to go, not everyone has it available. I just inherited a network of 800 pc's. Every user has admin rights, the domain is not controlled by me and I have no rights to manage it. The inmates are truly running the asylum here. I was hired to fix all this but it will be a long road.
I do have access and control over the login script. this is my best avenue for making and controlling changes.
for me it is "peggle.exe" and others from PopCap. I think some of the above script techniques will work.
I would like to take it a bit farther and leave the directory and registry entries there but empty and restrict permission on them so they can't be written to ever again.
Is CACLS the best choice for doing that?
|
|
Top
|
|
|
|
#190183 - 2008-10-20 09:37 PM
Re: SCRIPT TO DELETE GAMES - Solitaire and the like
[Re: Mart]
|
UhOh
Just in Town
Registered: 2007-07-17
Posts: 3
|
AN UPDATE: Thanks to all who replied. THIS IS NO EASY TASK!!!!.
What I've done is use the WMI script above. That eliminates some of the games. But I'm thinking some are protected via WFP. So I used the INF uninstall process. These 2 processes have eleminated a LARGE % of the games. I will now use the SMS web report. to snag common paths and then delete those that are found via a KIX script......
NTDOC, I wish we had a lot of folks to help out here but there are only 3 of us. Of the other 2, 1 is a sharepoint admin, the other is a MOM admin and WEB server guy, so they are VERY busy..... The Army is running on a tight budget.
|
|
Top
|
|
|
|
#190184 - 2008-10-20 10:07 PM
Re: SCRIPT TO DELETE GAMES - Solitaire and the like
[Re: UhOh]
|
NTDOC
Administrator
   
Registered: 2000-07-28
Posts: 11631
Loc: CA
|
LOL - Well sorry about that. Thought my Tax dollars were going to better use. Guess it got funneled into the Big Investment Company buyouts 
Okay, well I'm finishing up some other projects and another site I Moderate on I'm trying to finish up some tasks. Hopefully that will free up some time and I'll take a further look at this for you.
Cheers
|
|
Top
|
|
|
|
#190193 - 2008-10-21 02:26 AM
Re: SCRIPT TO DELETE GAMES - Solitaire and the like
[Re: Lonkero]
|
NTDOC
Administrator
   
Registered: 2000-07-28
Posts: 11631
Loc: CA
|
Because Sharepoint is a piece of junk 
I suppose a lot would depend on how many sites and users there are.
|
|
Top
|
|
|
|
#190267 - 2008-10-23 10:22 AM
Re: SCRIPT TO DELETE GAMES - Solitaire and the like
[Re: NTDOC]
|
Shaun_Hill
Getting the hang of it
Registered: 2004-11-15
Posts: 50
Loc: JHB, South Africa
|
If you try delete games in the windows directory they will just reappear a few seconds later. I remember creating a script to do this but you could not do it by deleting the files. As a test go and delete sol.exe and watch how quickly it returns.
I suggest you use sysocmgr to script it. It's usage is described at this url: http://ask-leo.com/how_can_i_disable_the_games_that_come_with_windows.html
|
|
Top
|
|
|
|
#190268 - 2008-10-23 10:24 AM
Re: SCRIPT TO DELETE GAMES - Solitaire and the like
[Re: Shaun_Hill]
|
Shaun_Hill
Getting the hang of it
Registered: 2004-11-15
Posts: 50
Loc: JHB, South Africa
|
|
|
Top
|
|
|
|
#190285 - 2008-10-23 05:43 PM
Re: SCRIPT TO DELETE GAMES - Solitaire and the like
[Re: Shaun_Hill]
|
Kdyer
KiX Supporter
   
Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
|
Shaun - Thank you for sharing that. The article appears to cover the need. Now, he just needs to insure that any new system that is imaged does not have the games installed. 
Kent
|
|
Top
|
|
|
|
#190303 - 2008-10-24 11:10 AM
Re: SCRIPT TO DELETE GAMES - Solitaire and the like
[Re: Kdyer]
|
Shaun_Hill
Getting the hang of it
Registered: 2004-11-15
Posts: 50
Loc: JHB, South Africa
|
Create the Gamelist file: [components] freecell=off hearts=off minesweeper=off pinball=off solitaire=off spider=off zonegames=off
Here is the script:
$GamesList = @LSERVER + "\NETLOGON\GamesList.txt"
? "Games removal script processing..."
Shell "%WINDIR%\SYSTEM32\sysocmgr.exe /i:%windir%\inf\sysoc.inf /u:" + $GamesList + " /q /r"
|
|
Top
|
|
|
|
#190742 - 2008-11-24 07:39 PM
Re: SCRIPT TO DELETE GAMES - Solitaire and the like
[Re: UhOh]
|
johnewagner
Fresh Scripter
Registered: 2005-12-21
Posts: 7
|
Here is two more ways to skin that cat.
vbs script in startup script.
' (c) 2006 Plamdi.com. This file silently uninstalls the Google and Yahoo! Toolbars.
Option Explicit:On Error Resume Next
Dim WshShell,a,i:i=0:Set WshShell=WScript.CreateObject("WScript.Shell")
a=WshShell.RegRead("HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{2318C2B1-4965-11d4-9B18-009027A5CD4F}\UninstallString")
If a<>"" Then WshShell.Run(a&" /S"),1,True:i=i+1
a=WshShell.RegRead("HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Yahoo! Companion\UninstallString")
If a<>"" Then WshShell.Run(""""&a&""" /S"),1,True:i=i+1
WshShell=Nothing:Wscript.Quit(i)
Modify for the app you want to unistall.
Or
Create a GPO:
User Configuration\Administrative templates\System\Policy\Don't run Specified Windows Applications\Insert desired apps. This can be done with registry settings.
Develop a business case for GPO's.
I would also be very careful about deleting files or remote clients. If you delete files that controls the nic or OS, you will be spending a lot of time imaging.
If you take away the admin rights, a lot of the script controlled computer mods will not work.
Edited by johnewagner (2008-11-24 07:40 PM)
|
|
Top
|
|
|
|
Moderator: Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart
|
1 registered
(Allen)
and 271 anonymous users online.
|
|
|