You are here

Prevent Windows 7 from add a portable game into "games" folder

23 posts / 0 new
Last post
Ph4n70m
Ph4n70m's picture
Offline
Last seen: 2 years 10 months ago
Joined: 2007-01-12 19:22
Prevent Windows 7 from add a portable game into "games" folder

I was trying to portabilize the game Age of Empires II (this topic) and succeeded. But now the problem is that Windows 7 always add these games into the "Games folder" of host system, and it ends up being a big hassle because we do not want our portable games to appear in the "Games folder" of someone elses computer.
Is there any way to prevent the windows "detect" the game and add it in the folder?

vf2nsr
vf2nsr's picture
Offline
Last seen: 8 years 6 months ago
Developer
Joined: 2010-02-13 17:10
Looking at

the other topic you mentioned that you created your own launcher? In that case my suggestion of using files move command from PAL is pretty much useless

“Be who you are and say what you feel because those who mind don't matter and those who matter don't mind.” Dr. Seuss

Ph4n70m
Ph4n70m's picture
Offline
Last seen: 2 years 10 months ago
Joined: 2007-01-12 19:22
.

Yes, I made my own launcher, but that's not the problem, cause it leaves nothing behind, nor files or registry entries.
My question is about Windows 7 itself, that keeps adding those games into games folder.

Ed_P
Offline
Last seen: 6 years 6 months ago
Joined: 2007-02-19 09:09
LOL

that's not the problem, cause it leaves nothing behind, nor files or registry entries.

Except files in the Windows 7 Games folder. LOL

Why can't your launcher delete them when it exits???

Ed

Ph4n70m
Ph4n70m's picture
Offline
Last seen: 2 years 10 months ago
Joined: 2007-01-12 19:22
.

The same way as none portable application deletes "prefetch" files that windows create by itself, neither a bunch of registry entries created also by windows.

Jacob Mastel
Offline
Last seen: 5 months 6 days ago
Developer
Joined: 2007-06-13 19:36
Aftermath

It's probably something in the game itself that registers itself with windows. I would look at where windows stores that information (whether it's a .lnk file or registry) and delete it when the app closes.

Release Team Member

Ph4n70m
Ph4n70m's picture
Offline
Last seen: 2 years 10 months ago
Joined: 2007-01-12 19:22
.

Unfortunately is not something in the game, because those games were made in 90's and in those years did not exist Windows 7 (hehe).
Is something in windows itself that detects and add the game into games folder.

Ken Herbert
Ken Herbert's picture
Offline
Last seen: 1 hour 25 min ago
DeveloperModerator
Joined: 2010-05-25 18:19
Potentially you can do it,

Potentially you can do it, potentially you can't, as some of this data is stored in two registry keys, at least one of which could be problematic.
Anyways, you can play with it and test it out....

You want to find two subkeys in HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\GameUX\

One of the subkeys will be in \Games\ and the other will be in \S-1-5-21-??????????-????????????-??????????-????\ (there may be more than one of these, as each one is a user account, so you may have one, you may have more).

Check each entry in each folder until you see the one with the appropriate .exe under AppExePath.

The subkey in \Games\ potentially uses the same name on each PC for the same game, I'm not an expert on it though, so you'll have to test it and see.

The \S-1-5-21...\ one is the difficult one, as the number following the S-1-5-21- is different for each user account on the PC, and therefore could potentially be different for every user on every Win7 PC.

I've seen it said that deleting (or in your case controlling) the first one will do the trick, in other cases I've seen that both are needed. If both are needed you are probably out of luck, if only the first, you are in luck but you will be leaving (at least) one registry entry behind.

Ph4n70m
Ph4n70m's picture
Offline
Last seen: 2 years 10 months ago
Joined: 2007-01-12 19:22
.

Maybe if we make a backup of entire HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\GameUX\ key before start the game and restore it when exit, we get rid of this problem.
So we do the same with the folder on appdata.

Simeon
Simeon's picture
Offline
Last seen: 10 years 6 months ago
DeveloperTranslator
Joined: 2006-09-25 15:15
HKLM

can only be written to (=restored) if you are an admin.

"What about Love?" - "Overrated. Biochemically no different than eating large quantities of chocolate." - Al Pacino in The Devils Advocate

Ph4n70m
Ph4n70m's picture
Offline
Last seen: 2 years 10 months ago
Joined: 2007-01-12 19:22
.

Yep. I know... But there's no problem.

Darkbee
Darkbee's picture
Offline
Last seen: 4 years 11 months ago
Joined: 2008-04-14 09:41
Curious

I'm feeling a bit stupid... where is the "games" folder exactly? I'm curious to see what games have been mysteriously added to my system.

Could it have something to do with the fact that Microsoft publishes the game and so they want to be as "helpful" and as marketingly (a word?) in-your-face as possible?

Ph4n70m
Ph4n70m's picture
Offline
Last seen: 2 years 10 months ago
Joined: 2007-01-12 19:22
.

Maybe I was misunderstood, my english is not perfect.

What is added to the system is only information about the game (title, publisher, picture, etc), not the game itself.

Ken Herbert
Ken Herbert's picture
Offline
Last seen: 1 hour 25 min ago
DeveloperModerator
Joined: 2010-05-25 18:19
Those registry entries I

Those registry entries I noted above are not created by the game, but are created by Win7 automatically.

Ph4n70m
Ph4n70m's picture
Offline
Last seen: 2 years 10 months ago
Joined: 2007-01-12 19:22
.

Yep. And also Windows 7 creates files under C:\Users\username\AppData\Local\Microsoft\Windows\GameExplorer.

I noticed, also, that Windows 7 adds several times the same game if you have it in different folders, then the folder name is generated randomly. This makes it difficult to track and delete files and registry entries.

ottosykora
Offline
Last seen: 11 hours 37 min ago
Joined: 2007-10-11 17:48
interesting

but just wonder, how does w7 find out that this is a game and not word processing or some other fancy util? I could understand when it is a game written by some recent MS tool, but a game from many years ago?
How is a game different from other apps?

Otto Sykora
Basel, Switzerland

Ken Herbert
Ken Herbert's picture
Offline
Last seen: 1 hour 25 min ago
DeveloperModerator
Joined: 2010-05-25 18:19
From reading all the stuff on

From reading all the stuff on the net about it when Win7 was about to be released, Game Providers actually register with Microsoft and notify them of their games, and also notify them when game updates etc. are released, so in essence it is kind of like Steam.

I'm guessing that if you installed a game that hasn't been registered or a game by a provider who isn't registered, then it possibly wouldn't show up in Games Explorer. Would love to test it and see, but don't really want to fool around with my media center any more than I need to.

Understandably, a game like Age of Empires 2 would be on the list, since it is a Microsoft game.

LinkSlayer64
Offline
Last seen: 12 years 7 months ago
Joined: 2009-01-06 16:44
How is this even portable?

More than likely, you are going to be unable to modify anything to do with that Games section without being an administrator. My thought is that it would only remove that data once AoE had been uninstalled properly

My larger question is how did you even manage to portabalize this? AoE I, II, III all need their respective disc in order to play, physical or in file format.

"Video games are bad for you? That's what they said about Rock'n'Roll." -Shigeru Miyamoto

3D1T0R
3D1T0R's picture
Offline
Last seen: 3 years 9 months ago
Developer
Joined: 2006-12-29 23:48
Games plug-in

Hey, just trying to look up how to do stuff on NSIS.SF.net and the "Games plug-in" caught my eye, and (despite the fact that it has absolutely nothing to do with what I was looking for) I thought I'd give it a quick glance. it says that ‘Games.dll registers the game in Vista's "Games Explorer", as well as in the Games section of Windows Media Center’. so with this plug-in installed, there is a Games::registerGame function, and possibly useful to you, a Games::unregisterGame function which is supposed to remove a game from those places (i.e. when uninstalling, but I think it should work for what you want).

Hope this helps
Maybe you could release your .nsi script to us eh?

Edit: Forgot to link to it, fixed now.

~3D1T0R

Ph4n70m
Ph4n70m's picture
Offline
Last seen: 2 years 10 months ago
Joined: 2007-01-12 19:22
.

Here goes the actual .nsi scripts:

Age of Empires: http://pastebin.com/cPMDRBPM
Age of Empires - Rise of Rome: http://pastebin.com/7cQM94ww
Age of Empires II - The Age of Kings: http://pastebin.com/8Dtsr9QA
Age of Empires II - The Conquerors Expansion: http://pastebin.com/rXxgACQt

You'll need to copy Age of Empires (and if you have, the Rise of Rome expansion) game files to App\Aoe and Age of Empires II (and it's expansion The Conquerors) to App\AoE2 folder.

You'll need default reg keys. You can export if you have these games installed on your PC. Here goes the keys you'll need to export (to App\DefaultData):

Age of Empires:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Games\Age of Empires\1.00 > AgeOfEmpires_HKLM_Default.reg
HKEY_CURRENT_USER\Software\Microsoft\Games\Age of Empires\1.00 > AgeOfEmpires_HKCU_Default.reg

Age of Empires - Rise of Rome:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft Games\Age of Empires Expansion\1.0 > RiseOfRome_HKLM_Registry.reg
HKEY_CURRENT_USER\Software\Microsoft\Microsoft Games\Age of Empires Expansion\1.0 > RiseOfRome_HKCU_Registry.reg

Age of Empires II - The Age of Kings:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft Games\Age of Empires\2.0 > TheKings_HKLM_Default.reg
HKEY_CURRENT_USER\Software\Microsoft\Microsoft Games\Age of Empires\2.0 > TheKings_HKCU_Default.reg

Age of Empires II - The Conquerors Expansion:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft Games\Age of Empires II: The Conquerors Expansion\1.0 > TheConquerors_HKLM_Default.reg
HKEY_CURRENT_USER\Software\Microsoft\Microsoft Games\Age of Empires II: The Conquerors Expansion\1.0 > TheConquerors_HKCU_Default.reg

I hope it was not confusing, but seeing the .nsi script you'll understand. Blum

About Games Plugin: I'll take a look at the link you posted. Thanks a lot! Smile

Ph4n70m
Ph4n70m's picture
Offline
Last seen: 2 years 10 months ago
Joined: 2007-01-12 19:22
.

Testing this script (without sucess with Games::registerGame hehe) I found a VERY interest thing:

Windows 7 automatically remove not found games from "Games folder". So, when you eject your flash drive, the game magically disappear! Because the registy entries and game files couldn't be found by windows! Biggrin
The only thing that remains is the shortcut on startmenu\all programs\games section.

Gremlin
Offline
Last seen: 3 months 3 weeks ago
Joined: 2010-07-02 04:48
Hi, a search on the forums

Hi,

a search on the forums did come up with this thread.

I have the same problem concerning a game I had made portable with PA Launcher. It is called Arx Fatalis a role playing game from 2002.

I have it working under Windows XP 32 Bit and everything is good. Files get moved forth and back, registry entries are written and deleted again after closing the game.

Now I have also a Windows 7 64 Bit installation and during a 'compatibility run' yesterday evening I noticed some unpleasant behaviour of Windows 7. There is a so-called Games Explorer included in Windows 7 which gets activated whenever a game is run. I foudn out that this Games Explorer starts a DLL which contacts Microsoft Servers for more infrmation to the game and also downloads box art and what not. It then writes files into the Documents And Settings folder as well as entries in the registry which it will not delete after the game executable (and the portable launcher's executable) has been closed. They remain on the system and suddenly a portable game is not portable anymore on Windows 7. This behaviour is not be observed in Windows XP as XP does not have such a Games Explorer.

The entries left in the registry are as follows:

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\RADAR\HeapLeakDetection\DiagnosedApplications\ARX.exe]
"LastDetectionTime"=hex(11):E6,81,F4,3E,18,47,CC,01

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\RADAR\HeapLeakDetection\Settings\LeakDiagnosisAttempted]

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\GameUX\S-1-5-21-900965185-151674841-218648849-1000\{B9DCE32E-DE29-4EB9-8B7C-08773E323B15}]
"AppExePath"="H:\\WinBox\\JoWood\\Arx Fatalis Portable\\App\\Arx Fatalis\\arx.exe"
"ApplicationId"="{755719d2-9d40-43e5-a920-736cc39a2d2b}"
"ConfigApplicationPath"="H:\\WinBox\\JoWood\\Arx Fatalis Portable\\App\\Arx Fatalis"
"ConfigGDFBinaryPath"="C:\\Windows\\system32\\GameUXLegacyGDFs.dll"
"ConfigInstallType"="3"
"Description"="Arx Fatalis™"
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Fonts]
"Hansa (TrueType)"="H:\\WinBox\\JoWood\\Arx Fatalis Portable\\App\\Arx Fatalis\\misc\\Arx.ttf"

[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Direct3D\MostRecentApplication]
"Name"="ARX.exe"
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\DirectDraw\MostRecentApplication]
"ID"=dword:4DF12766
"Name"="ARX.exe"
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows NT\CurrentVersion\Fonts]
"Hansa (TrueType)"="H:\\WinBox\\JoWood\\Arx Fatalis Portable\\App\\Arx Fatalis\\misc\\Arx.ttf"
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\GraphicsDrivers\Configuration\GSM5817103NDWEDG833_03_07DB_9B^EAD5E680C3150461BF5825DC96B3B5C4]
"Timestamp"=hex(11):80,D4,93,4E,18,47,CC,01

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\MediaResources\DirectSound]

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\MediaResources\DirectSound\Speaker Configuration]
"Speaker Configuration"=dword:00000004
[HKEY_USERS\S-1-5-21-900965185-151674841-218648849-1000\Software\ATI\ACE\Settings\Runtime\Graphics\UDID\PCI_VEN_1002&DEV_68B8&SUBSYS_1482174B&REV_00_4&17C1768B&0&0008&02A]
"AccessTime"="20.07.2011 22:05:00"
[HKEY_USERS\S-1-5-21-900965185-151674841-218648849-1000\Software\ATI\ACE\Settings\Runtime\Graphics\UDID\PCI_VEN_1002&DEV_68B8&SUBSYS_1482174B&REV_00_4&17C1768B&0&0008&03A]
"AccessTime"="20.07.2011 22:05:00"
[HKEY_USERS\S-1-5-21-900965185-151674841-218648849-1000\Software\ATI\ACE\Settings\Runtime\Graphics\UDID\PCI_VEN_1002&DEV_68B8&SUBSYS_1482174B&REV_00_4&17C1768B&0&0008A]
"AccessTime"="20.07.2011 22:05:00"
[HKEY_USERS\S-1-5-21-900965185-151674841-218648849-1000\Software\ATI\ACE\Settings\Runtime\Graphics\UDID\PCI_VEN_8086&DEV_27A2&SUBSYS_82181043&REV_03_3&11583659&0&10&02A]
"AccessTime"="20.07.2011 22:05:00"
[HKEY_USERS\S-1-5-21-900965185-151674841-218648849-1000\Software\ATI\ACE\Settings\Runtime\Graphics\UDID\PCI_VEN_8086&DEV_27A2&SUBSYS_82181043&REV_03_3&11583659&0&10A]
"AccessTime"="20.07.2011 22:05:00"
[HKEY_USERS\S-1-5-21-900965185-151674841-218648849-1000\Software\ATI\ACE\Settings\Runtime\Graphics\UDID\PCI_VEN_8086&DEV_27A6&SUBSYS_82181043&REV_03_3&11583659&0&11&02A]
"AccessTime"="20.07.2011 22:05:00"
[HKEY_USERS\S-1-5-21-900965185-151674841-218648849-1000\Software\ATI\ACE\Settings\Runtime\Graphics\UDID\PCI_VEN_8086&DEV_27A6&SUBSYS_82181043&REV_03_3&11583659&0&11A]
"AccessTime"="20.07.2011 22:05:00"
[HKEY_USERS\S-1-5-21-900965185-151674841-218648849-1000\Software\Classes\Local Settings\Software\Microsoft\Windows\GameUX]
"OOBGameInstalled"=dword:00000001

[HKEY_USERS\S-1-5-21-900965185-151674841-218648849-1000\Software\Classes\Local Settings\Software\Microsoft\Windows\GameUX\ServiceLocation]

[HKEY_USERS\S-1-5-21-900965185-151674841-218648849-1000\Software\Intel\Indeo]

[HKEY_USERS\S-1-5-21-900965185-151674841-218648849-1000\Software\Intel\Indeo\5.0]

[HKEY_USERS\S-1-5-21-900965185-151674841-218648849-1000\Software\Microsoft\Internet Explorer\LowRegistry\Audio\PolicyConfig\PropertyStore\f20b6e4c_0]
@="{0.0.0.00000000}.{3311ba9f-973f-4cd5-a09f-1c2167214573}|\\Device\\Mup\\hydra\\gemmrued\\WinBox\\JoWood\\Arx Fatalis Portable\\App\\Arx Fatalis\\ARX.exe%b{00000000-0000-0000-0000-000000000000}"

[HKEY_USERS\S-1-5-21-900965185-151674841-218648849-1000\Software\Microsoft\Internet Explorer\LowRegistry\Audio\PolicyConfig\PropertyStore\f20b6e4c_0\{219ED5A0-9CBF-4F3A-B927-37C9E5C5F14F}]
"3"=hex:04,00,00,00,00,00,00,00,00,00,80,3F,00,00,00,00,00,00,00,00,00,00,00,\
00
"4"=hex:04,20,00,00,00,00,00,00,18,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
00,00,00,80,3F,00,00,80,3F
"5"=hex:0B,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
00

These files and folders were left in the system:

C:\Users\\AppData\Local\Microsoft\Windows\GameExplorer\{B9DCE32E-DE29-4EB9-8B7C-08773E323B15}\PlayTasks\0\Spielen.lnk
C:\Users\\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Games
C:\Users\\AppData\Local\Microsoft\Windows\GameExplorer\GamesBoxArt
C:\Users\\AppData\Local\Microsoft\Windows\GameExplorer\{B9DCE32E-DE29-4EB9-8B7C-08773E323B15}\PlayTasks\0
C:\Users\\AppData\Local\Microsoft\Windows\GameExplorer\{B9DCE32E-DE29-4EB9-8B7C-08773E323B15}\PlayTasks
C:\Users\\AppData\Local\Microsoft\Windows\GameExplorer\{B9DCE32E-DE29-4EB9-8B7C-08773E323B15}

Is there any way to deal with this as seeing the random numbers in the registry paths and also the files and folders paths I do not believe I can delete those entries easily via the Portable Apps Launcher after closing the game? Is there a possibility - a registry setting - which could just switch off Games Explorer during running the portable game and switch it on afterwards? This would be the easiest solution to prevent it to mess with the registry and the file system.

Any other solution? How do you folks deal with that?

I had a look at some officially released portable games from this site (accidentally picked: Armagetron Advanced Portable, AssaultCube Portable, FreeCiv Portable) which were built using the PA Launcher but I did not find anything which would deal with this problem. Is it acceptable then that these entries are left in Windows 7? Because Games Explorer should kick in a soon as they are started.

@ Ph4n7=m:
How do you deal now with this problem. There are still leftovers in the registry and in the Docuemnts And Settings folder?

Cheers

Gremlin

Ed_P
Offline
Last seen: 6 years 6 months ago
Joined: 2007-02-19 09:09
Portable not stealth

Portable apps do leave traces behind on host systems. The apps here try to minimize this as much as possible but there can still be things left behind.

Ed

Log in or register to post comments