Luke Casteel
Luke Casteel

Reputation: 31

Mount/Unmount ISO and Run a program

I am trying to create a 1-click shortcut to play some old 90s games for an elementary school class.

I am trying to Mount an ISO to a specific drive Run the program Make sure the Drive is unmounted for the next game that gets cleared

I am new to scripting so I am not entirely sure where to start. Where I have gotten to is this:

@echo off

start N:\Games\ISOs\PoohRTR.iso

start N:\FlynnGames\PoohRTR\PoohRTR.exe

This has allowed me to get the game to boot up.. sometimes. I have noticed that the ISO will mount to drive E or F. I need to be able to have it get assigned to E every time. I am assuming I would want to have a command towards the beginning to Unmount drive F to ensure it is open and ready for the next ISO.

I appreciate any input given thank you!

Upvotes: 3

Views: 2111

Answers (1)

wasif
wasif

Reputation: 15478

A solution combining with powershell:

@echo off
powershell -command dismount-diskimage -imagepath "F:\"
powershell -command mount-diskimage -imagepath "N:\Games\ISOs\PoohRTR.iso"
start N:\FlynnGames\PoohRTR\PoohRTR.exe
goto :eof

Upvotes: 1

Related Questions