Main Restorations Software Audio/Jukebox/MP3 Everything Else Buy/Sell/Trade
Project Announcements Monitor/Video GroovyMAME Merit/JVL Touchscreen Meet Up Retail Vendors
Driving & Racing Woodworking Software Support Forums Consoles Project Arcade Reviews
Automated Projects Artwork Frontend Support Forums Pinball Forum Discussion Old Boards
Raspberry Pi & Dev Board controls.dat Linux Miscellaneous Arcade Wiki Discussion Old Archives
Lightguns Arcade1Up Try the site in https mode Site News

Unread posts | New Replies | Recent posts | Rules | Chatroom | Wiki | File Repository | RSS | Submit news

  

Author Topic: Help making .bat file for unmounting virtual drive  (Read 5392 times)

0 Members and 1 Guest are viewing this topic.

breathsavers

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 91
  • Last login:September 27, 2024, 03:14:01 pm
  • I want to build my own arcade controls!
Help making .bat file for unmounting virtual drive
« 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!
« Last Edit: April 14, 2016, 04:15:55 pm by breathsavers »

breathsavers

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 91
  • Last login:September 27, 2024, 03:14:01 pm
  • I want to build my own arcade controls!
Re: Help making .bat file for unmounting virtual drive
« Reply #1 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

burn_654

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 159
  • Last login:April 29, 2025, 04:25:44 pm
  • I want to build my own arcade controls!
Re: Help making .bat file for unmounting virtual drive
« Reply #2 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.

breathsavers

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 91
  • Last login:September 27, 2024, 03:14:01 pm
  • I want to build my own arcade controls!
Re: Help making .bat file for unmounting virtual drive
« Reply #3 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....
« Last Edit: April 14, 2016, 05:35:46 pm by breathsavers »

breathsavers

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 91
  • Last login:September 27, 2024, 03:14:01 pm
  • I want to build my own arcade controls!
Re: Help making .bat file for unmounting virtual drive
« Reply #4 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.

headkaze

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2943
  • Last login:August 14, 2023, 02:00:48 am
  • 0x2b|~0x2b?
Re: Help making .bat file for unmounting virtual drive
« Reply #5 on: April 14, 2016, 06:49:33 pm »
Try

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

breathsavers

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 91
  • Last login:September 27, 2024, 03:14:01 pm
  • I want to build my own arcade controls!
Re: Help making .bat file for unmounting virtual drive
« Reply #6 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.

headkaze

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2943
  • Last login:August 14, 2023, 02:00:48 am
  • 0x2b|~0x2b?
Re: Help making .bat file for unmounting virtual drive
« Reply #7 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.

breathsavers

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 91
  • Last login:September 27, 2024, 03:14:01 pm
  • I want to build my own arcade controls!
Re: Help making .bat file for unmounting virtual drive
« Reply #8 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.
« Last Edit: April 14, 2016, 07:12:45 pm by breathsavers »

Thenasty

  • Trade Count: (+17)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 4419
  • Last login:Today at 12:13:19 am
    • Thenasty's Arcademania Horizontal/Vertical monitor setup.
Re: Help making .bat file for unmounting virtual drive
« Reply #9 on: April 14, 2016, 11:27:31 pm »
try

@echo off
cd\
cd progra~2\alcoho~1\alcoho~1
axcmd.exe /D: /U
Thenasty's Arcademania Horizontal/Vertical setup.
http://forum.arcadecontrols.com/index.php?topic=26696.0

Free VGA Breakout Cable
http://forum.arcadecontrols.com/index.php?topic=38228.0

Ultimate All in One Coin Mech write up (Make your own)
http://forum.arcadecontrols.com/index.php?topic=19200.0

breathsavers

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 91
  • Last login:September 27, 2024, 03:14:01 pm
  • I want to build my own arcade controls!
Re: Help making .bat file for unmounting virtual drive
« Reply #10 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:"

breathsavers

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 91
  • Last login:September 27, 2024, 03:14:01 pm
  • I want to build my own arcade controls!
Re: Help making .bat file for unmounting virtual drive
« Reply #11 on: April 15, 2016, 12:49:16 pm »
Here's the .bat file that works outside of MA and my config within MA.

breathsavers

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 91
  • Last login:September 27, 2024, 03:14:01 pm
  • I want to build my own arcade controls!
Re: Help making .bat file for unmounting virtual drive
« Reply #12 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.

Thenasty

  • Trade Count: (+17)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 4419
  • Last login:Today at 12:13:19 am
    • Thenasty's Arcademania Horizontal/Vertical monitor setup.
Re: Help making .bat file for unmounting virtual drive
« Reply #13 on: April 18, 2016, 12:58:35 pm »
how about using  SUBST ? instead of Alcohol
Thenasty's Arcademania Horizontal/Vertical setup.
http://forum.arcadecontrols.com/index.php?topic=26696.0

Free VGA Breakout Cable
http://forum.arcadecontrols.com/index.php?topic=38228.0

Ultimate All in One Coin Mech write up (Make your own)
http://forum.arcadecontrols.com/index.php?topic=19200.0

breathsavers

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 91
  • Last login:September 27, 2024, 03:14:01 pm
  • I want to build my own arcade controls!
Re: Help making .bat file for unmounting virtual drive
« Reply #14 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!

DrakeTungsten

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 287
  • Last login:August 14, 2022, 06:36:45 pm
  • I effed with the wrong person!
    • No Quarter - a basic FE, WIP
Re: Help making .bat file for unmounting virtual drive
« Reply #15 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.
No Quarter - a basic FE, WIP

breathsavers

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 91
  • Last login:September 27, 2024, 03:14:01 pm
  • I want to build my own arcade controls!
Re: Help making .bat file for unmounting virtual drive
« Reply #16 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.

Mario

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 278
  • Last login:March 29, 2021, 08:55:12 pm
  • Mmmmm.....arcades!
    • Mario's Arcade Page
Re: Help making .bat file for unmounting virtual drive
« Reply #17 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

breathsavers

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 91
  • Last login:September 27, 2024, 03:14:01 pm
  • I want to build my own arcade controls!
Re: Help making .bat file for unmounting virtual drive
« Reply #18 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.

headkaze

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2943
  • Last login:August 14, 2023, 02:00:48 am
  • 0x2b|~0x2b?
Re: Help making .bat file for unmounting virtual drive
« Reply #19 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.

breathsavers

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 91
  • Last login:September 27, 2024, 03:14:01 pm
  • I want to build my own arcade controls!
Re: Help making .bat file for unmounting virtual drive
« Reply #20 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.

Mario

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 278
  • Last login:March 29, 2021, 08:55:12 pm
  • Mmmmm.....arcades!
    • Mario's Arcade Page
Re: Help making .bat file for unmounting virtual drive
« Reply #21 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