Jump to content

stiddlefix

Fremen
  • Content count

    2
  • Joined

  • Last visited

Community Reputation

0 Neutral

About stiddlefix

  • Rank
    Sand Flea
  1. Hi 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 Emperor1.iso Atreides2.iso Harkonnen3.iso Ordos4.iso 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 Do{ 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\" $resourcecfg=$installfolder+"resource.cfg" #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) $drive=$EmpMount[0].DeviceID #now $drive contains the previously mounted emperor disk - we will now replace the correct CD path with this $seekMe='(?m)(.*)^'+$CDd+'[\r\n]+.:.' $Replaceme=$CDd+[char][int]13+[char][int]10+$drive+"\" (get-content -raw $resourcecfg) |foreach-object {$_ -replace $seekMe,$Replaceme} |set-content $resourcecfg # and lastly the Movie path $seekMe='(?m)(.*)^'+$Md+'[\r\n]+.:.' $Replaceme=$Md+[char][int]13+[char][int]10+$drive+"\" (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 $CDdrive="CD1" $Mdrive="MOVIES1" $EmpMounts=(Get-WmiObject Win32_LogicalDisk -filter "VolumeName='Emperor1'") if ($EmpMounts -ne $null) { updatefile $EmpMounts $CDdrive $Mdrive } #now disk 2 $CDdrive="CD2" $Mdrive="MOVIES2" $EmpMounts=(Get-WmiObject Win32_LogicalDisk -filter "VolumeName='Emperor2'") if ($EmpMounts -ne $null) { updatefile $EmpMounts $CDdrive $Mdrive } #and disk 3 $CDdrive="CD3" $Mdrive="MOVIES3" $EmpMounts=(Get-WmiObject Win32_LogicalDisk -filter "VolumeName='Emperor3'") if ($EmpMounts -ne $null) { updatefile $EmpMounts $CDdrive $Mdrive } #final edit is disk 4 $CDdrive="CD4" $Mdrive="MOVIES4" $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" &($installfolder+$executablefile) 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 RUNNING THE GAME 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)
  2. Hi Yes its possible to get Dune Emperor Running without swapping CD's using Windows 10 like I am doing. you have to do the following things :- 1. get the Install Fix patch and 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 (hint :- Actions menu,Copy Disc,To Disc image will do the job) Name each image file name these following names respectively for disks 1 to 4 (and you will make life easy for yourself when mounting) Emperor1.iso Atreides2.iso Harkonnen3.iso Ordos4.iso 3. Mount your iso - any windows file explorer window select one of the .iso files and right click. click MOUNT in the right click menu and a new CDROM drive will appear in file explorer with a new drive letter. remember that drive letter and the associated disk number 1 2 3 or 4 (repeat 3. for all the other images) 4 . EDIT the resource FILE ... go to your C:\westwood\Emperor\resource.cfg file and open it with notepad This is a plain text file and tells dune emperor which cdroms you are using - it has 8 entries we need to alter in the entry for CD1 you must put the drive letter that you mounted Disk 1 For CD2 the drive letter that you mounted CD2 etc for all 4 entries EXAMPLE Emperor1.iso was mounted on the F: drive in my example - find in the resource file the line CD1 and just the drive letter following will need to be changed to F in my case CD1 F:\ keep it exactly as it is in the file when you found it - just change the drive letter to the correct one you mounted above repeat that for CD2 3 and 4 repeat the same drive letter change for MOVIES1 which will also be F for disk 1 and repeat for all the Movies 2 3 and 4 entries to their correct drive letters MOVIES1 F:\Movies after doing these 8 edits save and close resource.cfg file Launch Dune Emperor and you will not have to change the disks during the game CAN IT BE SIMPLER Why not write a script that mounts the Cdroms, edits the resource file and launches the game ? Actually yes I have done that and it runs in powershell. (i wont post as I don't know all the policies on this forum ) stiddlefix
×