Jump to content

How to run Dune Emperor Windows 10 with mounted iso


Recommended Posts

I want to share how I  get Dune Emperor Running without swapping CD's using Windows 10

Its a little advanced as I am gong to explain how to mount .iso file's  using a script so that all the work to setup is one time

and you can then just play the game anytime you want  (it will mount all 4 disks and update the resource file correctly)

 First properly install dune onto windows 10
1. get the Install Fix patch from the fed2k site and use it to fully install Dune Emperor - do not change the location it installs (c:\westwood) just leave it to install how it wants to
You will be using Windows 10 built in support for mounting virtual disks (earlier windows versions may work) .
2. You will need to make an .iso image from all the four disks (windows 10 cant do this - so use free 'infraRecorder' to do it   (find it on google) (hint :- Actions menu,Copy Disc,To Disc image will do the job)
Name each image file name exactly these following names respectively for disks 1 to 4

they must be named exactly that  - put all the 4 .iso files in one folder. in the same folder  open notepad and save with the filename    start emperor.ps1  this can be any name as long as it ends in .ps1

 paste the following script into   start emperor.ps1 and save it in the same folder as the .iso files

Paste the following into notepad : -


#first sort out the working Directory of this script in case its launched from a shortcut i still want it to work
$ThisFolder =Split-Path -Parent -Path $MyInvocation.MyCommand.Definition
CD $ThisFolder
# this function will dismount ISO images provided. upon a succesful dismount it will check if another copy of the same is mounted and dismount that one too. (this will continue for a max of 10 dismounts of the same image) 
# it will exit once there are no matching images to dismount or if it has tried more than 10 times.
cd|Convert-Path .
function dismountThis($imagetoeject){
$ismounted = "true"
$maxtries = 0
if ((Get-DiskImage -ErrorAction SilentlyContinue -ImagePath $imagetoeject).DevicePath) {dismount-diskimage -imagepath $imagetoeject} else {$ismounted = "false"}
$maxtries = $maxtries +1
sleep -Milliseconds 100
if ($maxtries -gt 10) { $ismounted = "false"}
until( $ismounted -eq "false")
#------------------------------------------------------------------ end of functions -----------------------------------------------------------------------------
# first lets dismount all four of the Emperor disk images - this script needs to be in the same folder as the ISO's
$ThisFolder = Convert-Path .
dismountThis($ThisFolder + "\Emperor1.iso")
dismountThis($ThisFolder + "\Atreides2.iso")
dismountThis($ThisFolder + "\Harkonnen3.iso")
dismountThis($ThisFolder + "\Ordos4.iso")
# now mount all four of the Emperor disk images
sleep -Milliseconds 250
mount-diskimage  -imagepath ($ThisFolder + "\Emperor1.iso")
sleep -Milliseconds 250
mount-diskimage  -imagepath ($ThisFolder + "\Harkonnen3.iso")
sleep -Milliseconds 250
mount-diskimage  -imagepath ($ThisFolder + "\Atreides2.iso")
sleep -Milliseconds 250
mount-diskimage  -imagepath ($ThisFolder + "\Ordos4.iso")

#edit the resource file with the drive that has been mounted
$installfolder = "C:\Westwood\Emperor\"
#The following function edits the resource.cfg file of Dune Emperor changing the Cd and movie paths to 
# the drive letter of the correct virtual CDROM that has been previously mounted 
Function updatefile { 
param ([array]$EmpMount,[string]$CDd,[string]$Md)
#now $drive contains the previously mounted emperor disk - we will now replace the correct CD path with this
(get-content -raw $resourcecfg) |foreach-object {$_ -replace $seekMe,$Replaceme} |set-content $resourcecfg
# and lastly the Movie path
(get-content -raw $resourcecfg) |foreach-object {$_ -replace $seekMe ,$Replaceme} |set-content $resourcecfg 
Write-Host "We replaced" $drive "into " $CDd "and " $Md $lines
#lets do disk 1 first
$EmpMounts=(Get-WmiObject Win32_LogicalDisk -filter "VolumeName='Emperor1'")
if ($EmpMounts -ne $null) {
updatefile $EmpMounts $CDdrive $Mdrive
#now disk 2
$EmpMounts=(Get-WmiObject Win32_LogicalDisk -filter "VolumeName='Emperor2'")
if ($EmpMounts -ne $null) {
updatefile $EmpMounts $CDdrive $Mdrive
#and disk 3
$EmpMounts=(Get-WmiObject Win32_LogicalDisk -filter "VolumeName='Emperor3'")
if ($EmpMounts -ne $null) {
updatefile $EmpMounts $CDdrive $Mdrive
#final edit is disk 4
$EmpMounts=(Get-WmiObject Win32_LogicalDisk -filter "VolumeName='Emperor4'")
if ($EmpMounts -ne $null) {
updatefile $EmpMounts $CDdrive $Mdrive
# tidy up the resource file length
foreach ($LINE in $(Get-Content $resourcecfg))  {  if ("$LINE$LAST_LINE" -ne "") {$filestring=$filestring+$LINE+"`r`n"} ; $LAST_LINE = $LINE}
set-content $filestring -path $resourcecfg
Write-Host "Here we go"
Remove-Variable filestring
Remove-Variable EmpMounts
Remove-Variable CDdrive
Remove-Variable Mdrive

#Run the game
$installfolder = "C:\Westwood\Emperor\"
$executablefile = "EMPEROR.EXE"

As said before save this file as start emperor.ps1 and save it in the same folder as the .iso files

Thats all the installation complete


 Open the folder with the iso's and find the start emperor.ps1 file using windows explorer,  Right click the start emperor.ps1 file and select 'run with powershell'

you will see each .iso disk get unmounted then mounted as  4 new drives, the resource editing will briefly report progress to the script window that opens and the game will then start

the game will now run without requests for disk mounts

(This script is all my own work)


Link to comment
Share on other sites

  • 9 months later...
  • 4 months later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...