Author Topic: Is a one click launch possible?  (Read 5745 times)

Kuvenant

  • *
  • Posts: 5
    • View Profile
Is a one click launch possible?
« on: 2019-10-20 17:09:27 »
I am wondering if it would be possible for modded FF7 to be launched without having to go through the 7th Heaven GUI?  I understand the need to use it when setting up the mods, but after I have a working setup it would be nice to be able to use something like a batch file to launch my setup without having to go through the GUI.  This way I could launch my modded FF7 setup directly from a third party app, in my case Launchbox.

unab0mb

  • 7th Heaven Crew
  • *
  • Posts: 405
    • View Profile
    • 7th Heaven Web Site
Re: Is a one click launch possible?
« Reply #1 on: 2019-12-13 11:22:56 »
Yes, it is possible. You would run it from the command line, shortcut, or batch file like this:

7thHeaven.exe /PROFILE:Default /LAUNCH

Just change Default to another profile name if you have a different specific one set up that you want to use. 7th Heaven also supports the /QUIT switch, however, it will immediately open, load your profile, launch the game, then exit, so that is kind of pointless because none of your mods would work once it quits. So, you unfortunately would still have the GUI up. I'll consider adding a proper /QUIT command in a future version of 7H.

I would suggest making a batch file or other script look for the FF7.exe process running in some way, then do a taskkill command to 7thHeaven.exe once the FF7 process ends so you wouldn't have to manually close it.

Kuvenant

  • *
  • Posts: 5
    • View Profile
Re: Is a one click launch possible?
« Reply #2 on: 2020-04-27 00:47:47 »
Sorry for not replying before.  I wish this site notified of responses to posts, but that is my issue.  After a couple of days I forgot I asked the question.

Anyways, I've tried the new 7th Heaven (Magnificent!) and the batch shortcut works...ish.  The issue is with Windows UAC, the bane of many.  There are ways to get around UAC, but they don't work with the batch, or at least I haven't figured out a way to get them to work together.

Thanks again for the command line shortcut and you and the entire teams work on 7th Heaven.

unab0mb

  • 7th Heaven Crew
  • *
  • Posts: 405
    • View Profile
    • 7th Heaven Web Site
Re: Is a one click launch possible?
« Reply #3 on: 2020-04-27 05:01:55 »
I wish this site notified of responses to posts, but that is my issue.  After a couple of days I forgot I asked the question.
Thanks for the nice comments. You can press the Notify button to be notified of responses to threads. Since the time you originally asked the question until now, I'll mention that 7H 2.0 now handles /QUIT properly where it will stay open until the game is closed and THEN quits 7H. It also supports a new switch, /MINI that will minimize the program to the taskbar.

Yeah, UAC does get in the way to truly make it 1 click, I didn't think about that, I'm sure there's a workaround out there somewhere.

Kuvenant

  • *
  • Posts: 5
    • View Profile
Re: Is a one click launch possible?
« Reply #4 on: 2020-04-27 16:43:28 »
Ah yes.  The "it's right in front of me and I missed it" problem.  Of course I missed the notify button.  :o

Sweet having quit work now, and the addition of mini.  I'll use them in my batch while I continue bashing my head against UAC.

nfitc1

  • *
  • Posts: 3011
  • I just don't know what went wrong.
    • View Profile
    • WM/PrC Blog
Re: Is a one click launch possible?
« Reply #5 on: 2020-04-27 21:24:49 »
The issue is with Windows UAC, the bane of many.  There are ways to get around UAC, but they don't work with the batch, or at least I haven't figured out a way to get them to work together.

Have you tried this?
https://www.makeuseof.com/tag/stop-annoying-uac-prompts-how-to-create-a-user-account-control-whitelist-windows/

Kuvenant

  • *
  • Posts: 5
    • View Profile
Re: Is a one click launch possible?
« Reply #6 on: 2020-04-27 23:52:27 »
I've gone through the task scheduler workaround.  It allows starting 7th Heaven without UAC, but it breaks the auto launch of FF7.  I'm starting to think that getting around UAC is not the solution and am trying to find a way to autokey through it instead.

Kuvenant

  • *
  • Posts: 5
    • View Profile
Re: Is a one click launch possible?
« Reply #7 on: 2020-05-02 02:23:32 »
I've got it starting easily enough.  I put "7th Heaven.exe" as the application path, and "/PROFILE:Default /LAUNCH" in the command line parameters.  To keep the startup pretty I overrode the default start screen settings to hide all windows that aren't exclusively fullscreen.

The UAC prompt still pops up.  UAC can be turned off, but that creates a security hole.  I haven't figured this out yet.

I created the following .bat file and set it in the 7th Heaven -> Settings -> Game Launcher -> Programs to Run Prior to FF7

Code: [Select]
@echo off
sleep 60
:check
tasklist /FI "IMAGENAME eq ff7.exe" 2>NUL | find /I /N "ff7.exe">NUL
if "%ERRORLEVEL%"=="0" (goto check) else "7th Heaven.exe" /Quit

Everything works fine, save for UAC.

Is there a hotkey for "Play" by chance?  If there were I can create a Windows Task Schedule that could bypass UAC (NFITC1's link), launch a schedule shortcut, auto-hotkey "Play", and leave everything else as is.

unab0mb

  • 7th Heaven Crew
  • *
  • Posts: 405
    • View Profile
    • 7th Heaven Web Site
Re: Is a one click launch possible?
« Reply #8 on: 2020-05-02 03:01:26 »
I'm glad I kept that in there. People call me crazy for keeping it because nobody would use it, or know what it is, but I knew that someone out there would take advantage of the "programs to launch" feature. So thank you.

There's no explicit hotkey, just the /launch parameter. On my current release (prob same as public release) I just have to press tab once then space bar for Play.