"feature" of winsetup.exe

Started by adm244, Fri 12/07/2013 13:38:15

Previous topic - Next topic

adm244

I've started developing a new game and I called it as a 'game'. So when I compiled it my executable file looks like 'game.exe'.
I tried to run a 'winsetup.exe' file and... It launched a The Longest Journey game.
Tried to run a 'game.exe' using a 'run menu'(win+R) and it launched The Longest Journey again. Then I run 'regedit' and start to searching for 'game.exe' and I found it at "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\". As I understand this is the place where 'run menu' searches for executables(one of those places). I have a FireFox installed, so I found there 'firefox.exe'. I renamed a folder with my game to 'firefox' and when I recompiled it my game executable became looks like 'firefox.exe'. So, I run 'winsetup.exe' again and as I thought it started FireFox for me.

Adeel

Please specify about the version number of AGS. I am asking this because I tried to replicate your problem by setting my game name as "calc" (which brings up the calculator) but the winsetup.exe ran my game not calculator.

I also tried making a new game and naming it as "calc" but even then winsetup.exe worked just fine. I am using Windows XP Service Pack 3 and my AGS Version is 3.2.1, BTW.

Crimson Wizard

Maybe it depends on OS, not version of AGS?

I think adm244 mentioned he has a Win7. Might be related to difference in how registry entries are arranged. Just a guess.

adm244

Quote from: Crimson Wizard on Fri 12/07/2013 14:58:49
Maybe it depends on OS, not version of AGS?
I think so, because I tried to do that with AGS 3.21 and with 3.30, they have the same effect.

I've installed Windows Xp x64 into VirtualBox, so I can check this in WinXp and it works as well as on Win7...
(i've called game folder as 'pinball' and compiled it, 'winsetup.exe' lauching pinball game)

Adeel

That's really odd. Mine is x32 and it works fine. Tell me, if it works like same on x32. Try restoring your registry to original. It should work now.


adm244

Quote from: Adeel S. Ahmed on Fri 12/07/2013 17:02:20
That's really odd. Mine is x32 and it works fine. Tell me, if it works like same on x32. Try restoring your registry to original. It should work now.
It happens on WinXp x86(32-bits) with SP3 for me as well.

It's not a problem to rename a folder or to delete reg property to solve that.

Adeel

The other thread Snarky pointed out was also experiencing same problem because of The Longest Journey already installed. I have learned one thing, though. You SHOULDN'T install this game :P.

On the topic: If you have to install Windows again for some reason then try replicating the same problem (without installing The Longest Journey). Be sure to report it here.

adm244

#8
[deleted]

Adeel

#9
Yes, you have find a walk around for your problem. But that isn't exactly a solution in true sense. This problem shouldn't persist. And if it does then maybe Crimson Wizard or Monkey_05_06 will have to look into the matter and solve it.

adm244

#10
[deleted]

Monsieur OUXX

#11
I just tried to create a "calc.exe" using AGS 3.2.1.
OS: Windows 7 "family premium" SP1, 64-bits.

I ran calc.Exe from within winsetup.exe

The game ran normally (it didn't run the calculator).

What I suspect (I have no evidence but it's my intuition):
- winsetup.exe runs the game internally using any kind of standard "start child process" function offered by the API it uses (Allegro? .Net?)
- Those functions usually run in a similar way as command-line works. So I guess it's equivalent to typing "calc.exe" on the command line from within the game folder.
- When you do that, your OS looks up"calc.exe" in a certain order, using the PATH variable. If calc.exe's location is not specified explicitly, then Windows iterates on every location in PATH : and I suspect the issue occurs when the App Data folder doesn't come first. Probably the "Windows" folder comes before. So it runs calc.exe from Windows. adm244 you should check that on your system.

The solution would be to explicitly feed the "start child process" function with the full path where winsetup.exe is currently running.

Oh, and maybe that problem is originally caused by the Longest Journey installer, which would mess with Windows: That wouldn't be totally absurd. I can totally imagine them having some instructions in their installer script that "add" their game location to the PATH, but makes a small mistake at the same time (like, copying every location in the PATH before adding the new one, but in the backwards order, hence inverting everything).

 

SMF spam blocked by CleanTalk