The NEW Build Your Own Arcade Controls

Main => Software Forum => Topic started by: breathsavers on April 14, 2016, 04:05:42 pm

Title: Help making .bat file for unmounting virtual drive
Post by: breathsavers on April 14, 2016, 04:05:42 pm
So I'm trying to get SSF launching and exiting correctly through Maximus Arcade. I am using Alcohol 120 because Daemon Tools won't install on my computer for some reason. I got SSF launching and the correct game mounting, but I can't for the life of me figure out how to unmount with a batch file. I got one at one point working with this command line:

@echo off
"C:\Program Files (x86)\Alcohol Soft\Alcohol 120\AxCmd.exe" AxCmd.exe D: /U

Virtual drive is D: and that is the correct path to the .exe

But it randomly stopped working. Or maybe I changed something. Either way, could anyone help me out? I think if I can get Maximus Arcade to run the batch file Post-Launch, then just have it close all processes, that will get me set up to load a new game. Right now, it will load the first game but when I exit and choose a different game, it gives an error and just starts the first game again because it never un-mounted. Thanks!
Title: Re: Help making .bat file for unmounting virtual drive
Post by: breathsavers on April 14, 2016, 04:24:41 pm
Just got it to work one time! Then I changed the .bat to .txt to check what I did, then saved without editing anything, then changed the extension to .bat again. Now it doesn't work. WHY??

Line that worked one time: "C:\Program Files (x86)\Alcohol Soft\Alcohol 120\AxCmd.exe" AxCmd.exe D: /U
Title: Re: Help making .bat file for unmounting virtual drive
Post by: burn_654 on April 14, 2016, 04:31:04 pm
Try giving the .bat file administrative rights or running just that line from a command prompt with administrative rights.
Title: Re: Help making .bat file for unmounting virtual drive
Post by: breathsavers on April 14, 2016, 05:16:50 pm
Thanks for the reply, but that didn't work unfortunately. I got a batch to work but then when I restarted my computer, it didn't anymore. Cannot figure it out.

Even when it was working, I can't get it to launch through Maximus Arcade. It'll close everything but whether I point it to the .bat or have it run AxCmd.exe directly with the command line, it won't unmount. Noticed that when the batch file stops working, Windows also won't let me unmount from Explorer with the right click menu anymore. Hmm....
Title: Re: Help making .bat file for unmounting virtual drive
Post by: breathsavers on April 14, 2016, 05:28:35 pm
Can I somehow just simulate the Delete key being pressed in Alcohol 120 whenever I exit a game? That also unmounts the virtual drive.
Title: Re: Help making .bat file for unmounting virtual drive
Post by: headkaze on April 14, 2016, 06:49:33 pm
Try

Code: [Select]
"C:\Program Files (x86)\Alcohol Soft\Alcohol 120\AxCmd.exe" 0: /U
Title: Re: Help making .bat file for unmounting virtual drive
Post by: breathsavers on April 14, 2016, 06:53:37 pm
Try

Code: [Select]
"C:\Program Files (x86)\Alcohol Soft\Alcohol 120\AxCmd.exe" 0: /U

Thanks! Good thought, but no go. I have the working batch file now, I just can't figure out why sometimes after running Maximus Arcade it doesn't work anymore. I also don't know why MA isn't launching the batch file when I exit a game. I have it set to run under the Post-Launch tab and am exiting the frontend with the Quit Executable shortcut buttons.
Title: Re: Help making .bat file for unmounting virtual drive
Post by: headkaze on April 14, 2016, 06:59:21 pm
Maybe try adding "cmd /c" before the mount line.

Eg.
Code: [Select]
cmd /c "C:\Program Files (x86)\Alcohol Soft\Alcohol 120\AxCmd.exe" 0: /U
That way it will do the unmounting in the background.
Title: Re: Help making .bat file for unmounting virtual drive
Post by: breathsavers on April 14, 2016, 07:07:19 pm
Maybe try adding "cmd /c" before the mount line.

Eg.
Code: [Select]
cmd /c "C:\Program Files (x86)\Alcohol Soft\Alcohol 120\AxCmd.exe" 0: /U
That way it will do the unmounting in the background.

Worked outside of Maximus, didn't work when quitting a game within Maximus. Also the batch file wouldn't work anymore outside Maximus after quitting out of the frontend. So it seems something in Maximus is keeping the batch file from working... The batch file will work again if I click into Alcohol 120 and manually unmount the current image.
Title: Re: Help making .bat file for unmounting virtual drive
Post by: Thenasty on April 14, 2016, 11:27:31 pm
try

@echo off
cd\
cd progra~2\alcoho~1\alcoho~1
axcmd.exe /D: /U
Title: Re: Help making .bat file for unmounting virtual drive
Post by: breathsavers on April 15, 2016, 12:35:38 pm
try

@echo off
cd\
cd progra~2\alcoho~1\alcoho~1
axcmd.exe /D: /U

Thanks for the reply thenasty. That command line worked outside MA, but still didn't work when I closed the game in the frontend. Just had to delete the "/" before the "D:"
Title: Re: Help making .bat file for unmounting virtual drive
Post by: breathsavers on April 15, 2016, 12:49:16 pm
Here's the .bat file that works outside of MA and my config within MA.
Title: Re: Help making .bat file for unmounting virtual drive
Post by: breathsavers on April 17, 2016, 08:39:14 pm
Thank you guys for all your help, anyone else have ideas?? I'm so stumped. I think something in MA is causing the unmounted batch file to not work.
Title: Re: Help making .bat file for unmounting virtual drive
Post by: Thenasty on April 18, 2016, 12:58:35 pm
how about using  SUBST ? instead of Alcohol
Title: Re: Help making .bat file for unmounting virtual drive
Post by: breathsavers on April 18, 2016, 02:42:29 pm
how about using  SUBST ? instead of Alcohol

Never heard of it, I'll give it a shot!
Title: Re: Help making .bat file for unmounting virtual drive
Post by: DrakeTungsten on April 24, 2016, 11:30:12 pm
If SUBST isn't working out for you, the next thing I would do is see if an AHK script would work instead of a batch file, if that's feasible with MA.
Title: Re: Help making .bat file for unmounting virtual drive
Post by: breathsavers on April 25, 2016, 09:49:41 am
If SUBST isn't working out for you, the next thing I would do is see if an AHK script would work instead of a batch file, if that's feasible with MA.

Thanks for the suggestion, I'll do some research on those and see if I can figure it out.
Title: Re: Help making .bat file for unmounting virtual drive
Post by: Mario on April 25, 2016, 01:55:12 pm
Here's the .bat file that works outside of MA and my config within MA.

According to the Maximus Arcade docs, the "Path" is the location of the executable and the "Command Line" box has the optional command line arguments. In the third picture, you put the executable name in the "Command Line" box. This should be removed.

Mario
Title: Re: Help making .bat file for unmounting virtual drive
Post by: breathsavers on April 30, 2016, 06:56:01 pm
Here's the .bat file that works outside of MA and my config within MA.

According to the Maximus Arcade docs, the "Path" is the location of the executable and the "Command Line" box has the optional command line arguments. In the third picture, you put the executable name in the "Command Line" box. This should be removed.

Mario

That's actually in the "Pre-Launch" settings which are working fine. It's the "Post-Launch" that I can't get working to unmount the Sega CD game I just loaded/played. Unless you think those could effect each other? I'm hesitant to mess with Pre-Launch since it seems to be working.
Title: Re: Help making .bat file for unmounting virtual drive
Post by: headkaze on May 01, 2016, 12:01:24 am
That's actually in the "Pre-Launch" settings which are working fine. It's the "Post-Launch" that I can't get working to unmount the Sega CD game I just loaded/played. Unless you think those could effect each other? I'm hesitant to mess with Pre-Launch since it seems to be working.

Since your Pre-Launch settings are working fine why don't you copy the settings with the arguments changed to unmount into Post-Launch? I don't see the need to use a batch file.
Title: Re: Help making .bat file for unmounting virtual drive
Post by: breathsavers on May 01, 2016, 01:29:38 pm
That's actually in the "Pre-Launch" settings which are working fine. It's the "Post-Launch" that I can't get working to unmount the Sega CD game I just loaded/played. Unless you think those could effect each other? I'm hesitant to mess with Pre-Launch since it seems to be working.

Since your Pre-Launch settings are working fine why don't you copy the settings with the arguments changed to unmount into Post-Launch? I don't see the need to use a batch file.

That's what's weird about this whole thing. I have tried using a command line that works in the cmd prompt, but it doesn't work when I try to run it through the command line Post-Launch in MA. There's something I need to work around in MA. I might try a different program or something.
Title: Re: Help making .bat file for unmounting virtual drive
Post by: Mario on May 18, 2016, 10:34:34 am
That's actually in the "Pre-Launch" settings which are working fine. It's the "Post-Launch" that I can't get working to unmount the Sega CD game I just loaded/played. Unless you think those could effect each other? I'm hesitant to mess with Pre-Launch since it seems to be working.

Maybe it's just a coincidence that the pre-launch settings are working. I would suggest modifying those settings to align to the docs and see if it still works fine.

Mario