Jump to content

Stratuscaster

Member
  • Posts

    31
  • Joined

  • Last visited

  • Donations

    0.00 USD 
  • Country

    United States

Posts posted by Stratuscaster

  1. I figured out how to get multiple Win PE 2.0 WIMs in the menu with help from the posting here:

    http://www.deployvista.com/Blog/JohanArwidmark/tabid/78/EntryID/27/Default.aspx

    This is what I ended up with:

    Rem Creates BCD (boot configuration data) for Windows 2003 - PE 2.0 DVD
    set bcdedit=D:\multiboot\boot\bcdedit
    set BCD-File=D:\multiboot\boot\bcd
    del %BCD-File%
    %bcdedit% /createstore %BCD-File%
    %bcdedit% /store %BCD-File% /create {ramdiskoptions} /d "Ramdisk options"
    %bcdedit% /store %BCD-File% /set {ramdiskoptions} ramdisksdidevice boot
    %bcdedit% /store %BCD-File% /set {ramdiskoptions} ramdisksdipath \boot\boot.sdi

    set A=Windows 2003 R2 - Standard Edition - Automated Install
    set B=Windows 2003 R2 - Standard Edition - Manual install
    set C=Windows 2003 R2 - Standard Edition EVAL License - Automated Install
    set D=Hardware Setup (Windows PE)
    set E=Quick Restore (Windows PE)

    for /f "tokens=1-3" %%a in ('%bcdedit% /store %BCD-File% /create /application OSLOADER /d "%A%"') do set guida=%%c
    %bcdedit% /store %BCD-File% /set %guida% device boot
    %bcdedit% /store %BCD-File% /set %guida% path \STDO\SETUPLDR.BIN
    %bcdedit% /store %BCD-File% /set %guida% DESCRIPTION "%A%"

    for /f "tokens=1-3" %%a in ('%bcdedit% /store %BCD-File% /create /application OSLOADER /d "%B%"') do set guidb=%%c
    %bcdedit% /store %BCD-File% /set %guidb% device boot
    %bcdedit% /store %BCD-File% /set %guidb% path \STDO\SETUPLDR.BIN
    %bcdedit% /store %BCD-File% /set %guidb% DESCRIPTION "%B%"

    for /f "tokens=1-3" %%a in ('%bcdedit% /store %BCD-File% /create /application OSLOADER /d "%C%"') do set guidc=%%c
    %bcdedit% /store %BCD-File% /set %guidc% device boot
    %bcdedit% /store %BCD-File% /set %guidc% path \STDO\SETUPLDR.BIN
    %bcdedit% /store %BCD-File% /set %guidc% DESCRIPTION "%C%"

    for /f "tokens=1-3" %%a in ('%bcdedit% /store %BCD-File% /create /d "%D%" /application osloader') do set guidd=%%c
    %bcdedit% /store %BCD-File% /set %guidd% systemroot \Windows
    %bcdedit% /store %BCD-File% /set %guidd% detecthal Yes
    %bcdedit% /store %BCD-File% /set %guidd% winpe Yes
    %bcdedit% /store %BCD-File% /set %guidd% osdevice ramdisk=[boot]\sources\hwsetup.wim,{ramdiskoptions}
    %bcdedit% /store %BCD-File% /set %guidd% device ramdisk=[boot]\sources\hwsetup.wim,{ramdiskoptions}

    for /f "tokens=1-3" %%a in ('%bcdedit% /store %BCD-File% /create /d "%E%" /application osloader') do set guide=%%c
    %bcdedit% /store %BCD-File% /set %guide% systemroot \Windows
    %bcdedit% /store %BCD-File% /set %guide% detecthal Yes
    %bcdedit% /store %BCD-File% /set %guide% winpe Yes
    %bcdedit% /store %BCD-File% /set %guide% osdevice ramdisk=[boot]\sources\restore.wim,{ramdiskoptions}
    %bcdedit% /store %BCD-File% /set %guide% device ramdisk=[boot]\sources\restore.wim,{ramdiskoptions}

    %bcdedit% /store %BCD-File% /create {bootmgr} /d "Windows Vista Bootloader"
    :: %bcdedit% /store %BCD-File% /set {bootmgr} timeout 30
    %bcdedit% /store %BCD-File% /set {bootmgr} displayorder %guida% %guidb% %guidc% %guidd% %guide%
    %bcdedit% /store %BCD-File% /enum all

    cdimage.exe -lMultiBoot_Test -u1 -e -oi -m -h -bD:\multiboot\boot\etfsboot.com D:\multiboot "multiboot_test.iso"

    Now everything works nicely. :thumbup

    When I do this, every menu item that shows in the Windows Boot Manager is named "Ramdisk options". Thoughts?

    Problem solved. Found in another thread here - the BOOTMGR.EXE from the latest WAIK is the culprit. Using the BOOTMGR.EXE from the older WAIK displays the menu items correctly.

    The working BOOTMGR I have is version 6.0.6000.16386.

    The non-working BOOTMGR is version 6.0.6001.18000.

  2. Thank the Lord I found this thread - was beating my head against the wall trying to figure out this issue.

    The working BOOTMGR I have is version 6.0.6000.16386.

    The non-working BOOTMGR is version 6.0.6001.18000.

  3. I figured out how to get multiple Win PE 2.0 WIMs in the menu with help from the posting here:

    http://www.deployvista.com/Blog/JohanArwidmark/tabid/78/EntryID/27/Default.aspx

    This is what I ended up with:

    Rem Creates BCD (boot configuration data) for Windows 2003 - PE 2.0 DVD
    set bcdedit=D:\multiboot\boot\bcdedit
    set BCD-File=D:\multiboot\boot\bcd
    del %BCD-File%
    %bcdedit% /createstore %BCD-File%
    %bcdedit% /store %BCD-File% /create {ramdiskoptions} /d "Ramdisk options"
    %bcdedit% /store %BCD-File% /set {ramdiskoptions} ramdisksdidevice boot
    %bcdedit% /store %BCD-File% /set {ramdiskoptions} ramdisksdipath \boot\boot.sdi

    set A=Windows 2003 R2 - Standard Edition - Automated Install
    set B=Windows 2003 R2 - Standard Edition - Manual install
    set C=Windows 2003 R2 - Standard Edition EVAL License - Automated Install
    set D=Hardware Setup (Windows PE)
    set E=Quick Restore (Windows PE)

    for /f "tokens=1-3" %%a in ('%bcdedit% /store %BCD-File% /create /application OSLOADER /d "%A%"') do set guida=%%c
    %bcdedit% /store %BCD-File% /set %guida% device boot
    %bcdedit% /store %BCD-File% /set %guida% path \STDO\SETUPLDR.BIN
    %bcdedit% /store %BCD-File% /set %guida% DESCRIPTION "%A%"

    for /f "tokens=1-3" %%a in ('%bcdedit% /store %BCD-File% /create /application OSLOADER /d "%B%"') do set guidb=%%c
    %bcdedit% /store %BCD-File% /set %guidb% device boot
    %bcdedit% /store %BCD-File% /set %guidb% path \STDO\SETUPLDR.BIN
    %bcdedit% /store %BCD-File% /set %guidb% DESCRIPTION "%B%"

    for /f "tokens=1-3" %%a in ('%bcdedit% /store %BCD-File% /create /application OSLOADER /d "%C%"') do set guidc=%%c
    %bcdedit% /store %BCD-File% /set %guidc% device boot
    %bcdedit% /store %BCD-File% /set %guidc% path \STDO\SETUPLDR.BIN
    %bcdedit% /store %BCD-File% /set %guidc% DESCRIPTION "%C%"

    for /f "tokens=1-3" %%a in ('%bcdedit% /store %BCD-File% /create /d "%D%" /application osloader') do set guidd=%%c
    %bcdedit% /store %BCD-File% /set %guidd% systemroot \Windows
    %bcdedit% /store %BCD-File% /set %guidd% detecthal Yes
    %bcdedit% /store %BCD-File% /set %guidd% winpe Yes
    %bcdedit% /store %BCD-File% /set %guidd% osdevice ramdisk=[boot]\sources\hwsetup.wim,{ramdiskoptions}
    %bcdedit% /store %BCD-File% /set %guidd% device ramdisk=[boot]\sources\hwsetup.wim,{ramdiskoptions}

    for /f "tokens=1-3" %%a in ('%bcdedit% /store %BCD-File% /create /d "%E%" /application osloader') do set guide=%%c
    %bcdedit% /store %BCD-File% /set %guide% systemroot \Windows
    %bcdedit% /store %BCD-File% /set %guide% detecthal Yes
    %bcdedit% /store %BCD-File% /set %guide% winpe Yes
    %bcdedit% /store %BCD-File% /set %guide% osdevice ramdisk=[boot]\sources\restore.wim,{ramdiskoptions}
    %bcdedit% /store %BCD-File% /set %guide% device ramdisk=[boot]\sources\restore.wim,{ramdiskoptions}

    %bcdedit% /store %BCD-File% /create {bootmgr} /d "Windows Vista Bootloader"
    :: %bcdedit% /store %BCD-File% /set {bootmgr} timeout 30
    %bcdedit% /store %BCD-File% /set {bootmgr} displayorder %guida% %guidb% %guidc% %guidd% %guide%
    %bcdedit% /store %BCD-File% /enum all

    cdimage.exe -lMultiBoot_Test -u1 -e -oi -m -h -bD:\multiboot\boot\etfsboot.com D:\multiboot "multiboot_test.iso"

    Now everything works nicely. :thumbup

    When I do this, every menu item that shows in the Windows Boot Manager is named "Ramdisk options". Thoughts?

  4. Has anyone gone any further with this?

    I'm experiencing the same issue - every menu entry in the Windows Boot Manager that is created in the BCD reads "Ramdisk options" - using the "BCDedit /store *path*\TFTPRoot\Boot\BCD /set {guid} description "WinPe1"" command changes nothing.

    The enum shows this description has been changed for the GUID entry, but that description never shows.

    The booting of the different WIMs works fine - but a user doesn't know what WIM he is selecting since each name is the same.

    Using EasyBCD or VistaBootPro doesn't seem to offer a way to change it either - it's not a matter of "not knowing the syntax."

  5. Awesome utility! I am so glad you shared this!!!

    Update: After playing with this I realize I need to be able to use different ghost switches for different images. It appears that the way it is currently coded, all images will use the same switches.

    Is there an easy way to change that or has anyone already added that functionality?

    Thanks...

    In our shop, we've modified the script to run a CMD file that includes the specific switch for that image, rather then reference the image itself.

    Yes, it's an extra step to create that CMD for each image, but we require that degree of control.

  6. Is their a way to reboot the PE Enviroment after I ghost a computer. I have the RB switch in ghost but I think it restarts the ghost windows and not PE.

    strTaskValue = Chr(34) & "%programfiles%\Ghost8\ghost32.exe" & Chr(34) & " -clone,mode=load,src=" & Chr(34) & Radio.Id & ".gho" & Chr(34) & ",dst=1,SZEF -fni -auto -sure -ntil -RB"

    I have in my HTA app that launches Ghost a button that does this:

    wpeutil reboot

  7. Can someone tell me why for the Image name is blank. The radio button show and all other text shows. Just not the text for the radio button image name.

    Thanks

    Did you add anything to the COMMENT field in the PROPERTIES of the shortcut that you created?

  8. I have a need to change the CD-ROM letter to accommodate an image we are deploying that uses letters C, D, and E.

    We also have network shares to pull images from, and those are assigned J, K, L, and M.

    There are 3 other shares for tools and log reports - I, T, and W.

    So I need something to relocate the CD-ROM drive on a system (and there could be 2 of them) - to other drive letters.

    I tried your setup and while it ran, it couldn't determine any CD-ROM drive letter.

    Then I tried WreX's setup, but was unsure where and how exactly the pieces would be executed.

  9. I just use a batch file and diskpart to change the drive letter during my startup process because it was using a letter I wanted my hard drive partitions to use, but you can use the Win32_CDROMDrive.Drive instance as well.

    Batch to change the CD drive letter

    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

    VBScript to find CD drive letters

    Set objWMIService = GetObject("winmgmts:\\.\root\cimv2")
    Set colCD = objWMIService.ExecQuery("Select * from Win32_CDROMDrive")

    For Each objCD In colCD ' If there are multiple CD drives, this loop will only set the variable for the last one listed
    strCDLetter = objCD.Drive
    Next

    Wondering just how I'd call this or where to implement it - that "echo list volume" has to run under DISKPART, doesn't it?

  10. You can create a VBS script launched from your startnet.bat to read the IP address (among other things) and store it into a variable. We use a sysinfo.cmd file to launch the sysinfo.vbs file, which in turn grabs the info and pipes it to a setenv.cmd file and runs it - both files are in x:\windows\system32.

    You can use an IF statement in your startnet.cmd to compare that IP variable and act accordingly (launch a file, run a script, map a drive, etc.)

    REM *** sysinfo.cmd ***
    cscript.exe //nologo x:\windows\system32\sysinfo.vbs >x:\windows\system32\setenv.cmd
    x:\windows\system32\setenv.cmd

    REM *** sysinfo.vbs ***
    dim count,t,ipchar,ip,lab,cnt
    REM *** Get IP Address and Filter Link local IPv6 ***
    On Error Resume Next
    Set objWMIService = GetObject("winmgmts:\\" & "." & "\root\CIMV2")
    Set colItems = objWMIService.ExecQuery("SELECT * FROM Win32_NetworkAdapterConfiguration", "WQL", &h10 + &h20)

    For Each objItem In colItems
    strIPAddress = Join(objItem.IPAddress, ",")
    Next
    count=1
    do while(ipchar<>",")
    ipchar=mid(strIPAddress,count,1)
    count=count+1
    if ipchar<>"," then ip=ip & ipchar
    Loop
    WScript.Echo "SET IP=" & ip

    REM *** Determine which lab menu to load ***
    REM *** LAB1 = 10.10.16.x - 10.10.31.x LAB2 = 10.10.32.x - 10.10.47.x
    count=1
    cnt=0
    ipchar=""
    lab=""
    do while(ipchar<>",")
    ipchar=mid(strIPAddress,count,1)
    if ipchar="." then cnt=cnt+1
    count=count+1
    if cnt=2 and ipchar<>"." then lab=lab & ipchar
    loop
    if lab<32 then Wscript.Echo "SET LAB=" & "LAB1" else WScript.Echo "SET LAB=" & "LAB2"

    REM *** code placed in startnet.cmd ***

    set LAB=UNKNOWN
    call x:\windows\system32\sysinfo.cmd
    GOTO %LAB%

    :LAB1
    REM *** launch the HTA and pass the IP variable to be displayed on screen ***
    mshta.exe "i:\wizards\lab1.hta" "%IP%"
    goto END

    :LAB2
    REM *** launch the HTA and pass the IP variable to be displayed on screen ***
    mshta.exe "i:\wizards\lab2.hta" "%IP%"
    goto END

    :UNKNOWN
    x:\Programs\nu2menu\nu2menu.exe

    :END

    We just completed a setup that does this very thing. If the third octet of the IP is <32, it launches the hta for one lab, and if it's >=32, it launches the hta for another lab. If it's neither, or an error occurs, a 'default' nu2menu is loaded.

    Our setup is fairly deep and uses PXE rather than off the CD, but the basic steps should still apply. Hope this helps.

  11. The tool button would be fine with me, Could you share your syntax? I keep trying, but Im messing something up and cant get it to run.

    Thanks

    Ken.

    I set a variable:

    walker = "%comspec% /c t:\11\GhWalk32.exe"

    I create a new subroutine:

    '****************************************************************************
    '* doGhostWalker
    '****************************************************************************
    Sub doWalker(doMe)
    objShell.Run walker
    End Sub

    And my button is:

    <Button class='tool' id=notepad onclick=doWalker('')>GhostWalker</BUTTON> 

  12. Ok I have another Q.

    I would like to change the Buttons being generated by the folder name (HP, DELL, ETC)to be a dropdown list box.

    the reason for this is that i have a lot of folders which makes way to many buttons.

    Anyone help me with this as i am only just learning the HTM coding

    As an alternative, a co-worker wound up creating 26 copies of the HTA and modifying them to only pull items matching the first letter.

    So there's a small HTA that shows the A-Z buttons, then each button launches it's own HTA for that 'letter.'

    Not elegant, but again - it works.

  13. Hi having problems point to the path of my ghost32.exe

    I have a mapped drive f:\ which contain ghost32.exe

    I edited the line

    <Button id=ghost onclick=doTask('"%programfiles%\ghost8\ghost32.exe"')>Ghost</BUTTON>     

    to

    <Button id=ghost onclick=doTask('"f:\ghost32.exe"')>Ghost</BUTTON>     

    This doesn't work. I am new to this kind of coding can anyone help please

    This drove me bonkers for quite some time.

    I created a variable called "ghoCmd"

    ghocmd = "%comspec% /c t:\11\ghost32.exe"

    Then I created a new subroutine:

    '****************************************************************************
    '* doGhost
    '****************************************************************************
    Sub doGhost(doMe)
    objShell.Run ghoCmd
    End Sub

    And then I set my button to this:

    <Button class='tool' id=ghost   onclick=doGhost('')>Ghost 11</BUTTON>  

    Might be overkill - but it works.

  14. I was wondering if someone could give me a hand.

    I am trying to modify this script to include running ghwalk32.exe /AV=All /sure after the imaging is complete.

    I am a total noob to vbscript, so everything I have tried fails.

    If someone can give me a little assistance, it would be greatly appreciated.

    Thanks

    Ken.

    My initial guess (because I've not tried it) is to create a CMD script file that launches Ghost32 with the image info and switches and then runs GhWalk32 afterwards - but then that would happen on EVERY image (which might be what you want.)

    I added a "tool" button at the bottom for running GhWalk32 manually.

  15. Thanks to those that attempted to help with my issues.

    Went back into the HTA and through trial and error located the problems - lots of confusion between " and Chr(34) and ' placement that just kept breaking things.

    As of right now, it appears to be working correctly. I changed the layout a bit - put the list of images on the right side where the HTML details were, because in our setup we have lots of clients with lots of images and I needed the room.

    On the HTML "details" side of things, I have a small section above the "tools" buttons to show those details - we only use a line or two (if we use them at all) - so that works out fine for us.

    Someone here at work asked for a keyboard shortcut for each 'client' button - as nice as that would be, I think we could run out of letters and numbers before we ran out of client buttons.

    The only other issue I have - and it's no fault of the script - is when the actual GHO image file name or the directory name contains 'odd' characters in them - like parentheses and apostrophes. That's more a training issue here - get folks to keep the images directories simple and put the notes and things in the HTML details file instead.

    Kudos again for a fine piece of work. :D

  16. It's the original wizard.hta script, with my ghost32.exe locations...

    <html>
    <!--
    '********************************************************************
    '*
    '* File: wizard.hta
    '* Author: greg & fisher
    '* Created: Mar 2007
    '* Modified:
    '* Version: .9
    '*
    '* Description: windows imaging platform
    '*
    '* Dependencies: tested on and for WinPE 2.0 with WMI, Scripting,
    '* XML, HTA packages
    '* Notes: Line 26 - might want to make this "normal" when you are
    '* testing and don't want the hta fullscreen
    '* Line 58 - customize your headings here
    '* Line 72, 101 - confirm directory.name path, this would be a mapped
    '* drive to the filer where the images shorcut dir is
    '* Line 193 - confirm background image source location
    '* Line 200 - confirm path to ghost executable
    '*
    '********************************************************************
    -->

    <!****************************************************************************>
    <!* HTA Header >
    <!****************************************************************************>
    <HEAD>
    <TITLE>Imaging Application</TITLE>
    <HTA:APPLICATION
    BORDER = None
    APPLICATION = Yes
    WINDOWSTATE = normal
    INNERBORDER = No
    SHOWINTASKBAR = Yes
    SCROLL = No
    APPLICATIONNAME = "Windows PE Wizard"
    NAVIGABLE = Yes
    >
    <!-- external stylesheet -->
    <link rel="stylesheet" type="text/css" href="htaStyle.css" />
    </HEAD>

    <!****************************************************************************>
    <!* Begin Script >
    <!****************************************************************************>
    <script Language=VBScript>

    '****************************************************************************
    '* Globals
    '* setup global script parameters
    '****************************************************************************
    Option Explicit
    Dim strTaskValue, objShell, objFso, strBody, objWmiService
    Set objShell = CreateObject("WScript.Shell")
    Set objFso = CreateObject("Scripting.FileSystemObject")
    Set objWMIService = GetObject ("winmgmts:\\.\root\cimv2")

    '****************************************************************************
    '* Window_OnLoad
    '* load up behavior and preferences
    '****************************************************************************
    Sub Window_Onload
    self.Focus()
    strBody = "<H1>PE Build and Recovery Environment</H1>" &_
    "<H2>Select Images to apply an OS image using Ghost.<BR><BR>" &_
    "Please select an image category:<BR><BR>"
    enumDirs
    End Sub

    '****************************************************************************
    '* enumDirs
    '* find directories and create category buttons
    '****************************************************************************
    Sub enumDirs
    Dim colSubfolders, objFolder, fileName
    'enumerate folders in images folder
    Set colSubfolders = objWMIService.ExecQuery _
    ("Associators of {Win32_Directory.Name='z:\winpe'} Where AssocClass = Win32_Subdirectory ResultRole = PartComponent")
    'create html buttons from each folder name
    For Each objFolder in colSubfolders
    fileName = objFolder.fileName
    strBody = strBody &_
    "<button id='" & fileName & "' onClick='enumImages("" & fileName & "")'>" & fileName & "</BUTTON>"
    Next
    'post resulting html body to document
    strBody = strBody & "<BR><HR><BR>"
    body.innerHTML = strBody
    End Sub

    '****************************************************************************
    '* enumImages
    '* find images and create radio buttons
    '****************************************************************************
    'this sub is a little messy because of limitations of win32_shortcutfile and need to go between fso and wmi for different info
    'also, without the advantages of .net sorting classes, the old bubble sorting is not the funnest

    Sub enumImages(fileName)
    Dim colFilelist, objFile, strButtons, objShortcut, colTargetList, objTarget, x, y, strKey, strItem
    ReDim arrButtons(1,-1)

    'reset display element style
    details.innerHTML = ""
    details.style.visibility = "hidden"
    ' strButtons = "<table id=buttonTable>"
    'enumerate ghost image shortcuts in specific images subfolder from enumDirs
    Set colFileList = objWMIService.ExecQuery _
    ("ASSOCIATORS OF {Win32_Directory.Name='z:\winpe\" & fileName & "'} Where ResultClass = CIM_DataFile")
    'find ghost image shortcut targetpath (fso)
    For each objFile in colFileList
    If objFile.Extension = "lnk" Then
    Set objShortcut = objShell.CreateShortcut(objFile.name)
    'find ghost image shortcut target (wmi)
    Set colTargetList = objWMIService.ExecQuery _
    ("Select * from CIM_Datafile Where name = '" & replace(objShortcut.targetpath,"\","\\") & "'")
    'add radio button label (from fso) and radio button target (from wmi) to an array
    For each objTarget in colTargetList
    ReDim Preserve arrButtons(1,UBound(arrButtons,2)+1)
    arrButtons(0,UBound(arrButtons,2)) = objShortcut.Description
    arrButtons(1,UBound(arrButtons,2)) = "<Input type=radio name=radioList id='" & objTarget.Drive & objTarget.Path &

    objTarget.fileName &_
    "' onClick=showRadioInfo>" & objShortcut.Description & "</BUTTON><BR>"
    Next
    End If
    Next
    'perform a a shell sort of the string array based on button label
    For x = 0 To UBound(arrButtons,2) - 1
    For y = x To UBound(arrButtons,2)
    If StrComp(arrButtons(0,x),arrButtons(0,y),vbTextCompare) > 0 Then
    strKey = arrButtons(0,x)
    strItem = arrButtons(1,x)
    arrButtons(0,x) = arrButtons(0,y)
    arrButtons(1,x) = arrButtons(1,y)
    arrButtons(0,y) = strKey
    arrButtons(1,y) = strItem
    End If
    Next
    Next
    'create combined buttons html code from sorted buttons array
    For x = 0 To UBound(arrButtons,2)
    strButtons = strButtons & "<tr><td id=buttonTd>" & arrButtons(1,x) & "</td></tr>"
    Next
    ' strButtons = strButtons & "</table>"
    'create a start button with start image command and append and post resulting html to body
    body.innerHTML = strBody & strButtons & "<BR><HR><BR><button id=start Accesskey=S onclick=doTask(strTaskValue)><U>S</U>tart

    Image!</BUTTON><BR>"
    start.style.visibility="hidden"
    End Sub

    '****************************************************************************
    '* doTask
    '* run task selected by radio button
    '****************************************************************************
    Sub doTask(doMe)
    objShell.Run doMe
    End Sub

    '****************************************************************************
    '* showRadioInfo
    '* display details of radio button selection in details divider
    '****************************************************************************
    Sub showRadioInfo
    Dim objTextFile, Radio, strRadioValue, strDetails
    'set details and start element styles
    details.style.visibility = "visible"
    start.style.visibility = "visible"
    'find checked button
    For Each Radio in Document.getElementsByName("radioList")
    If Radio.Checked = True Then
    'create imaging command line from button id
    strTaskValue = Chr(34) & "t:\Programs\ghost11\files\ghost32.exe" & Chr(34) & " -clone,mode=load,src=" & Chr(34) &

    Radio.Id & ".gho" & Chr(34) & ",dst=1"
    'display image details in details element if they exist
    If objFso.FileExists(Radio.Id & ".htm") Then
    Set objTextFile = objFso.OpenTextFile(Radio.Id & ".htm", 1)
    strDetails = objTextFile.ReadAll()
    Else
    'display error message in details element if no matching details file found
    strDetails = "Can't find anything!!!<BR><BR>" &_
    "Make sure the info file has the same name as the .gho and has an .htm extension."
    End If
    End If
    Next
    'post resulting html to details element
    Details.innerHTML = strDetails
    End Sub

    '****************************************************************************
    '* Reset
    '* reset the tool interface, also reloads the code (helpful for programming)
    '****************************************************************************
    Sub Reset
    Location.Reload(True)
    End Sub

    </Script>
    <!****************************************************************************>
    <!* End Script / Begin HTML >
    <!****************************************************************************>

    <BODY>
    <DIV id=bg>
    <img src=winpe.bmp>
    </DIV>

    <DIV id=body></DIV>
    <DIV id=details></DIV>

    <DIV id=tools>
    <Button id=ghost onclick=doTask('"t:\Programs\ghost11\files\ghost32.exe"')>Ghost</BUTTON>
    <Button id=cmd onclick=doTask('%comspec%')> Cmd </BUTTON>
    <Button id=notepad onclick=doTask('notepad')> Notepad </BUTTON>
    <Button id=taskmgr onclick=doTask('taskmgr')> Taskmgr </BUTTON>
    <Button id=close onclick=self.close()> Quit </BUTTON>
    <Button id=reset onclick=reset> ResetApp </BUTTON>
    <Button id=reboot onclick=self.navigate('reboot.hta')> Reboot </BUTTON>
    </DIV>
    </BODY>
    </HTML>

    <!****************************************************************************>
    <!* End HTML >
    <!****************************************************************************>

    This is the snippet that creates the string that should get launched by the button:

    'find checked button
    For Each Radio in Document.getElementsByName("radioList")
    If Radio.Checked = True Then
    'create imaging command line from button id
    strTaskValue = Chr(34) & "t:\Programs\ghost11\files\ghost32.exe" & Chr(34) & " -clone,mode=load,src=" & Chr(34) & Radio.Id & ".gho" & Chr(34) & ",dst=1"

  17. Ok. I've got it to work by replacing the green bars with a picture (no animation).

    1. Download and install Vista Boot Logo Generator.

    2. Run the generator and add a 800x600 24-bit BMP and 1024x768 24-bit BMP.

    3. Save the file as winload.exe.mui.

    4. Copy and replace the winload.exe.mui file in the \Windows\System32\Boot\en-US directory of your boot image with the new one.

    xcopy /y c:\peimage\winload.exe.mui c:\peimage\mount\Windows\System32\Boot\en-US

    5. Capture or unmount your image to ISO\sources\boot.wim

    6. Disable the gui option of your bcd entry for WinPE.

    bcdedit /store c:\peimage\ISO\boot\bcd /set {default} quietboot yes

    Now the green bars will be replaced with your picture!

    I must give credit where credit is due, I modified the instructions from this website to work for PE:

    http://www.howtogeek.com/howto/windows-vis...-windows-vista/

    Kudos, as this works great - my WinPE CD shows my custom boot screen just fine.

    The boot.wim that I use on my PXE network doesn't show them, though. I think it's because we aren't changing anything - other than copying the MUI to the mount - before we capture/unmount the WIM.

    Any thoughts?

  18. t:\Programs\ghost11\files\ghost32.exe  -clone,mode=restore,src=k:\images\sample.gho,dst=1

    If I run just the executable part (t:\Programs\ghost11\files\ghost32.exe) it runs fine. Once I add the switches, it fails.

    You're missing the last part of the clone command, the sze parameter.

    While that may be - and likely due to me just leaving it off when typing my reply - it doesn't solve the issue I'm having.

×
×
  • Create New...