Jump to content

Welcome to MSFN Forum
Register now to gain access to all of our features. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more. This message will be removed once you have signed in.
Login to Account Create an Account



Photo

WinPE 2.0 GimageX COM based HTA

- - - - -

  • Please log in to reply
356 replies to this topic

#51
thebearpoo

thebearpoo
  • Member
  • 7 posts
  • Joined 30-January 07
geezer - I get the same result in ver 2.1, after diskpart completes nothing happens. If I substitute this code(which is posted on page 2) the apply button works perfectly.

 
'****************************************************************************
'* showRadioInfo
'* display details of radio button selection in details divider
'****************************************************************************
Sub showRadioInfo
Dim objTextFile, Radio, strRadioValue, strDetails, objSel1, strFile

Set objSel1 = window.document.getElementById("select1")
strFile = myFilePath + objSel1.options(objSel1.selectedindex).text

details.style.visibility = "visible"
start.style.visibility = "visible"
For Each Radio in Document.getElementsByName("radioList")
If Radio.Checked = True Then
strTaskValue = "imagex /apply " + strFile + " " + Radio.Id + " c:"
End If
Next
Details.innerHTML = "<BR><table id='detailsTable'><tr><td>" & strDetails & "</td></tr></table><BR>"
End Sub


ccb458 - How did you call your Reboot option using a cmd.bat file to restart your computer after imagex runs?


How to remove advertisement from MSFN

#52
pretender69

pretender69

    Junior

  • Member
  • Pip
  • 76 posts
  • Joined 29-June 06
have same problem, apply isn't working.
have tried what thebearpoo suggested but still doesn't work for me either.

#53
jstchil

jstchil
  • Member
  • 2 posts
  • Joined 12-April 07
I tried to add a line to my startnet.cmd to get this imagex.hta to load on startup but i get an access denied error. Is auto loading this hta not posible?

#54
geezery

geezery

    Member

  • Member
  • PipPip
  • 254 posts
  • Joined 21-July 06
Sorry dudes, I cant help you today, because I can't make any tests.

jstchill ->

Did you tried it on real environment or Virtual? I got also those errors when I tried on MS VirtualPC and Innotek Virtualbox.

#55
pretender69

pretender69

    Junior

  • Member
  • Pip
  • 76 posts
  • Joined 29-June 06
oops
edited

Edited by pretender69, 31 May 2007 - 01:58 PM.


#56
jstchil

jstchil
  • Member
  • 2 posts
  • Joined 12-April 07
I am building a bootable USB key. so its a real enviroment. I think i figured it out it works on a machine with 512 MB Ram but not on a 256MB ram machine.

#57
ccb458

ccb458
  • Member
  • 8 posts
  • Joined 29-May 07
Jstchil,

Your problem maybe due to the limitation of the memory environment required by winpe. Maybe with 256mb ram, something can't be loaded. Have to check Microsoft's website.


Geezery,

Take a break today. I don't know how many thanks I should tell you as I am trying your hta file out in my company environment. We need to deploy images out and we used to use OSD for this, but now we want to fit everything into a USB or DVD disc. We havn't finished the script yet.. (as I am not a scripting guy), but you sure have helped us a lot.

Look forward to see what you could find out about the bug. Maybe you could tell me what lines I should add to add to your hta file to show the value of "STRTASKVALUE" in a pop-up window. Then we could troubleshot faster..

thx

strTaskValue = "imagex /apply "+objSel2.options(objSel2.selectedindex).text+" " + Radio.Id + " c:"

Edited by ccb458, 31 May 2007 - 07:23 PM.


#58
geezery

geezery

    Member

  • Member
  • PipPip
  • 254 posts
  • Joined 21-July 06
I try to fix all the errors today. Problem is that I don't have any test environment since I haven't been able to test in virtual environment. I have to try raising the virtual memory. I also havent got network working properly in virtual environment.

#59
frankenstein897

frankenstein897
  • Member
  • 9 posts
  • Joined 25-May 07
Yeah, I tried making that change and it still just performs the diskpart then does not proceed with the apply of the image.

#60
frankenstein897

frankenstein897
  • Member
  • 9 posts
  • Joined 25-May 07
OK, I think the problem is around line 143. I am working on it now to see if I can get it fixed.

#61
frankenstein897

frankenstein897
  • Member
  • 9 posts
  • Joined 25-May 07
Getting closer, I saw briefly that it displayed the help for imagex like the syntax is incorrect somewhere.

#62
geezery

geezery

    Member

  • Member
  • PipPip
  • 254 posts
  • Joined 21-July 06
Ok, I finally got this HTA working on VMWARE with network support, so it was easier to locate the bug.

I upped a new version again, I hope it works.

There was a little error on line 327

Original:

strTaskValue = "imagex /apply "+objSel2.options(objSel2.selectedindex).text+" " + Radio.Id + " c:"

Fixed:

strTaskValue = "imagex /apply " & myfilepath +objSel2.options(objSel2.selectedindex).text+" " + Radio.Id + " c:"

so the path to the wim files were missing.

#63
frankenstein897

frankenstein897
  • Member
  • 9 posts
  • Joined 25-May 07
Bingo, that was it. Thanks!!!!!! I was just looking at that line.

#64
frankenstein897

frankenstein897
  • Member
  • 9 posts
  • Joined 25-May 07
Anything else change from .21 to .22?

#65
geezery

geezery

    Member

  • Member
  • PipPip
  • 254 posts
  • Joined 21-July 06
I'm working on the file path popup on the start, but the error handling I want is a little tricky. Would that chkdsk /r option be good? I can put that one in the next rel if you guys want.

I'm out of ideas, so if you have some put it here. Maybe those capture and append could be better done, but I don't personally use those much. So if someone want's to improve those go on. But I hope you post the improved versions here also.

Like I mentioned here I got this also working on vmware when I put 600mb virtual memory. I didn't test what is the limit, but I think that is enough.

#66
frankenstein897

frankenstein897
  • Member
  • 9 posts
  • Joined 25-May 07
I am good with what is there. I mainly wanted to look at multiple WIMs and be able to cpature and you more than exceeded it for me. I am good. Thanks!!!!!!

#67
frankenstein897

frankenstein897
  • Member
  • 9 posts
  • Joined 25-May 07
Ok well, maybe a reboot option. Or something to reboot after imaging.

#68
solutionone

solutionone

    Newbie

  • Member
  • 28 posts
  • Joined 29-May 07
The capture side of things does work well, but of the 5-6 computers I have imaged for backup purposes it is quite common for there to be a corrupted file in the temporary internet files, unfortunately it gets half way through the capture before hitting the T.I.F. so it would be a major advantage to run chkdsk on a drive before the capture/append. Using /r (bad sector search) would add too much time to the whole process while /f repairs the issues enough to get a good image without crashing halfway through.

In regards to new ideas/improvements for this project, I'm not a scripter by any means so I'm not sure of the difficulty of this, but in regards to being able to choose/change the wim location with a prompt when starting the HTA. is there any way to run diskpart list volume and display the result within the HTA when the prompt comes up, making it easier to see which partitions/volume are where.

Edited by solutionone, 01 June 2007 - 09:24 PM.


#69
p4ntb0y

p4ntb0y

    Member

  • Member
  • PipPip
  • 237 posts
  • Joined 14-February 06
I personally don't think chkdsk should be there..

A you can do it before you load into winpe.
B You're then be trying to make it into a repair and backup solution which is what WinRE is really.

@Geezery
I have being doing some test's on spilt wim files and tried out the spanned media option for in the WAIK using the Vista as a source and this somehow copys over each SWM file required to the drive (After you cut your drive up) asking for cd on the way. adding this feature would be very handy for those that do not have dvd's and machine that take an age to boot by USB.
I am not sure how you would be able to assign the cd rom letter so it gets the same one all the time.

#70
solutionone

solutionone

    Newbie

  • Member
  • 28 posts
  • Joined 29-May 07

I personally don't think chkdsk should be there..

A you can do it before you load into winpe.
B You're then be trying to make it into a repair and backup solution which is what WinRE is really.


A: I sort of see where you are coming from p4mtb0y, but I have noticed several posters say they are setting the imagex.hta to start with WinPE as they didn't want their techs mucking around. In these cases it would mean they would have to back out of the hta and start it again afterwards which seems a bit pointless.

To satisfy both camps on this one, seeing as it wouldn't need a major change, perhaps a simple "do you want to run chkdsk" before proceeding could pop up when using capture/append. If the user clicks yes it just waits till the user enters which drive letter they which to capture/append and then uses this varible to run the chkdsk and the imagex command.

B: I disagree with you here, the point of running the chkdsk in my eyes is to prevent wasting valuable time with imagex having it get half way through a capture and then failing, I've had some users who had been upgraded to Windows Vista, used it for a couple of months and then had their computer replaced. With imagex it is a simple process of capturing their workstations and then applying the image to the new PC and away they go, no setting up their custom program and settings. Just a simple reactivation and then in most cases Microsoft Update fixes the drivers.

And if it is your boss getting the upgraded computer it eases the process substantially :thumbup

#71
geezery

geezery

    Member

  • Member
  • PipPip
  • 254 posts
  • Joined 21-July 06
p4ntb0y ->

I made a little wmi query vbscript. I think you can use it to find cd-driveletter.

Option Explicit
Call FindCD()

Function FindCD
Dim strComputer, objWMIService, colItems, objItem, CDLetter
strComputer = "." 
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\CIMV2") 
Set colItems = objWMIService.ExecQuery( _
	"SELECT * FROM Win32_CDROMDrive",,48) 
For Each objItem in colItems 
	Wscript.Echo objItem.Drive
Next
End Function

I haven't tried it yet in WinPE, but I think it should work. I think I'm going to release a new version tomorrow with some nice extras.

Edited by geezery, 03 June 2007 - 12:35 AM.


#72
solutionone

solutionone

    Newbie

  • Member
  • 28 posts
  • Joined 29-May 07
looking forward to tomorrows release, keep up the excellent work geezery.

#73
geezery

geezery

    Member

  • Member
  • PipPip
  • 254 posts
  • Joined 21-July 06
Added a new version again. Look at the first post.

v.0.23

-Reboot option after Apply, Append & Capture
-Added running chkdsk /x before Append and Capture. (Same as chkdsk /f, but it is kind of forced switch)
-Changed the buttons to icons

Coming in the next release:

-Status of the disks
-Network mapping

Edited by geezery, 03 June 2007 - 11:25 AM.


#74
p4ntb0y

p4ntb0y

    Member

  • Member
  • PipPip
  • 237 posts
  • Joined 14-February 06
Nice,

just did a quick test...

A option to run chkdsk if you want to. would be nice.

A option to save your wim to your letter choice "open save as" explorer, just in case you have a mapped network drive or USB Drive.

just for completeness an Icon for just Capture would be nice, I know you have append but a spearate icon for capture would come in handy.

The ability to copy SWM files to a temp location on the computer then apply the image and delete after.
lol

Nice work!

#75
solutionone

solutionone

    Newbie

  • Member
  • 28 posts
  • Joined 29-May 07
sounds good, unfortunately its Queen's Birthday Weekend here in New Zealand, so I'll have to wait till tomorrow to play with it. Looking forward to the next release, the things you've mentioned next sound awesome.

I agree with p4ntb0y about having a separate capture icon though.

Edited by solutionone, 03 June 2007 - 04:32 PM.





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users