Jump to content
Strawberry Orange Banana Lime Leaf Slate Sky Blueberry Grape Watermelon Chocolate Marble
Strawberry Orange Banana Lime Leaf Slate Sky Blueberry Grape Watermelon Chocolate Marble

MSFN is made available via donations, subscriptions and advertising revenue. The use of ad-blocking software hurts the site. Please disable ad-blocking software or set an exception for MSFN. Alternatively, register and become a site sponsor/subscriber and ads will be disabled automatically. 


Stratuscaster

Member
  • Content Count

    31
  • Donations

    $0.00 
  • Joined

  • Last visited

Everything posted by Stratuscaster

  1. In our environment, localboot is done by not hitting F12 to PXEBOOT - so there was no need. That, and we boot to PXELINUX first - that provides a localboot option.
  2. The working BOOTMGR I have is version 6.0.6000.16386. The non-working BOOTMGR is version 6.0.6001.18000. The solution was found in this thread: http://www.msfn.org/board/index.php?showtopic=114711&hl=
  3. Problem solved. The BOOTMGR.EXE in the latest WAIK is the culprit. Using the BOOTMGR.EXE from a previous WAIK displays the menu items correctly.
  4. 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.
  5. 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.
  6. When I do this, every menu item that shows in the Windows Boot Manager is named "Ramdisk options". Thoughts?
  7. 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."
  8. 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.
  9. I have in my HTA app that launches Ghost a button that does this: wpeutil reboot
  10. Did you add anything to the COMMENT field in the PROPERTIES of the shortcut that you created?
  11. Thanks for the reply - we've got it up and running.
  12. 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.
  13. Wondering just how I'd call this or where to implement it - that "echo list volume" has to run under DISKPART, doesn't it?
  14. How does one know what letter(s) the CD (and other) drives were assigned? I have to accomodate not only multiple HDD partitions on a system, but multiple network shares, too.
  15. 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.
  16. 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>
  17. 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.
  18. 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.
  19. 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.
  20. 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.
  21. It could also be your switch. We've been trying to get Multicasting working on our Cisco 7600/4500 setup for some time now - the downloads start but then hang and stop. Our old Cisco 5500 setup would work - kind of. It wound up always defaulting to broadcasting due to lack of IGMP.
  22. 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"
  23. 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?
  24. Let's try this again: t:\Programs\ghost11\files\ghost32.exe -clone,mode=load,src=k:\images\sample.gho,dst=1 The above string, when passed to be run by the click of a button, does not work.
  25. 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...