monarch684

Member
  • Content count

    4
  • Joined

  • Last visited

Community Reputation

0 Neutral

About monarch684

Profile Information

  • OS
    Windows 7 x64
  1. I have the new WinPE 4.0 and on the Dell 990 I can not get it to recongize the hard drive. I am booting from a usb which it recognizes with no problem. Here is what it sees: I have loaded several storage drivers just for the Dell 990 and even got the cab file for Pre-Installation use. When ever I use diskpart it sees the hard drive but it does not have a letter assigned to it. When I manually assign a letter to it, WinPE still does not see it. Any suggestions? Oh, I am trying to capture an image of the computer with imagex through WinPE. This process works on all other machines accept the Dell 990 & 960. Here is the capture script: @echo off echo Capturing Image ... imagex /capture /boot C: z:\images\temp\temp.wim temp pause Here is the WinPE script: @echo off wpeinit net use Z: \\networkshare cd /d Z: powershell set-executionpolicy bypass index.hta
  2. I modified the script as follows: $startnet = Get-Content $cmd | Where {$_ -ne "wpeinit"} $startnet += "@echo off`r`n" $startnet += "echo Inititalizing WinPE ...`r`n" $startnet += "wpeinit`r`n" $startnet += "echo Initialized!`r`n" $startnet += "echo Connecting to Image Server ...`r`n" $startnet += "net use Z: `"\\SRHS-SUP-FS\Desktop Support\Images`"`r`n" $startnet += "echo Connected!`r`n" $startnet += "cd /d Z:\`r`n" $startnet += "echo Launching GUI Interface ...`r`n" $startnet += "index.hta`r`n" It now works. Here is the final script: $dir = "C:\WinPE64" $waik = "C:\Program Files\Windows AIK\Tools\amd64" $tools = "C:\Program Files\Windows AIK\Tools\PETools\amd64" $pak = "C:\Program Files\Windows AIK\Tools\PETools\amd64\WinPE_FPs" $cmd = "$dir\mount\Windows\System32\startnet.cmd" CLS; write-host "Creating Directories" -ForegroundColor Yellow new-item -type directory $dir\ISO -force | Out-Null new-item -type directory $dir\ISO\boot -force | Out-Null new-item -type directory $dir\ISO\EFI -force | Out-Null new-item -type directory $dir\ISO\sources -force | Out-Null new-item -type directory $dir\mount -force | Out-Null write-host "Copying bootmgr to $dir\ISO\" -ForegroundColor Yellow copy-item $tools\bootmgr $dir\ISO\ -force write-host "Copying bootmgr.efi to $dir\ISO\" -ForegroundColor Yellow copy-item $tools\bootmgr.efi $dir\ISO\ -force write-host "Copying etfsboot.com to $dir\ISO\" -ForegroundColor Yellow copy-item $tools\boot\etfsboot.com $dir\ -force write-host "Copying efisys.bin to $dir\" -ForegroundColor Yellow copy-item $tools\boot\efisys.bin $dir\ -force write-host "Copying efisys_noprompt.bin to $dir\" -ForegroundColor Yellow copy-item $tools\boot\efisys_noprompt.bin $dir\ -force write-host "Copying boot folder and contents to $dir\ISO\boot\" -ForegroundColor Yellow copy-item $tools\boot\* $dir\ISO\boot\ -recurse -force write-host "Copying EFI folder and contents to $dir\ISO\EFI\" -ForegroundColor Yellow copy-item $tools\EFI\* $dir\ISO\EFI\ -recurse -force write-host "Copying winpe.wim to $dir\" -ForegroundColor Yellow copy-item $tools\winpe.wim $dir\ -force write-host "Copying imagex.exe to $dir\" -ForegroundColor Yellow copy-item $wiak\imagex.exe $dir\ -force Write-Host "" Write-Host "Mounting WinPE" -foregroundcolor magenta dism /Mount-Wim /WimFile:$dir\winpe.wim /index:1 /MountDir:$dir\mount Write-Host "" Write-Host "Adding Lan Drivers to WinPE" -foregroundcolor magenta dism /image:$dir\mount /Add-Driver /Driver:C:\LanDrivers\ /recurse Write-Host "" Write-Host "Adding Packages to WinPE" -foregroundcolor magenta dism /image:$dir\mount /Add-Package /PackagePath:"$pak\winpe-wmi.cab" /PackagePath:"$pak\winpe-scripting.cab" /PackagePath:"$pak\winpe-hta.cab" Write-Host "" Write-Host "Adding GUI Interface to WinPE" -foregroundcolor magenta $startnet = Get-Content $cmd | Where {$_ -ne "wpeinit"} $startnet += "@echo off`r`n" $startnet += "echo Inititalizing WinPE ...`r`n" $startnet += "wpeinit`r`n" $startnet += "echo Initialized!`r`n" $startnet += "echo Connecting to Image Server ...`r`n" $startnet += "net use Z: `"\\SRHS-SUP-FS\Desktop Support\Images`"`r`n" $startnet += "echo Connected!`r`n" $startnet += "cd /d Z:\`r`n" $startnet += "echo Launching GUI Interface ...`r`n" $startnet += "index.hta`r`n" Out-File -filepath $cmd -InputObject $startnet -Encoding ASCII Write-Host "" Write-Host "Saving Changes and UnMounting WinPE" -foregroundcolor magenta dism /Unmount-Wim /MountDir:$dir\mount /commit Write-Host "" Write-Host "Coping winpe.wim and Changing Name to boot.wim" -foregroundcolor magenta copy-item $dir\winpe.wim $dir\ISO\sources\boot.wim | Out-Null "list disk" | diskpart $disk = Read-Host "Select Disk Number" "select disk $disk", "clean", "create partition primary", "select partition 1", "active", "format fs=fat32 quick", "assign", "exit" | diskpart $drive = Read-Host "What letter was assigned to drive" Write-Host "" Write-Host "Copying WinPE Files to Jump Drive" -foregroundcolor magenta copy-item $dir\ISO\* $drive`:\ -recurse -force Write-Host "Completed!" -foregroundcolor green Start-sleep 3
  3. I tried this: $startnet = Get-Content $cmd | Where {$_ -ne "wpeinit"} $startnet += "@echo off" $startnet += "echo Inititalizing WinPE ..." $startnet += "wpeinit" $startnet += "echo Initialized!" $startnet += "echo Connecting to Image Server ..." $startnet += "net use Z: `"\\SRHS-SUP-FS\Desktop Support\Images`"" $startnet += "echo Connected!" $startnet += "cd /d Z:\" $startnet += "echo Launching GUI Interface ..." $startnet += "index.hta" Out-File -filepath $cmd -InputObject $startnet -Encoding ASCII and got this: It looks like there are no hard returns being put in.
  4. I have create a PowerShell script that builds my WInPE 3.0 and then writes it to my choosen jump drive. I automate some changes in the WinPE that seem to crash WinPE when launched. On the other hand if I make the same changes manually everything works fine. The actual WinPE build is fine it is the startnet.cmd that I am editing. Here is the code: $dir = "C:\WinPE64" $waik = "C:\Program Files\Windows AIK\Tools\amd64" $tools = "C:\Program Files\Windows AIK\Tools\PETools\amd64" $pak = "C:\Program Files\Windows AIK\Tools\PETools\amd64\WinPE_FPs" $cmd = "$dir\mount\Windows\System32\startnet.cmd" CLS; write-host "Creating Directories" -ForegroundColor Yellow new-item -type directory $dir\ISO -force | Out-Null new-item -type directory $dir\ISO\boot -force | Out-Null new-item -type directory $dir\ISO\EFI -force | Out-Null new-item -type directory $dir\ISO\sources -force | Out-Null new-item -type directory $dir\mount -force | Out-Null write-host "Copying bootmgr to $dir\ISO\" -ForegroundColor Yellow copy-item $tools\bootmgr $dir\ISO\ -force write-host "Copying bootmgr.efi to $dir\ISO\" -ForegroundColor Yellow copy-item $tools\bootmgr.efi $dir\ISO\ -force write-host "Copying etfsboot.com to $dir\ISO\" -ForegroundColor Yellow copy-item $tools\boot\etfsboot.com $dir\ -force write-host "Copying efisys.bin to $dir\" -ForegroundColor Yellow copy-item $tools\boot\efisys.bin $dir\ -force write-host "Copying efisys_noprompt.bin to $dir\" -ForegroundColor Yellow copy-item $tools\boot\efisys_noprompt.bin $dir\ -force write-host "Copying boot folder and contents to $dir\ISO\boot\" -ForegroundColor Yellow copy-item $tools\boot\* $dir\ISO\boot\ -recurse -force write-host "Copying EFI folder and contents to $dir\ISO\EFI\" -ForegroundColor Yellow copy-item $tools\EFI\* $dir\ISO\EFI\ -recurse -force write-host "Copying winpe.wim to $dir\" -ForegroundColor Yellow copy-item $tools\winpe.wim $dir\ -force write-host "Copying imagex.exe to $dir\" -ForegroundColor Yellow copy-item $wiak\imagex.exe $dir\ -force Write-Host "" Write-Host "Mounting WinPE" -foregroundcolor magenta dism /Mount-Wim /WimFile:$dir\winpe.wim /index:1 /MountDir:$dir\mount Write-Host "" Write-Host "Adding Lan Drivers to WinPE" -foregroundcolor magenta dism /image:$dir\mount /Add-Driver /Driver:C:\LanDrivers\ /recurse Write-Host "" Write-Host "Adding Packages to WinPE" -foregroundcolor magenta dism /image:$dir\mount /Add-Package /PackagePath:"$pak\winpe-wmi.cab" /PackagePath:"$pak\winpe-scripting.cab" /PackagePath:"$pak\winpe-hta.cab" Write-Host "" Write-Host "Adding GUI Interface to WinPE" -foregroundcolor magenta <#$startnet = [diagnostics.process]::start("notepad.exe", "'$dir\mount\Windows\System32\startnet.cmd'") $startnet.waitforexit() #> Get-Content $cmd | Where {$_ -ne "wpeinit"} | Out-File $cmd Write-Output "@echo off" >> $cmd Write-Output "echo Inititalizing WinPE ..." >> $cmd Write-Output "wpeinit" >> $cmd Write-Output "echo Initialized!" >> $cmd Write-Output "echo Connecting to Image Server ..." >> $cmd Write-Output "net use Z: `"\\SRHS-SUP-FS\Desktop Support\Images`"" >> $cmd Write-Output "echo Connected!" >> $cmd Write-Output "cd /d Z:\" >> $cmd Write-Output "echo Launching GUI Interface ..." >> $cmd Write-Output "index.hta" >> $cmd Write-Host "" Write-Host "Saving Changes and UnMounting WinPE" -foregroundcolor magenta dism /Unmount-Wim /MountDir:$dir\mount /commit Write-Host "" Write-Host "Coping winpe.wim and Changing Name to boot.wim" -foregroundcolor magenta copy-item $dir\winpe.wim $dir\ISO\sources\boot.wim | Out-Null "list disk" | diskpart $disk = Read-Host "Select Disk Number" "select disk $disk", "clean", "create partition primary", "select partition 1", "active", "format fs=fat32 quick", "assign", "exit" | diskpart $drive = Read-Host "What letter was assigned to drive" Write-Host "" Write-Host "Copying WinPE Files to Jump Drive" -foregroundcolor magenta copy-item $dir\ISO\* $drive`:\ -recurse -force Write-Host "Completed!" -foregroundcolor green Start-sleep 3 As you can see here: Write-Host "Adding GUI Interface to WinPE" -foregroundcolor magenta <#$startnet = [diagnostics.process]::start("notepad.exe", "'$dir\mount\Windows\System32\startnet.cmd'") $startnet.waitforexit() #> Get-Content $cmd | Where {$_ -ne "wpeinit"} | Out-File $cmd Write-Output "@echo off" >> $cmd Write-Output "echo Inititalizing WinPE ..." >> $cmd Write-Output "wpeinit" >> $cmd Write-Output "echo Initialized!" >> $cmd Write-Output "echo Connecting to Image Server ..." >> $cmd Write-Output "net use Z: `"\\SRHS-SUP-FS\Desktop Support\Images`"" >> $cmd Write-Output "echo Connected!" >> $cmd Write-Output "cd /d Z:\" >> $cmd Write-Output "echo Launching GUI Interface ..." >> $cmd Write-Output "index.hta" >> $cmd Write-Host "" I have palyed with manually entering the code and automating the input of the code. The error I get when I automate this is: Any ideas why this works when I manually edit this file verses automatically editting this file?