gpt4 book ai didi

powershell - 挂载/卸载ISO并运行程序

转载 作者:行者123 更新时间:2023-12-02 23:51:09 39 4
gpt4 key购买 nike

我正在尝试创建1-click快捷方式,以便在上小学时玩一些90年代的旧游戏。

我正在尝试将ISO挂载到特定驱动器
运行程序
确保已卸载驱动器,以清除下一个要清除的游戏

我是脚本新手,所以我不确定从哪里开始。我要去的地方是:

@echo off

start N:\Games\ISOs\PoohRTR.iso

start N:\FlynnGames\PoohRTR\PoohRTR.exe

这使我可以启动游戏..有时。我已经注意到,ISO将挂载到驱动器E或F。我需要每次都能将其分配给E。我假设我想在开始时有一个命令来卸下驱动器F,以确保它已打开并为下一个ISO准备就绪。

感谢您提供的任何输入,谢谢!

最佳答案

与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

关于powershell - 挂载/卸载ISO并运行程序,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59080836/

39 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com