.com.unity Forums
  The Official e-Store of Shrapnel Games

This Month's Specials

The Star and the Crescent- Save $8.00
winSPMBT: Main Battle Tank- Save $6.00

   







Go Back   .com.unity Forums > The Camo Workshop > WinSPMBT
Notices


Reply
 
Thread Tools Display Modes
  #1  
Old July 7th, 2012, 03:10 PM
RightDeve's Avatar

RightDeve RightDeve is offline
Second Lieutenant
 
Join Date: May 2008
Location: Yogyakarta, Nusantara
Posts: 468
Thanks: 99
Thanked 104 Times in 65 Posts
RightDeve is on a distinguished road
Potion Simple fix to force-start Explorer.exe once game exits full-screen

I don't know for sure if this has already been discussed before, but I thought I'd share anyway, a simple fix for those using full-screen mode and have that issue where explorer.exe fails to re-launch once the full-screen-game closes..


(in my case, instead of the true explorer.exe relaunched and the Windows taskbar popping up, it shows a particular folder, although in task manager, it showed explorer.exe listed IDK why. Once I tried using this fix immediately after closing the previous game, task manager showed TWO explorer.exe, one from the previous game without this fix, the other from recently closed game after this fix)


So, here's the simple fix for some who's having this issue (I didn't have this issue in my previous computer build):

1. Locate the file "Win7SPMBT.cmd" on your Steel Panthers main installation folder.

2. Edit that file using notepad (right-click -> edit). The original line should look like:

Code:
taskkill.exe /f /im explorer.exe
start/w winSPMBT.exe
cd c:\windows
start explorer.exe
Edit that last line with "start C:\Windows\explorer.exe" so it should look like:

Code:
taskkill.exe /f /im explorer.exe
start/w winSPMBT.exe
cd c:\windows
start C:\Windows\explorer.exe
3. Save the file.

4. Try to launch the full-screen game via GameOptions.exe, then exit. Hopefully it will launch the true explorer.exe now.



This modified fix also applies to the full screen extended map editor program. Previously (in my case), using full screen mode, extended map editor would show that horrible color just like that main game when explorer.exe wasn't killed.

1. Copy that same file (Win7SPMBT.cmd) in the same Steel Panthers main folder, then rename it like "Extended Map Editor.cmd"

2. Edit the file using notepad (right click -> edit) and change the lines so it should like:

Code:
taskkill.exe /f /im explorer.exe
start/w CamoMapEdit.exe
cd c:\windows
start C:\Windows\explorer.exe
3. Save the file.

4. IMPORTANT: Launch the Extended Map Editor only through this cmd file, not via the gameoptions.exe. For convenience, you may want to create a desktop shortcut of this cmd file. To do so, just right-click the file -> create shortcut. To add icon image to this shortcut file, right-click the shortcut -> properties -> shortcut tab -> change icon -> browse and open the file CamoMapEdit.exe in the Steel Panthers main folder -> select the icon, OK. That yellow engineer helmet icon.


================================================== ===

Just want to add something for the devs:

When using the Extended Map Editor in full-screen mode, there's this coil whine on my computer power supply unit. It's like a "ngeeeeeeeeeeng", faint but audible. I know it's not actually a problem, I'm just curious why this also happened to my previous computer build, different parts, different power supply unit, obsolete WinSPMBT version probably before the widescreen support. Only at that time, BOTH the main game in full screen mode and extended map editor in full screen mode displayed this coil whine problem. Now, it's only this extended map editor in full screen.
Maybe this has something to do with the screen resolution patches not yet implemented to the Extended Map Editor? I know that sounds really off topic, but unfortunately only Steel Panthers Extended Map Editor in full screen mode shows this coil whine, other programs are fine.

Just want to report what I saw though.........


PS: I'm using Windows 7 Ultimate 64 Bit.
Power supply is SeaSonic S12E 650 Watt (SS 650 HT). Previous power supply was SeaSonic SS 500 ES.

PS: Just in case, I have attached the modified CMD file (CMD for main game, CMD for extended map editor), and the desktop shortcut for the extended map editor.
Attached Files
File Type: zip Full Screen Fix.zip (1.2 KB, 157 views)
Reply With Quote
  #2  
Old July 7th, 2012, 03:31 PM
Mobhack's Avatar

Mobhack Mobhack is offline
National Security Advisor
 
Join Date: Mar 2005
Location: Dundee
Posts: 5,932
Thanks: 446
Thanked 1,873 Times in 1,221 Posts
Mobhack is on a distinguished road
Default Re: Simple fix to force-start Explorer.exe once game exits full-screen

The CD (change directory) command to C:\windows is supposed to make windows 7 find exploder.exe in the first place. Thus making the extra pathing you added to the explorer.exe line superfluous.

Go to \windows
run explorer (in the current directory we just changed to)

In other words - your edit is doing exactly what the batch file was doing before, in programming terms.

so your batch file should do exactly what it did before, but in your case it does not. (Typical of M$Windows, in my experience.)

Unless the change directory command is for some reason not working on your installation, of course, or windows is not finding it after the explorer task is killed.

So the best fit is probably to delete the entire CD command line as superfluous now you have a fully qualified path to explorer.exe.

Andy
Reply With Quote
  #3  
Old July 7th, 2012, 03:40 PM
RightDeve's Avatar

RightDeve RightDeve is offline
Second Lieutenant
 
Join Date: May 2008
Location: Yogyakarta, Nusantara
Posts: 468
Thanks: 99
Thanked 104 Times in 65 Posts
RightDeve is on a distinguished road
Default

Yeah I know that. I deleted that CD line before because I know it's supposed to Change Dir to Windows directory, although that dir-changing didn't happen. I inserted that line again before posting here because I was afraid some of you master programmers would scorn the idea of omitting their original line.
I also find it weird that adding a full path to the explorer.exe actually solved this.
Anyway, it's safer now, instead of using that CD line only.

I remember somewhere that you (Andy, maybe) said some people have problem that their explorer.exe won't be restarted, and this weird fix hopefully will actually fix that weird and exclusive problem.

Last edited by RightDeve; July 7th, 2012 at 03:48 PM..
Reply With Quote
  #4  
Old July 7th, 2012, 09:18 PM

dmnt dmnt is offline
Sergeant
 
Join Date: Jan 2010
Location: Espoo, Finland
Posts: 359
Thanks: 56
Thanked 136 Times in 104 Posts
dmnt is on a distinguished road
Default Re: Simple fix to force-start Explorer.exe once game exits full-screen

Quote:
Originally Posted by RightDeve View Post
Code:
taskkill.exe /f /im explorer.exe
start/w winSPMBT.exe
cd c:\windows
start C:\Windows\explorer.exe
You shouldn't hard-code install directories, people might have different setups etc. Instead you should use the system properties,

Code:
taskkill.exe /f /im explorer.exe
start /w winSPMBT.exe
start %WINDIR%\explorer.exe
[RANT]
In general, never assume anything to be under certain naming scheme but use the system property whenever applicable. One of the reasons I don't like running Windows in my native tongue is because the software writers in the US always assume that the Desktop directory is named "Desktop" and not for example "Työpöytä". Add insult to injury that the accented letters on file names cause commonly bugs to software that is not prepared for those. Another reason not to run a non-english OS is that idiotically the keyboard shortcuts are changed. So Alt+F doesn't open you the Files dialog tab from the menu, you do that with Alt+T. Consistency, dear developers!
[END RANT]
Reply With Quote
  #5  
Old July 8th, 2012, 03:41 AM
RightDeve's Avatar

RightDeve RightDeve is offline
Second Lieutenant
 
Join Date: May 2008
Location: Yogyakarta, Nusantara
Posts: 468
Thanks: 99
Thanked 104 Times in 65 Posts
RightDeve is on a distinguished road
Default Re: Simple fix to force-start Explorer.exe once game exits full-screen

NO, THAT WON'T DO IT, at least on my computer.
Believe me I tried that already. I said above it needs the current full path to explorer.exe
That vanilla code from CAMO is hard coded to C:Windows too.
Anyway, you might better send that rant directly to Microsoft instead of sending that to a mere poor mortal that is me (Linux fan? You from Finland right?)
Thank you.

Last edited by RightDeve; July 8th, 2012 at 03:58 AM..
Reply With Quote
  #6  
Old July 8th, 2012, 07:05 AM

dmnt dmnt is offline
Sergeant
 
Join Date: Jan 2010
Location: Espoo, Finland
Posts: 359
Thanks: 56
Thanked 136 Times in 104 Posts
dmnt is on a distinguished road
Default Re: Simple fix to force-start Explorer.exe once game exits full-screen

Quote:
Originally Posted by RightDeve View Post
NO, THAT WON'T DO IT, at least on my computer.
Believe me I tried that already. I said above it needs the current full path to explorer.exe
That vanilla code from CAMO is hard coded to C:Windows too.
Anyway, you might better send that rant directly to Microsoft instead of sending that to a mere poor mortal that is me (Linux fan? You from Finland right?)
Thank you.
I'll dig into it when I'll fire up W7 again. The point with %WINDIR% is that it should tell directly where the windows directory is. It might, however, be so that MS decided to treat it differently if some old batch scripts use the hardcoded locations and to replace it on the fly - they've been known to do stuff like that and never document it anywhere.

And I wouldn't call myself a Linux fan, more like "right tool for the right job." So I have a dual boot and also a VM for running WinSPMBT when I'm in Linux. Bad design is bad design regardless of who's the manufacturer of said piece of software.
Reply With Quote
  #7  
Old July 8th, 2012, 08:32 AM

dmnt dmnt is offline
Sergeant
 
Join Date: Jan 2010
Location: Espoo, Finland
Posts: 359
Thanks: 56
Thanked 136 Times in 104 Posts
dmnt is on a distinguished road
Default Re: Simple fix to force-start Explorer.exe once game exits full-screen

Quote:
Originally Posted by RightDeve View Post
NO, THAT WON'T DO IT, at least on my computer.
Believe me I tried that already. I said above it needs the current full path to explorer.exe
That vanilla code from CAMO is hard coded to C:Windows too.
Anyway, you might better send that rant directly to Microsoft instead of sending that to a mere poor mortal that is me (Linux fan? You from Finland right?)
Thank you.
This .cmd works for me... but is it possible that your game files are installed on another drive, like D: or E:?

Then that cd command never changes the default drive, it just changes the drive C: current directory. In any case, I wonder why %WINDIR% won't do it for you...

What happens if you try the following:
Code:
taskkill.exe /f /im explorer.exe
start/w winSPMBT.exe
%SystemDrive%
start %SystemRoot%\explorer.exe
Reply With Quote
Reply

Bookmarks

Tags
cmd file, coil whine, explorer.exe, extended map editor, full screen fix


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump


All times are GMT -4. The time now is 06:59 PM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©1999 - 2024, Shrapnel Games, Inc. - All Rights Reserved.