klitaa0 Posted Thursday at 08:49 AM Posted Thursday at 08:49 AM Hi I'm new to the forum hope I'm in the right place I have created a shutdown bat file in the manually added games area. I right click on the so called game called Shutdown which has a administrator privileged shortcut to the actual shutdown bat file and it works fine. The Shutdown game displays it's unavailable on the right hand side of launchbox but it works fine if you right click the icon. The problem is exiting from launch the game Shutdown which is the bat file doesnt save on return Please any advice would be great Cheers Andy Quote
JoeViking245 Posted Thursday at 12:33 PM Posted Thursday at 12:33 PM 3 hours ago, klitaa0 said: Please any advice would be great To clarify: You created a batch file (that does something) called Shutdown.bat You then created a shortcut for that batch file. Shutdown.bat - Shortcut.lnk You edited the shortcut, clicked Advanced and checked Run as administrator You imported the .lnk file into LaunchBox as "Other" (vs. as a ROM file.) aka, it's not using an emulator as shown in that "games" Emulation section If you right-click the "game" and select Play, it works ...but in the Game Details panel (right side) it shows Unavailable. (where others would show Play) After right-clicking and selecting Play, the batch file 'does its thing'. But when returning to LaunchBox, the game is no longer there. Unless you mean something different by "doesn't save on return"? Is that correct? Because 5) and 6) contradict each other and doesn't make sense. Can you edit your Shutdown "game" (in LaunchBox) and share some screenshots The (main) Metadata section The Launching section The Emulation section Quote
klitaa0 Posted Thursday at 12:50 PM Author Posted Thursday at 12:50 PM Firstly Thankyou for replying. The third screen shot by right clicking and selecting Additional App the shutdown batch file works and closes launchbox. When I reopen launchbox the Shutdown icon, program and all has not been saved. Any clues would be great Cheers Andy Quote
JoeViking245 Posted Thursday at 01:14 PM Posted Thursday at 01:14 PM 11 minutes ago, klitaa0 said: by right clicking and selecting Additional App the shutdown batch file works and closes launchbox. Ahh... Since this is "its own game", instead of adding an Additional App to itself, you want the Application Path to be in the games Launching section. Then remove the Additional App. Also, in the Emulation section (3 below Launching), be sure that Use an emulator to play this game (primarily for console games) is un-checked. Quote
klitaa0 Posted Thursday at 01:43 PM Author Posted Thursday at 01:43 PM Thanks Joe That worked I can now shutdown Launchbox and my PC without right clicking the Shutdown Icon. But the problem I still have is when I reboot my PC and run Launchbox the Shutdown Games Icon is gone, nothing is saved. Launchbox also doesn't save any changes if I exit launchbox via the normal exit menu. Cheers Andy Quote
JoeViking245 Posted Thursday at 03:11 PM Posted Thursday at 03:11 PM 22 minutes ago, klitaa0 said: Thanks Joe That worked I can now shutdown Launchbox and my PC without right clicking the Shutdown Icon. But the problem I still have is when I reboot my PC and run Launchbox the Shutdown Games Icon is gone, nothing is saved. Launchbox also doesn't save any changes if I exit launchbox via the normal exit menu. Glad to hear it (mostly) worked. Sounds like what's happening is LaunchBox is being forced closed and changes aren't being saved. The process: When you close LaunchBox (normally), the UI will close and [hiding] in the background, LaunchBox saves any changes you made. Theory: When you close LaunchBox, you don't want to "see" it so you can "go about your other business". Changes you made are saved (again, in the background) for when you next start LaunchBox. The fix: Don't do it that way. Alternate: Use Big Box and then you can shut down the PC from its System Menu. System Menu < Shut Down. Plan "B": Use a batch file start LaunchBox: start LB (you play games or whatever) you exit LB normally it waits for LB background processes to finish then shuts down the PC. @echo off cd "D:\LaunchBox" start "" "LaunchBox.exe" :waitloop tasklist /FI "IMAGENAME eq LaunchBox.exe" | find /I "LaunchBox.exe" >nul if not errorlevel 1 ( timeout /t 2 >nul goto waitloop ) rem start your shutdown process here rem shutdown -s -f Change line #2 to your LaunchBox location. The commented out "shutdown" line will shut down (-s) the PC and force close (-f) any lingering apps (so it doesn't get hung up) and does not require it to be ran as Administrator (assuming you're logged on as Admin on your PC). Or at least that's supposed to work that way. "shutdown -s -f" NOT TESTED BY ME! You can create a shortcut to 'this' batch file and set Run to Minimized to get the Command Prompt window out of the way. Quote
klitaa0 Posted Thursday at 10:15 PM Author Posted Thursday at 10:15 PM Thanks so much will try later today Cheers Andy Quote
klitaa0 Posted yesterday at 07:01 AM Author Posted yesterday at 07:01 AM Joe Again thanks for your help. I used the batch file you suggested and Launchbox starts fine used a shortcut so ran it minimized so no command prompt Created my Shutdown batch file under games but when I exit launchbox it still doesn't save anything. I'm lost to understand why its not saving this Batch file under games. It does now show batch file as available and clicking it under games works It just cant be saved. The whole reason for having this type of shutdown for my Arcade Machine is that the grandkids can shut down the PC without using the mouse. Obviously other option would to use Bigbox. Cheers Andy Quote
Solution klitaa0 Posted yesterday at 11:12 AM Author Solution Posted yesterday at 11:12 AM Fixed it Created game called shutdown with batch file to shutdown under a dos game option, then removed the "Run as Dos" Exited from Launchbox via my shutdown batch file returned to Launchbox and Game Shutdown batch file was saved correctly. Andy 1 Quote
JoeViking245 Posted yesterday at 11:18 AM Posted yesterday at 11:18 AM 2 minutes ago, klitaa0 said: Fixed it Created game called shutdown with batch file to shutdown under a dos game option, then removed the "Run as Dos" Nice!!! I wonder if in the prior one, was the Additional App removed? eh... Doesn't matter. Glad you got it working! Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.