|
|
@@ -1,11 +1,10 @@
|
|
|
|
|
|
-Set-ExecutionPolicy Bypass Process -Force
|
|
|
-$libpath = [System.IO.Path]::Combine($MyInvocation.MyCommand.Definition, "..", "LibWinImager.psm1")
|
|
|
+$libpath = [System.IO.Path]::Combine($MyInvocation.MyCommand.Definition, "..", "..", "LibWinImager.psm1")
|
|
|
|
|
|
-$logfilename = "DiskToImage_"+([System.DateTime]::Now).ToFileTime()+".log"
|
|
|
-$logpath = [System.IO.Path]::Combine($MyInvocation.MyCommand.Definition, "..", "log", $logfilename)
|
|
|
Import-Module -Name $libpath
|
|
|
|
|
|
+$logpath = LogFilePath $MyInvocation "ImageToDisk"
|
|
|
+
|
|
|
BecomeAdmin $MyInvocation
|
|
|
|
|
|
Function Main()
|
|
|
@@ -49,17 +48,6 @@ Would you like to contine?
|
|
|
WinDD ("\\.\PHYSICALDRIVE{0}" -f $disknum) $filename -Create $true
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
- $dialog = @"
|
|
|
-Write image
|
|
|
-
|
|
|
-"${filename}"
|
|
|
-
|
|
|
-to another Drive?
|
|
|
-"@
|
|
|
- $dialog
|
|
|
- $continue = AskContinue $dialog
|
|
|
-
|
|
|
}
|
|
|
|
|
|
try{
|