MSFN Forum: WinPE 2.0 GimageX COM based HTA - MSFN Forum

Jump to content



  • 18 Pages +
  • « First
  • 2
  • 3
  • 4
  • 5
  • 6
  • Last »
  • You cannot start a new topic
  • You cannot reply to this topic

WinPE 2.0 GimageX COM based HTA Rate Topic: -----

#61 User is offline   frankenstein897 

  • Group: Members
  • Posts: 9
  • Joined: 25-May 07

Posted 01 June 2007 - 11:52 AM

Getting closer, I saw briefly that it displayed the help for imagex like the syntax is incorrect somewhere.


#62 User is offline   geezery 

  • Member
  • PipPip
  • Group: Members
  • Posts: 254
  • Joined: 21-July 06

Posted 01 June 2007 - 01:10 PM

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 User is offline   frankenstein897 

  • Group: Members
  • Posts: 9
  • Joined: 25-May 07

Posted 01 June 2007 - 01:30 PM

Bingo, that was it. Thanks!!!!!! I was just looking at that line.

#64 User is offline   frankenstein897 

  • Group: Members
  • Posts: 9
  • Joined: 25-May 07

Posted 01 June 2007 - 01:31 PM

Anything else change from .21 to .22?

#65 User is offline   geezery 

  • Member
  • PipPip
  • Group: Members
  • Posts: 254
  • Joined: 21-July 06

Posted 01 June 2007 - 01:38 PM

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 User is offline   frankenstein897 

  • Group: Members
  • Posts: 9
  • Joined: 25-May 07

Posted 01 June 2007 - 01:40 PM

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 User is offline   frankenstein897 

  • Group: Members
  • Posts: 9
  • Joined: 25-May 07

Posted 01 June 2007 - 01:56 PM

Ok well, maybe a reboot option. Or something to reboot after imaging.

#68 User is offline   solutionone 

  • Newbie
  • Group: Members
  • Posts: 28
  • Joined: 29-May 07

Posted 01 June 2007 - 08:43 PM

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.

This post has been edited by solutionone: 01 June 2007 - 09:24 PM


#69 User is offline   p4ntb0y 

  • Member
  • PipPip
  • Group: Members
  • Posts: 237
  • Joined: 14-February 06

Posted 02 June 2007 - 02:29 PM

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 User is offline   solutionone 

  • Newbie
  • Group: Members
  • Posts: 28
  • Joined: 29-May 07

Posted 02 June 2007 - 05:03 PM

View Postp4ntb0y, on Jun 3 2007, 08:29 AM, said:

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 User is offline   geezery 

  • Member
  • PipPip
  • Group: Members
  • Posts: 254
  • Joined: 21-July 06

Posted 03 June 2007 - 12:34 AM

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.

This post has been edited by geezery: 03 June 2007 - 12:35 AM


#72 User is offline   solutionone 

  • Newbie
  • Group: Members
  • Posts: 28
  • Joined: 29-May 07

Posted 03 June 2007 - 01:49 AM

looking forward to tomorrows release, keep up the excellent work geezery.

#73 User is offline   geezery 

  • Member
  • PipPip
  • Group: Members
  • Posts: 254
  • Joined: 21-July 06

Posted 03 June 2007 - 11:24 AM

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

This post has been edited by geezery: 03 June 2007 - 11:25 AM


#74 User is offline   p4ntb0y 

  • Member
  • PipPip
  • Group: Members
  • Posts: 237
  • Joined: 14-February 06

Posted 03 June 2007 - 12:38 PM

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 User is offline   solutionone 

  • Newbie
  • Group: Members
  • Posts: 28
  • Joined: 29-May 07

Posted 03 June 2007 - 04:32 PM

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.

This post has been edited by solutionone: 03 June 2007 - 04:32 PM


#76 User is offline   geezery 

  • Member
  • PipPip
  • Group: Members
  • Posts: 254
  • Joined: 21-July 06

Posted 03 June 2007 - 10:44 PM

The first icon is a separate capture icon.

#77 User is offline   p4ntb0y 

  • Member
  • PipPip
  • Group: Members
  • Posts: 237
  • Joined: 14-February 06

Posted 04 June 2007 - 12:46 PM

@Geezery
sorry I mean't an apply button I know you list the wims from a location you set in the script but another apply button would be heplfull to browse to a network share or USB Drive. That way you cover all base's and add extras in later.

I like the colour scheme as well just make it translucent to make it look like vista aero

This post has been edited by p4ntb0y: 04 June 2007 - 12:51 PM


#78 User is offline   solutionone 

  • Newbie
  • Group: Members
  • Posts: 28
  • Joined: 29-May 07

Posted 04 June 2007 - 08:42 PM

Hi Geezery, finally had a chance to test your new version, looking good, I really like the new icons. Something to watch is that if you save the imagex.hta onto a network drive. and then move it to your tech pc to add to the windows pe, right click the HTA and click unblock before creating the winpe. For some reason having it on a network drive makes it a blocked file and then when you boot into winpe and run imagex.hta you will get "access denied".

I was pulling my hair out for awhile. I noticed in your hta you have a space between diskpart and its extension (diskpart .txt) no problem for me as I changed the location, but it may cause others a hassel, other than that everything looks sweet.

The chkdsk seems to work great, haven't had a single image fail today, the actual process of running chkdsk also happens so quickly even with a lot of files that it doesn't seem necessary to have an option not to run chkdsk, but that just my opinion.

I like the current apply functionality. with the wim drop down list and everything. I still think their should be a prompt asking for the wim location as the program starts instead of manually adding the location of the wim file in the hta.

Looking forward to the disk status functionality, at the moment I just make use of the cmd button and then run diskpart list volume, but if the info actually automatically pops up the info within the hta that would be excellent.

I have tested the append functionality and it works great.

Is there any chance of hard coding imagex to use wimscript.ini when capturing/appending so pernament exclusions can be set.
I believe the syntax is imagex /capture /config=x:\windows\system32\wimscript.ini .... etc.

In the wimscript.ini file you can just have the default exclusions, but it gives us a chance to add new exclusions. eg. exclude zip files from compression, etc.

This post has been edited by solutionone: 04 June 2007 - 09:02 PM


#79 User is offline   geezery 

  • Member
  • PipPip
  • Group: Members
  • Posts: 254
  • Joined: 21-July 06

Posted 04 June 2007 - 10:25 PM

I noticed that extra space also yesterday. I think there is a possibility to make a dynamic diskapart also without the diskpart.txt file, but the scripting of it might take like 20 hours or more and I don't have time for it now. Actually I managed to make that diskpart list volume popup, but the text formatting is a mess. I think I'm going to use wmi to retrieve the volume information. I actually have code for that also.

If someone likes to make that diskpart script it would be nice. I tested the Sendkeys method to diskpart and it works pretty well.

msdn sendkeys
http://msdn2.microso...y/8c6yea83.aspx

I don't know about that extra apply button, since if I make that *.wim file path change option you can then always change the path.


Adding options to Imagex /Capture

Line: 252 in v0.23

Original:
ObjShell.Run "%comspec% /c imagex /capture "& strDrv &" "  & myFilepath &  strWimFile & " " &chr(34) & strWimDesc &chr(34) & " " &chr(34) & strWimDesc2 &chr(34)


Modified:
ObjShell.Run "%comspec% /c imagex /capture /config=x:\windows\system32\wimscript.ini "& strDrv &" "  & myFilepath &  strWimFile & " " &chr(34) & strWimDesc &chr(34) & " " &chr(34) & strWimDesc2 &chr(34)


Notice the extra space after the wimscript.ini!

I think it would be nice to have an option to install Windows XP from the Gui also, does anyone have a step by step tutorial for this? I noticed the thread here and there was a mention about some registry keys that needs to be edited before the diskpart.

This post has been edited by geezery: 04 June 2007 - 10:27 PM


#80 User is offline   solutionone 

  • Newbie
  • Group: Members
  • Posts: 28
  • Joined: 29-May 07

Posted 05 June 2007 - 02:20 AM

Hi again Geezery, I've been doing some research into p4ntb0y's idea of using the open dialog box for picking the wim location and etc. I found this brilliant hta reference from the scripting guy @ MS.

http://www.microsoft.com/technet/scriptcen...s/fileopen.mspx

hope this helps, by the way thanks for the quick reply regarding the imagex config file. I've made the changes which work great. I'll post my exclusions list for compression when I get the chance at work tomorrow.

I think installing XP/Vista from this would be an excellent addition to this project, but we should probably get all the base functions down pat first. Good foundations and all that, not that it doesn't work well at the moment, but we can all work together with ideas, etc to make a good project a great one :thumbup

Share this topic:


  • 18 Pages +
  • « First
  • 2
  • 3
  • 4
  • 5
  • 6
  • Last »
  • You cannot start a new topic
  • You cannot reply to this topic

10 User(s) are reading this topic
0 members, 10 guests, 0 anonymous users



All trademarks mentioned on this page are the property of their respective owners
Copyright © 2001 - 2011 msfn.org
Privacy Policy