Author Topic: InstantSheller in Win7 - Need to Hide Batch Command Prompt  (Read 12863 times)

keilmillerjr

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1167
    • View Profile
Re: InstantSheller in Win7 - Need to Hide Batch Command Prompt
« Reply #15 on: February 16, 2018, 07:48:09 PM »
The command I posted does work. It points attract to the config directory. It does not hide the console like you think? I’m so confused now as to what you are trying to do and have already done.

albert_c

  • Jr. Member
  • **
  • Posts: 23
    • View Profile
Re: InstantSheller in Win7 - Need to Hide Batch Command Prompt
« Reply #16 on: February 16, 2018, 08:20:42 PM »
The command I posted does work. It points attract to the config directory. It does not hide the console like you think? I’m so confused now as to what you are trying to do and have already done.

I am just trying to shell directly to AM properly. I achieved it by shelling to the batch file, but that leaves the batch file command window visible. I want to get rid of that. Just straight shell to AM.

I am sure that command works, it just doesn't work on this build I am working on. What's happening now is that Attract Mode doesn't even launch upon bootup entering that command from the registry. I'll pass on figuring it out for now as the BATCH-to-EXE work-around works. And so look towards the next build using that command and report back.
Took me 3 years to just to get HyperSpin to work. Then spent the past 4 years suffering through all the bugs that will never be fixed. After the few days it took to figure out Attract Mode, I have deleted my HyperSpin directory. Bye HyperSpin, bye!

keilmillerjr

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1167
    • View Profile
Re: InstantSheller in Win7 - Need to Hide Batch Command Prompt
« Reply #17 on: February 17, 2018, 10:39:01 AM »
The command I posted does work. It points attract to the config directory. It does not hide the console like you think? I’m so confused now as to what you are trying to do and have already done.

I am just trying to shell directly to AM properly. I achieved it by shelling to the batch file, but that leaves the batch file command window visible. I want to get rid of that. Just straight shell to AM.

I am sure that command works, it just doesn't work on this build I am working on. What's happening now is that Attract Mode doesn't even launch upon bootup entering that command from the registry. I'll pass on figuring it out for now as the BATCH-to-EXE work-around works. And so look towards the next build using that command and report back.

What build are you using?

You shouldn’t need to use a batch file. I’ve been shelling attract from registry for a few years now. The -c param will resolve config issues in most cases. Attract 2.1 has two separate builds, with and without command line. I also have an ahk script/app I made to hide the attract console and pass params. Can find it in the plug-ins sticky. Obsolete now.

albert_c

  • Jr. Member
  • **
  • Posts: 23
    • View Profile
Re: InstantSheller in Win7 - Need to Hide Batch Command Prompt
« Reply #18 on: February 17, 2018, 12:48:37 PM »
I am using AM ver 2.3. Also, I can confirm that command works!

Interestingly enough, I bricked my HDD and had to reinstall everything last night. After everything was back up and running, I tried the command and it worked perfectly. I haven't run all the Windows updates on the restore. I have only installed the roll-up update pack and essential files (.Net, Visual C++, drivers). Perhaps Windows Updates is causing some conflict. But it works now without any work-arounds. Thanks!
Took me 3 years to just to get HyperSpin to work. Then spent the past 4 years suffering through all the bugs that will never be fixed. After the few days it took to figure out Attract Mode, I have deleted my HyperSpin directory. Bye HyperSpin, bye!

YellowBirdAZ

  • Full Member
  • ***
  • Posts: 80
    • View Profile
Re: InstantSheller in Win7 - Need to Hide Batch Command Prompt
« Reply #19 on: February 20, 2018, 06:05:50 AM »
Another possible solution... this works on Win 10 and I imagine Win 7 as well.

I have one AHK script that launches everything I need to have running at startup: it starts up my control panel (I-PAC 4) with the appropriate profile, it sets 320x240 resolution for CRT and defines hotkeys to switch resolutions (mostly for troubleshooting), and it launches Attract Mode itself. (I run the non-console version 2.3.)

The script is compiled as an EXE, and I put it in the registry instead of explorer.exe. So on start-up this script runs instead of Windows explorer, and in turn it launches Attract Mode.

It works pretty well. You see the Win 10 load screen briefly, then it just jumps straight into my intro.nut. Also, it seems like it helps with issues of quitting games and returning to Attract Mode with the front end in proper focus.

I use a lot of Autohotkey scripts on my cabinet to manage resolution changes for non-MAME games and various other tasks. I also use it to assign functions to certain buttons, like if you hold pause for 3 seconds I have AHK treat it as a quit game input (so I only need one physical button for pause and quit). It is also handy for dealing with configuration popups for games like Slain, where it asks you to choose your preferred resolution every time you start the game up. AHK can hide those and make the appropriate selection without the user ever seeing them. Anyhow, I highly recommend it, especially if you are mixing MAME and non-MAME content.

albert_c

  • Jr. Member
  • **
  • Posts: 23
    • View Profile
Re: InstantSheller in Win7 - Need to Hide Batch Command Prompt
« Reply #20 on: February 24, 2018, 02:40:31 PM »
keilmillerjr, hermine.potter, YellowBirdAZ, All,

I figured it out why on some installs/cab builds using the <directory\attract.exe> -c <directory> command does not always work. It is pretty simple. If there is a space in the directory name, the command fails. In one of my builds, the directory was 'c:\Attract Mode', with a space between 'Attract' and 'Mode'. In another build, it was just 'c:\AttractMode', with no space.

Flipped the builds back and forth removing the space in the directory name and then updating the shell command. Like clock work, it would fail with the space in the directory name, then work without the space in the directory name.

Give it a shot and see if you an replicate it.
Took me 3 years to just to get HyperSpin to work. Then spent the past 4 years suffering through all the bugs that will never be fixed. After the few days it took to figure out Attract Mode, I have deleted my HyperSpin directory. Bye HyperSpin, bye!

hermine.potter

  • Hero Member
  • *****
  • Posts: 767
    • View Profile
Re: InstantSheller in Win7 - Need to Hide Batch Command Prompt
« Reply #21 on: February 26, 2018, 01:47:29 AM »
@albert_c
this is a know problem with command line execution & spaces in path and filenames.
you have to use quotation marks ( " )
Code: [Select]
"C:\attract mode\attract.exe" -c "C:\attract mode"


Instant Sheller Thread updated
« Last Edit: February 27, 2018, 03:29:33 AM by hermine.potter »
AM Version : 2.6.1
Input : Mad Catz Brawlstick; Mouse; Keyboard; Xbox360 Wireless
Cabinet : Yes
OS : Windows10 Pro
System : Dell Precision T3500 ; Intel X5650 ; 12GB RAM