WinPE 2.0 simple Ghost Menu HTA a simple HTA to make Ghosting easy
#21
Posted 28 June 2007 - 12:03 PM
I think this is also a resolution problem sine the button are very big.
What do you think ? any option to change, I don't understand why the button are bigger then the print screen in this post
#22
Posted 28 June 2007 - 02:57 PM
Is you wont change resolution see this post
http://www.msfn.org/...showtopic=99197
This hta work fine , set WinPe resolution at 1024*768 ( setres h1024 v768 b21 ) and modify windows state parameter ( normal -> fullscreen
bye
BB
#23
Posted 28 June 2007 - 03:03 PM
#25
Posted 29 June 2007 - 08:29 AM
I am having an issue though - When I click start to launch ghost, it just hangs. Anyone else have this issue? I have installed all scripting, WMI, XML and HTA components. It DOES run fine from a full WindowsXP system...
Z
#26
Posted 29 June 2007 - 11:34 AM
Z
#28
Posted 26 July 2007 - 09:27 AM
I have one question:
When Ghost finishes, I have the -rb flag set, but it doesn't seem to work. The hta is still up, and I have to manually hit the Reboot button to get the system to reboot.
Any ideas on how I can actually get the system to reboot when Ghost is finished? I'm using Ghost8 in my environment as well.
Thanks,
Z
#29
Posted 27 July 2007 - 07:19 AM
I've written my own HTA for restoring ghost images from disk, but the meat of the code still applies. Just ignore all of the html stuff:
'*****************************************************************************************
'* restoreBuild
'* starts the ghost restoration process for the selected build and method
'*****************************************************************************************
Sub restoreBuild
Dim filename, taskCmd
strTemp = "<h2>Restoring build...</h2>"
general.InnerHTML = strTemp
filename = cdrom & "\" & buildFilename
If not objFso.FileExists(filename) Then
strTemp = "<h2>ERROR: File not found " & filename & "</h2><ul>Ensure that <u><b>DISK 1</b></u> is loaded in the CD-ROM drive and click the " &_
"<i>Retry</i> button."
document.buttonsForm.nextButton.value = "<u>R</u>etry"
document.buttonsForm.nextButton.disabled = false
document.buttonsForm.cancelButton.disabled = false
general.InnerHTML = strTemp
Else
taskCmd = "%comspec% /c ghostontop.exe"
objShell.Run taskCmd,0,false
Select Case curMethod
Case "Initial"
taskCmd = "%comspec% /c ghost32.exe -sure -fdsp -clone,mode=load,src=" & filename & ",dst=" & destinationDisk & ",szeL -fx > \ghost.log"
objShell.Run taskCmd,0,true
finishBuild
Case "Windows"
taskCmd = "%comspec% /c ghost32.exe -sure -fdsp -clone,mode=prestore,src=" & filename & ":1,dst=" & destinationDisk & ":1,sze1=V -fx > \ghost.log"
objShell.Run taskCmd,0,true
finishBuild
End Select
End If
End Sub
'*****************************************************************************************
'* finishBuild
'* handles errors that occur during ghost and handles successful restorations
'*****************************************************************************************
Sub finishBuild
Dim result, logFile, count
Set logFile = objFso.GetFile("\ghost.log")
If logFile.Size <> "0" Then
Set logFile = objFso.OpenTextFile("\ghost.log")
count = 1
Do While logFile.AtEndOfStream <> true
result = result & count & "> "
Do While logFile.AtEndOfLine <> true or logFile.AtEndOfStream <> true
result = result & logFile.Read(1)
Loop
result = result & "<BR>"
general.InnerHTML = result
count = count + 1
Loop
logFile.Close
strTemp = "<CENTER><H1>FAILED</H1><DIV style='color:red;text-align:left'>An attempt to restore the system failed with the " &_
"following error message:<BR><BR><DIV style='position:absolute;border-style:solid;border-color:black;left:5%;" &_
"width:95%;color:black;padding:5%;border-width:1;font-family:terminal;font-size:10pt;overflow:auto'>" & result &_
"</DIV></DIV></CENTER>"
warning.InnerHTML = strTemp
warning.style.top = "10%"
warning.style.left = "10%"
warning.style.width = "80%"
warning.style.height = "75%"
document.buttonsForm.cancelButton.value = "E<u>x</u>it"
document.buttonsForm.cancelButton.accesskey = "x"
document.buttonsForm.cancelButton.disabled = false
warning.style.visibility = "visible"
Else
strTemp = "<h2>Complete!</h2><ul><font color=orange>" & result & "</font>The restoration process has finished without any " &_
"errors."
document.buttonsForm.cancelButton.value = "E<u>x</u>it"
document.buttonsForm.cancelButton.accesskey = "x"
document.buttonsForm.cancelButton.disabled = false
general.InnerHTML = strTemp
warning.style.visibility = "visible"
If needHAL = "yes" Then
handleHAL
Else
rebootMe
End If
End If
End Sub
'*****************************************************************************************
'* handleHAL
'* prepares the system for use with the correct HAL
'*****************************************************************************************
Sub handleHAL
Dim strDest, inFile, outFile, line, words, lword
strTemp = "<CENTER><H1>Updating HAL...</H1></CENTER>"
warning.InnerHTML = strTemp
objShell.Run "%comspec% /c diskpart /s X:\Windows\system32\probeParts.txt",0,true
Select Case strHAL
Case "acpiapic"
'Remove UpdateUPHal line from sysprep.inf
strDest = "C:\sysprep\sysprep.inf"
If objFso.FileExists(strDest) Then
Set inFile = objFso.OpenTextFile(strDest,1,true)
Set outFile = objFso.CreateTextFile(strDest & ".tmp",true)
'Loop through sysprep.inf file
Do While inFile.AtEndOfStream <> true
line = inFile.ReadLine
If line <> "" Then
words = split(line,"=")
lword = trim(words(0))
outFile.WriteLine(line)
If Lcase(lword) = "[unattended]" Then
If numProcs = 1 Then
outFile.WriteLine("UpdateUPHAL=ACPIAPIC_UP,%WINDIR%\Inf\Hal.inf")
Else
outFile.WriteLine("UpdateHAL=ACPIAPIC_MP,%WINDIR%\Inf\Hal.inf")
End If
End If
Else
outFile.WriteBlankLines(1)
End If
Loop
inFile.Close
outFile.Close
objFso.DeleteFile strDest,true
objFso.MoveFile strDest & ".tmp", strDest
Else
strTemp = "<CENTER><H1>FAILED</H1><DIV style='color:red;text-align:left'>An attempt to update your system HAL has " &_
"failed due to an inaccessible system drive.</DIV></CENTER>"
warning.InnerHTML = strTemp
warning.style.top = "10%"
warning.style.left = "10%"
warning.style.width = "80%"
warning.style.height = "75%"
document.buttonsForm.cancelButton.value = "E<u>x</u>it"
document.buttonsForm.cancelButton.accesskey = "x"
document.buttonsForm.cancelButton.disabled = false
End If
rebootMe
Case Else
rebootMe
End Select
End Sub
'*****************************************************************************************
'* rebootMe
'* opens the CD tray, delays 8 seconds and reboots
'*****************************************************************************************
Sub rebootMe
'Open CD tray
strTemp = "<center><h1>Ejecting Media...</h1></center>"
warning.InnerHTML = strTemp
cdrom = cdrom & "\"
CreateObject("Shell.Application").Namespace(17).ParseName(cdrom).InvokeVerb("Eject")
'Give delay to allow disk to eject
objShell.Run "%comspec% /c cscript X:\Windows\system32\timer.vbs",0,true
'Reboot the system
strTemp = "<center><h1>Rebooting System...</h1></center>"
warning.InnerHTML = strTemp
objShell.Run "%comspec% /c wpeutil reboot",0,false
End Sub
This post has been edited by zorphnog: 27 July 2007 - 07:29 AM
#30
Posted 27 July 2007 - 09:00 AM
I really need to learn to RTM.
Cheers,
Z
#31
Posted 11 October 2007 - 02:36 PM
Can someone help me or point me to the correct direction on how to change the background image when an option is chosen from using a radio button? Here is my situation:
I added two(radio) buttons that say (development and production) to readily distinguish the environment that they are going to get the image from. My problem is I cannot change the background image (am totally inexperience in html or hta) defined in <DIV>. Can someone please help me on how to do this?
What I am doing is this:
strBody = strBody & "<td><Input type=radio name=envList checked value=Production onclick=ChangeBG>" &_
"Production" & "</BUTTON><BR>"
strBody = strBody & "<Input type=radio name=envList value=Development onclick=ChangeBG>" &_
"Development" & "</BUTTON></td>"
sub changeBG
...
end sub
Is it possible to change it this way? What am I suppose to put in the "changeBG" to change the SRC?
Thank you very much.
You guys rock!!!
#32
Posted 12 October 2007 - 07:19 AM
strBody = strBody & "<td><Input type=radio name=envList checked value=Production onclick=proBG>" &_ "Production" & "</BUTTON><BR>" strBody = strBody & "<Input type=radio name=envList value=Development onclick=devBG>" &_ "Development" & "</BUTTON></td>" Sub proBG bg.InnerHTML = "<img src='probg.bmp'>" End Sub Sub devBG bg.InnerHTML = "<img src='devbg.bmp'>" End Sub
#34
Posted 19 October 2007 - 03:29 PM
Usually I get a "the user cancelled this command" or something like that.
It seems to be related to the use of spaces in the variables building the command. I can launch the executable itself without issue, but try to add the switches to it and it fails.
#36
Posted 23 October 2007 - 09:27 AM
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.
#37
Posted 23 October 2007 - 01:04 PM
#38
Posted 23 October 2007 - 02:12 PM
Stratuscaster, on Oct 23 2007, 11:27 AM, said:
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.
#39
Posted 24 October 2007 - 08:53 AM
zorphnog, on Oct 23 2007, 03:12 PM, said:
Stratuscaster, on Oct 23 2007, 11:27 AM, said:
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.
#40
Posted 24 October 2007 - 12:17 PM



Help

Back to top









