ade*_*nun 6 windows batch-file windows-8 windows-8.1
我有一个游戏,我已经备份到一个iso文件(我的笔记本电脑中的磁盘驱动器很嘈杂),并希望从一个快捷方式运行它,而不必每次都安装iso文件.我运行Windows 8.1,因此iso文件本机安装.有任何想法吗?
powershell -Command Mount-DiskImage -ImagePath "C:\winxp.iso"
Run Code Online (Sandbox Code Playgroud)
请参阅http://technet.microsoft.com/en-us/library/hh848706.aspx
整个脚本"run.ps1"可能如下所示:
mount-diskimage -imagepath C:\winxp.iso
$d = (get-diskimage C:\winxp.iso | Get-Volume).DriveLetter
$d = $d + ":\setup.exe"
start-process "$d" -wait
dismount-diskimage -imagepath C:\winxp.iso
Run Code Online (Sandbox Code Playgroud)
它是powershell脚本,因此您需要从上下文菜单或cmd中运行它
powershell C:\...\run.ps1
Run Code Online (Sandbox Code Playgroud)
如果它说明了系统限制,你需要运行powershell和命令
set-executionpolicy unrestricted
Run Code Online (Sandbox Code Playgroud)