Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

A true Challenge : How can I remove a game file from workstations?

Status
Not open for further replies.

Sina

Technical User
Jan 2, 2001
309
CA
Hi all.

I have to remove games from workstaions of the users. but If I try to remove the games by selecting the game name, the users would inturn change the file name and I would not know what it the new file name is.

Is there any way to get the properties of the file and find out if the file is a game file to proceed with deletion.

Thank you all

Sina
 
Well, this is a pretty big project.

Here's how I would do it. (I am assuming that you are running Win32)

1. Find the directory that has the game in it.
2. Then search for all the .exe files and search for one that has a name somewhat like unisnt.exe or uninstall.exe. That's the file that will uninstall the game.
3. Pipe out a seperate process to that file so that it will uninstall the program.
4. If you want, then you can unlink ([tt]unlink()[/tt]) any of the extra files in the directory and then remove ([tt]rmdir()[/tt]) any of the directories.

That's how I would do it.

Hope this helps.

-Vic vic cherubini
vikter@epicsoftware.com
====
Knows: Perl, HTML, JavScript, C/C++, PHP, Flash, Director
====
 
Here is the Challenge as I mentioned.

The games that are on workstation are just a exe files that don't have to be installed there fore they don't have the unistall program.

they are just standalone exe's that users run. like slot.exe blackjack.exe.

And they would hide these files in differect directories. I can basically scan all directories and delete files with those names. The challenge comes in when the users change the file name and I can no longer detect it.

you see.
I'm looking for a win32 modules or function that would identify the file as a game file.
 
Well, since they are games like that, they will most likely not be in the registry, so Win32::Registry is out of the question.

The only thing that I can think of would be to search CPAN and see if there is a module that does that.

Either that, or check your (I am assuming you are running NT 4.0 or Win2k) Win2k Documentation and see if there is a way to block things like that before they change the name.

Try that.

Hope this helps,

-Vic vic cherubini
vikter@epicsoftware.com
====
Knows: Perl, HTML, JavScript, C/C++, PHP, Flash, Director
====
 
If you have samples if the .EXE files you are looking for then you could try these ideas:

User has renamed file, but it is still an .exe:
- Look for .exe files of the same size.
- Run a checksum or MD5 digest on the .exe files and look for matches.

User may transform the file to hide it better:
- Run winzip on your samples and look for files matching the
size or checksum of the zipped version.
If user combines more than one .exe into a single zip you may want to unzip and check contents of zips individually.
If a sophisticated user hides the file by encrypting and renaming you are screwed.

User may rename to different file type
- Look at files that are not .zip or .exe as well. This would take longer.
 
Hi Guys;

Is there a way that perl can report a checksum on a file. i.e Can I pass a file name and run a perl module to get the checksum?

So basically How can I get the check sum aside from right clicking on the file and getting it from the properties.

Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top