Jump to content

WreX

Member
  • Posts

    84
  • Joined

  • Last visited

  • Donations

    0.00 USD 
  • Country

    United States

Everything posted by WreX

  1. You don't need to specify the partition for NTLDR, C:\BOOT.INI determines what partition XP will boot from. I use the command "bcdedit -set {ntldr} device boot".
  2. My only solution was to run a batch file during the first boot and login after SysPrep to reconfigure my BCD entry. I decided on a static GUID so I wouldn't have to keep track of dynamic ones. Here's what I run from the batch file to re-install my entry: bcdedit -set {ramdiskoptions} ramdisksdidevice partition=C: bcdedit -set {ramdiskoptions} ramdisksdipath \BOOT\BOOT.sdi bcdedit -set {00000000-0000-0000-0000-000000000001} device ramdisk=[C:]\WINPE\WINPE.WIM,{ramdiskoptions} bcdedit -set {00000000-0000-0000-0000-000000000001} path \WINDOWS\SYSTEM32\BOOT\WINLOAD.EXE bcdedit -set {00000000-0000-0000-0000-000000000001} osdevice ramdisk=[C:]\WINPE\WINPE.WIM,{ramdiskoptions} bcdedit -set {00000000-0000-0000-0000-000000000001} systemroot \WINDOWS bcdedit -set {00000000-0000-0000-0000-000000000001} winpe yes bcdedit -set {00000000-0000-0000-0000-000000000001} detecthal yes bcdedit -set {00000000-0000-0000-0000-000000000001} advancedoptions no bcdedit -displayorder {00000000-0000-0000-0000-000000000001} -addlast It leaves my boot option in a bad state for one boot, but the user isn't present to do anything at that point, so fixing it on the first boot wasn't a problem.
  3. Does your USB key have the file \ISO\boot\bootfix.bin? That's what's used on CDs for the "Press any key..." message.
  4. My post here might help. You can just put the WIM file you have in your \ISO\sources\ folder on the hard drive and use the Vista Boot Loader configured with bcdedit to boot it. I have my WIM file sitting on C: and XP on D: (but only boot.ini is involved with that). The bcdedit commands in my post show how to set it up that way. You could have both the WIM and your OS on C: as long as boot.ini is pointing at the right location for your OS.
  5. It sounds more like your boot.ini file is not pointing at the correct location for your recovery partition.
  6. I've had that happen on occasion. I redirect the output from my diskpart commands to log files and when that happened I think it said the disk wasn't ready so I added routines to loop waiting for disk readiness to be reported in WMI.
  7. The registry error at that first boot usually means the partition that you installed the image on was not formatted before the image is installed. I've seen that a handful of times. I don't have any experience with setres or using winpeshl.ini, but you don't need to use MSHTA.EXE to launch an HTA file from a batch file like startnet.cmd, PE will launch it by association to the full path if you just execute the HTA file name.
  8. Why do you want to change the label of the volume? What does it affect?
  9. If you know the diskpart commands you're going to run, I suggest the following: Sub RunFull Set objShell = CreateObject("WScript.Shell") cmd = "%comspec% /c diskpart /s X:\windows\system32\full_diskpart.txt" objShell.Run cmd,0,1 ' Run the command in a hidden window and wait for a return cmd = "%comspec% /c imagex /apply c:\sp1.wim 1 d:\" objShell.Run cmd,0,1 valAnswer = msgbox("Recovery Complete. Would you like to Restart now?",vbYesNo,"Restart now?") If valAnswer = vbYes Then cmd = "wpeutil reboot" objShell.Run cmd,0,1 End If End Sub
  10. I just replied to that thread you linked for the card reader. Maybe some of that code would be useful to you.
  11. Whenever I boot into PE from CD or locally I run two batch files via startnet.cmd, so I'm not sure if this will help when booted from a USB disk. The first changes the CD / DVD drive that has the bootable PE CD (label "CD_ROM") to K:, the second checks for C:, D:, and E: (the only hard drive partitions I care about) to be on Disk 0 and changes them to P:, Q:, and / or R: if they're not. Changes the CD / DVD drive with the bootable PE CD to K: @echo off echo list volume > X:\ListCD.txt FOR /F "tokens=2,4" %%i IN ('diskpart /s X:\ListCD.txt') DO @IF /I %%j == CD_ROM SET CDROMVOL=%%i IF DEFINED CDROMVOL echo select volume %CDROMVOL% > X:\ChangeCD.txt IF DEFINED CDROMVOL echo assign letter=K: >> X:\ChangeCD.txt IF DEFINED CDROMVOL diskpart /s X:\ChangeCD.txt Changes C:, D:, and / or E: to P:, Q:, and / or R: if not on Disk 0 @echo off echo list volume > X:\ListVol.txt diskpart /s X:\ListVol.txt > X:\ListVol.dat FOR /F "tokens=2,3" %%i IN (X:\ListVol.dat) DO @IF /I %%j==C SET CVOL=%%i FOR /F "tokens=2,3" %%i IN (X:\ListVol.dat) DO @IF /I %%j==D SET DVOL=%%i FOR /F "tokens=2,3" %%i IN (X:\ListVol.dat) DO @IF /I %%j==E SET EVOL=%%i IF DEFINED CVOL goto FINDCVOL IF DEFINED DVOL goto FINDDVOL IF DEFINED EVOL goto FINDEVOL goto DONE :FINDCVOL echo select vol %CVOL% > X:\CVOL.txt echo detail vol >> X:\CVOL.txt diskpart /s X:\CVOL.txt > X:\CVOL.dat FOR /F "tokens=2,3" %%i IN (X:\CVOL.dat) DO @IF /I %%j==Online SET CDISK=%%i FOR /F "tokens=2-4" %%i IN (X:\CVOL.dat) DO @IF /I %%j.%%k==No.Media SET CDISK=%%i IF DEFINED CDISK goto CHANGECVOL IF DEFINED DVOL goto FINDDVOL IF DEFINED EVOL goto FINDEVOL goto DONE :CHANGECVOL echo select vol %CVOL% > X:\CFIX.txt echo assign letter=P >> X:\CFIX.txt diskpart /s X:\CFIX.txt IF DEFINED DVOL goto FINDDVOL goto DONE :FINDDVOL echo select vol %DVOL% > X:\DVOL.txt echo detail vol >> X:\DVOL.txt diskpart /s X:\DVOL.txt > X:\DVOL.dat FOR /F "tokens=2,3" %%i IN (X:\DVOL.dat) DO @IF /I %%j==Online SET DDISK=%%i FOR /F "tokens=2-4" %%i IN (X:\DVOL.dat) DO @IF /I %%j.%%k==No.Media SET DDISK=%%i IF DEFINED DDISK goto CHANGEDVOL IF DEFINED EVOL goto FINDEVOL goto DONE :CHANGEDVOL echo select vol %DVOL% > X:\DFIX.txt echo assign letter=Q >> X:\DFIX.txt diskpart /s X:\DFIX.txt IF DEFINED EVOL goto FINDEVOL goto DONE :FINDEVOL echo select vol %EVOL% > X:\EVOL.txt echo detail vol >> X:\EVOL.txt diskpart /s X:\EVOL.txt > X:\EVOL.dat FOR /F "tokens=2,3" %%i IN (X:\EVOL.dat) DO @IF /I %%j==Online SET EDISK=%%i FOR /F "tokens=2-4" %%i IN (X:\EVOL.dat) DO @IF /I %%j.%%k==No.Media SET EDISK=%%i IF DEFINED EDISK goto CHANGEEVOL goto DONE :CHANGEEVOL echo select vol %EVOL% > X:\EFIX.txt echo assign letter=R >> X:\EFIX.txt diskpart /s X:\EFIX.txt :DONE If you want to use it you can mess around with the commands while in PE to see for yourself what's being parsed from the diskpart commands. In the second script, the line that can have the "Online" or "No Media" values will have "* Disk 0" at the beginning if it's on Disk 0, but no * if it's not. If it's not Disk 0, the 2nd token would be the disk #, and the third "Online" or the third and fourth "No Media". If a disk # is found, the volume number is used to change the drive letter. I mainly had to do this because built-in storage card readers were using drive letters I needed if the disk was empty.
  12. How are you launching these other HTAs? A shell object.run command? If so, make sure the first parameter isn't 0 or the window will be hidden (ex. objShell.Run cmd, 0, 0) Are you running them by just using the command "FILENAME.HTA" or are you using "mshta.exe FILENAME.HTA"? Are you putting a "%comspec% /c" in front of it? Is this a pop-up box or within the HTA's HTML? If it's in the HTML you should be able to use a div or span area and just replace its contents when you launch your cmd.exe. This should be easy enough to fix with something like valAnswer = msgbox("Do you really want to reboot now?", vbYesNo,"Reboot?")...if valAnswer=vbYes...if valAnswer=vbNo
  13. Just to start with the obvious, do you have enough free space on the drive you're trying to mount the image on? Does it hit a certain percentage every time it stops? Does it even start the mount process? Does it behave the same on different PCs?
  14. Have you tried flashing the BIOS to 2008.03.28? This thread on the HP ITRC forums sounds like it dealt with your issue.
  15. Nope, everything I tested on had FAT32. Our old imaging system is DOS-based so they couldn't be NTFS without a conversion.
  16. Ok, I jumped to conclusions on this one and it does (sort of) make sense. Most of the workstations I was testing on were already loaded with XP and the two oldest ones had Win2K. I found that even after installing XP on the old workstations they still couldn't convert FAT32 to NTFS in WinPE, but if the other workstations were running Win2K the conversion worked. It turned out to be the hard drives in the old workstations I first tested on, so this issue does, in some manner, make sense.
  17. Cool. I would've used that if we didn't want to make our key combo so complex. I'll shove that little accessKey tidbit into my bag of tricks.
  18. Here's some code for how to do it with CheckKeys and ClearKeys: Function CheckKeys Select Case Window.Event.KeyCode ' Standard ASCII keycodes Case 65 ' A boolFirstKey = True Case 66 ' B boolSecondKey = True Case 67 ' C boolThirdKey = True End Select If boolFirstKey And boolSecondKey And boolThirdKey Then cmd = "%comspec% /c start ""Command Prompt"" %comspec%" objShell.Run cmd,0,0 ' Invisible command window to run the start command, which will be visible, don't wait on return End If The bool* variables would need to be declared with Dim at the beginning of the <script LANGUAGE="VBScript"> section so that they're global since the CheckKeys function will only set one of them to true and then exit when a key is pressed. This also assumes you want to push the keys A, B, and C at the same time, since ClearKeys would reset the variables when any key was released. You can put whatever you want in that cmd string, like "%comspec% /c X:\WINDOWS\SYSTEM32\Notepad.exe" or something.
  19. I'm trying to automate the conversion from FAT32 to NTFS on all of our old workstations. I've decided to do this by automating a reboot into WinPE 2.1 running in RAM so that there are no files in-use, which would cause the convert.exe execution in Windows to display more than a prompt for the volume name, and thus kill my automation. The Vista Boot Loader is installed and used to boot to Windows 2000/XP or a standard WIM image. I add another entry for the special conversion WIM and configure a one-time boot with bcdedit's "-bootsequence" flag. Here's the baffling part: Windows XP workstations have no problem performing the conversion. When PE's convert.exe is run on a Windows 2000 workstation, it prompts for the volume name, then acts just like chkdsk doing a disk check and never converts anything! I tried running the convert.exe file included with 2000 and XP in PE but it does nothing. However, the drives can be converted no problem when in Win2K. Does this make any sense? Could the file allocation table used by 2K be the cause? I tried several experiments like putting XP's NTLDR and NTDETECT.COM in place, reverting the boot sector with bootsect /nt52, and all I can think of is something is up with the file allocation table. Any thoughts?
  20. The Sysprep Windows XP image I install on D:\ was installed and sealed on D:\, so I don't think you can install and seal an image on C:\ and expect it to automatically adjust to work when you apply it to D:\. I suggest you either re-create your XP image or swap your partitions around so XP is on C:\ and PE is on D:\.
  21. My systems have WinPE on C: and Windows on D: as well and yes, all you should need to do is change your (1) values in boot.ini to (2) and it should boot properly. That would make your boot.ini look like mine and get you where you need to go.
  22. You could accomplish all your tasks in an HTA instead of Flash. I've configured our workstations with a bootable RAM disk PE image in the boot menu that runs an HTA via startnet.cmd. I use the cmdow.exe tool (freeware) to hide the PE command prompt and then use it to reveal it if a special key combo is pushed and password entered. If you want to leave it visible, here's a snippet that would prevent ALT+TAB unless a password has been entered at some point, and hides the system menu (prevents minimize): <html> <head> <title>HTA Test</title> <HTA:APPLICATION ID="objTest" APPLICATIONNAME="HTA Test" SCROLL="yes" SINGLEINSTANCE="yes" WINDOWSTATE="Maximize" CAPTION="no" SYSMENU="no" > </head> <script LANGUAGE="VBScript"> Dim boolPasswordEntered Dim boolALTkey, boolTABkey boolPasswordEntered = False Document.OnKeyDown = GetRef("CheckKeys") Document.OnKeyUp = GetRef("ClearKeys") Function Window_OnLoad ' Do your stuff and something to make boolPasswordEntered = True ... End Function Function CheckKeys Select Case Window.Event.KeyCode Case 18 ' ALT boolALTKey = True Case 9 ' ALT boolTABKey = True End Select If boolALTKey And boolTABKey And Not boolPasswordEntered Then DoNothing End If End Function Function ClearKeys boolALTKey = False boolTABKey = False End Function Function DoNothing Window.Event.returnValue = False End Function </SCRIPT> <body> ... </body> </html> You can then insert functions to perform your various tasks. You could have your password prompt always visible, but I don't display mine unless a special key combo is pushed. I like to use tables in my <body> section with <span> and <div> so I can put together a string of code anywhere in the script and then assign it to the <span> or <div> dynamically. For instance, when my key combo is pushed, I call a function to assemble a string that has password_box and submit (button) input objects and then set SPAN_ID.InnerHTML = TheString. If the correct password is entered, I unhide the command prompt and close the HTA. Just throwing this stuff out there since you'd need more VBScript and HTML code to add all the things you want to do, but it wouldn't be too difficult.
  23. It sounds like you need to add the drivers for the VM hard drive controller to your PE image.
  24. This error usually occurs if you apply an image to an existing Windows partition without formatting it first.
  25. I have been deploying XPSP2 by applying a standard image sealed with SysPrep and then booting into mini-setup. For XP Tablet, the factory.exe, setupcl.exe, setupmgr.exe, and sysprep.exe files are replaced with versions from the Tablet 2005 SP2 media and the appropriate tablet.txt and \i386\...\ files and folders from the Tablet CD placed in the SysPrep folder. I wanted to update my base image to SP3, so I restored my SP2 pre-SysPrep Ghost image, manually installed SP3, replaced the SP2 SysPrep files with the downloaded SP3 Deploy.cab files, and re-sealed the image. XP Pro would load up no problem, but XP Tablet had issues. The software keyboard at the Ctrl-Alt-Del screen would just have the window frame and nothing inside, and attempting to launch the Tablet PC Input Panel would result in a crash of tabtip.exe and it would never launch again. Come to find out, M$ has decided not to support this method of deploying Tablet with SP3 due to who knows why. I suspect to encourage more Vista. I did some experimenting and finally found a solution that works. If you're trying to do the same thing I am, here's what to do: 1. Get your SysPrep files for XP Tablet (C:\Sysprep, C:\Sysprep\i386\$oem$\, C:\Sysprep\i386\cmpnents\, C:\Sysprep\i386\digitizer\, etc.) 2. Download the XP SP3 patch file 3. Run the command "WindowsXP-KB936929-SP3-x86-ENU.exe /extract:C:\SP3TEMP" 4. Copy C:\SP3TEMP\i386\root\cmpnents\netfx\i386\netfx.cab to the C:\Sysprep\i386\cmpnents\netfx\i386\ folder, overwriting the existing file 5. Copy all files from C:\SP3TEMP\i386\root\cmpnents\tabletpc\i386\ to C:\TABTEMP\ 6. Copy all files from C:\SP3TEMP\i386\root\cmpnents\tabletpc\i386\ to the C:\Sysprep\i386\cmpnents\tabletpc\i386\ folder, overwriting the existing files 7. Use the Windows EXPAND.EXE command to expand the compressed files in C:\TABTEMP\. Sample .bat attached. 8. Copy all files contained in C:\Sysprep\i386\cmpnents\tabletpc\i386\TABLETPC.CAB to C:\CABTEMP\ 9. Find the files in C:\TABTEMP\ that are also in C:\CABTEMP\ and copy them from C:\TABTEMP\ to C:\CABTEMP\, overwriting the existing files 10. Download the M$ CAB SDK and issue the following command from the extracted \BIN\ folder: "cabarc n TABLETPC.CAB C:\CABTEMP\*.*" 11. Copy the newly-created TABLETPC.CAB to C:\Sysprep\i386\cmpnents\tabletpc\i386\, overwriting the existing file Now all that's left is putting in place the C:\Sysprep\ folder for mini-setup. I did not replace the Sysprep *.exe files that were copied from the Tablet SP2 CD with the versions included in the SP3 Deploy.cab. Oh, and FYI, don't plan on getting any M$ support for this method. tabexpand.txt
×
×
  • Create New...