Skip to content

Commit

Permalink
Merge pull request #40 from squarit/fix-mountwim-dism-path
Browse files Browse the repository at this point in the history
Fix: Use dism variable instead of dism.exe from path to mount wim
  • Loading branch information
helge000 committed Jul 25, 2017
2 parents 2ad69a3 + 2e4d378 commit 767e450
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion inc/Functions.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ function UnmountWim([string]$mount_dir, [string]$commit_yn = "y") {
function MountWim([string]$wim_file, [string]$mount_dir, [string]$wim_image_name) {
#Command to mount the WIM
Write-Host "Mounting ${wim_file} to ${mount_dir}, Image: ${wim_image_name}. Boot image: ${boot}" -foregroundcolor "Magenta"
Invoke-Expression "& 'dism' /mount-wim /wimfile:$wim_file /mountdir:$mount_dir /name:'$wim_image_name'"
Invoke-Expression "& '$dism' /mount-wim /wimfile:$wim_file /mountdir:$mount_dir /name:'$wim_image_name'"
if ($lastexitcode -ne 0) {
Write-Host "Error. Trying to Unmount current (no commit)" -foregroundcolor "Yellow"
UnmountWim $mount_dir "n"
Expand Down

0 comments on commit 767e450

Please sign in to comment.