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

Jump to content


  • 18 Pages +
  • 1
  • 2
  • 3
  • 4
  • Last »
  • You cannot start a new topic
  • You cannot reply to this topic

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

#21 User is offline   geezery 

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

Posted 25 May 2007 - 12:27 PM

OK, I have found a way to get imagex /info wimfile.wim to variable

Dim oShell, oExec
Set oShell = CreateObject("WScript.Shell")
Set oExec = oShell.Exec("imagex.exe /info D:\Waik\F1_WINPE.wim")
ImgInfo = oExec.StdOut.ReadAll
WScript.echo  ImgInfo

This post has been edited by geezery: 26 May 2007 - 12:34 AM



#22 User is offline   kl300zx 

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

Posted 25 May 2007 - 01:38 PM

HI
I follow all your step the HTA when the windows pe boot up, the network map auto map to drive I:\
then the ImageXHTA.HTA fiel launch but is unable to connect to the images.txt on the share drive, when I get to I:\dir /w/p I see the Images.txt. and check all access right is good. is there any thing in the ImageXHTA.HTA Script I need to edit to make this work, when I test this in the Windows and is work fine.
Please help
Thank you
Kevin

#23 User is offline   geezery 

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

Posted 26 May 2007 - 12:36 AM

If it works on Windows for you, then it should work also in PE.

You can always open CMD-Prompt in PE and try to go to the I:\ share.

The refresh button also checks the images.txt file again, if you want to refresh it.

#24 User is offline   pretender69 

  • Junior
  • Pip
  • Group: Members
  • Posts: 76
  • Joined: 29-June 06

Posted 28 May 2007 - 09:12 AM

any chance you have this in zip format ?
my coding skills suck :P

TIA


View Postobiwantuxedo, on May 8 2007, 01:37 PM, said:

Here is the code I added for the capture, but only gives me one prompt instead of the the three:

Under the <script ...>
 
'****************************************************************************
'* Capture Image
'****************************************************************************
Sub RunScript
	strDrv = window.prompt("Please enter the drive letter you would like to capture.", "Drive Letter")
	strWimFile = window.prompt("Please enter the name for the captured image.", "Image Name")
	strWimDesc = window.prompt("Please enter the make and model, i.e. Dell Latitude D820.", "Description")

                'Test purposes only!!!
                Msgbox "IMAGEX /CAPTURE "& strDrv &" " & strDrv & "\"& strWimFile & " " &chr(34) & strWimDesc &chr(34) & " /verify /compress maximum"

End Sub 


Under <BODY ...>
 
<input id="runbutton" class="button" type="button" value="Capture" name="run_button" onClick="RunScript"> 


Like I said before, when I run this exact code in an HTA of its' own, it works. Cut and paste into this HTA, and I only receive one prompt.


#25 User is offline   kl300zx 

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

Posted 28 May 2007 - 10:48 AM

hi qeezy
I download this and follow everythin in your instruction, but this is my problem.
I create a share drive on the network and put images.txt and dispart.txt with 2007.wim on the share.
I copy the imagexhta.hta and htastype.css to the system32 folder on the winpe boot disk. I create a net use command in the startnet, so the it will auto map for me. the loading good , map network drive good, but when I launch the imagexhta.hta the is only come up with no menu, basicly is load but is won't read tyhe imagex.txt file I think. I check all the map and check for perimssion is all good. I wonder any where I need to look for this problem.
THank you very much for this, and is will be cool if I can get this work.
Thank you

#26 User is offline   geezery 

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

Posted 28 May 2007 - 12:29 PM

Hello everyone reading my thread.

I have spent the whole weekend designing the next release of this.

I have made some nice changes in the script.

-No more those static images.txt files
-Dynamic drop down list of the image files (ability to have many images in the shared folder)
-Capture and Append options


It's almost ready, I have to clean the script a lot and make some error checking. I try to release it tomorrow.

I think this can be useful also for those who only want to drop their "vanilla" sysprepped images from cd or dvd. I have to also make new instructions for this.

BTW: there is a link on the first post to zipped version, but I wouldn't bother using it, since the next rel. will be totally better

This post has been edited by geezery: 28 May 2007 - 12:31 PM


#27 User is offline   p4ntb0y 

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

Posted 28 May 2007 - 03:00 PM

I be looking forward to it!!

Sounds great

many thanks

#28 User is offline   kl300zx 

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

Posted 28 May 2007 - 03:02 PM

Cool
thank you so much,
I got the otherone working but only for one image, this new one will be so cool.
thank you

#29 User is offline   pretender69 

  • Junior
  • Pip
  • Group: Members
  • Posts: 76
  • Joined: 29-June 06

Posted 28 May 2007 - 04:14 PM

nice to here :)
will be watching for it tomorrow :)

thx

#30 User is offline   geezery 

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

Posted 29 May 2007 - 12:25 PM

Look at the first post.

#31 User is offline   pretender69 

  • Junior
  • Pip
  • Group: Members
  • Posts: 76
  • Joined: 29-June 06

Posted 29 May 2007 - 02:50 PM

sweet :thumbup
will give it a test later this evening.

Thank you :)

#32 User is offline   ccb458 

  • Group: Members
  • Posts: 8
  • Joined: 29-May 07

Posted 29 May 2007 - 10:16 PM

I was checking out your version 1 file yesterday and couldn't get it to work. Thank you so much for the new v2 files. I tried it out, and it seems great. However, I can't get it to deploy the image after DiskPart. Looking at your hta file, I found that you have hardcoded i:\images.wim in the following line:

strTaskValue = "imagex /apply i:\images.wim " + Radio.Id + " c:"


I don't know if that's the cause of problem asI am not familar with scripting language, could you help checking it?

Thanks..

This post has been edited by ccb458: 29 May 2007 - 10:17 PM


#33 User is offline   geezery 

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

Posted 30 May 2007 - 01:31 AM

I must fix some problems. Fixed version coming soon.

#34 User is offline   ccb458 

  • Group: Members
  • Posts: 8
  • Joined: 29-May 07

Posted 30 May 2007 - 02:43 AM

I have modified the code (add a few lines) in the "ShowRadioInfo" section. It seems to work, maybe you could check it out and see if it needs further modification.

geezery, I am trying to add a button to reboot the computer, but I don't know how to pass the "wpeutil reboot" thru your doTask, could you give me some ideas?


thx
-----




 
'****************************************************************************
'* 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
 

This post has been edited by ccb458: 30 May 2007 - 04:13 AM


#35 User is offline   geezery 

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

Posted 30 May 2007 - 08:17 AM

Maybe you can put exit on the lastline of the startnet.cmd

startnet.cmd

wpeinit
net use command
ImageXHTAv2.hta
exit

Then just put the put the window.close on the script.

I didn't test this method, but I think it should work, because the startnet.cmd stops when the ImageXHTAv2.hta is running, and it continues after it is closed.

I have already fixed all the errors and put some addons also. I will post the new zip soon.

#36 User is offline   geezery 

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

Posted 30 May 2007 - 09:32 AM

V0.21

Fixed some major bugs and added also possibility to use the Wims "Description" field.

#37 User is offline   pretender69 

  • Junior
  • Pip
  • Group: Members
  • Posts: 76
  • Joined: 29-June 06

Posted 30 May 2007 - 09:39 AM

wow 0.21 already, will do some tests with 0.21 when i get home,

was wondering if you could add ability to skip diskpart.txt settings, and maybe just a option to say 'format c: /fs:ntfs /q /y'
or format 'drive letter' /fs:ntfs /q /y

also is it possible to add ability to use ghost as well as imagex ?

btw thx for the great work you are doing on this project. :)


P.S. was just looking at the imagexhta file in 0.21 and some parts aren't in english ?

#38 User is offline   geezery 

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

Posted 30 May 2007 - 11:25 AM

View Postpretender69, on May 30 2007, 06:39 PM, said:

wow 0.21 already, will do some tests with 0.21 when i get home,

was wondering if you could add ability to skip diskpart.txt settings, and maybe just a option to say 'format c: /fs:ntfs /q /y'
or format 'drive letter' /fs:ntfs /q /y

also is it possible to add ability to use ghost as well as imagex ?

btw thx for the great work you are doing on this project. :)


P.S. was just looking at the imagexhta file in 0.21 and some parts aren't in english ?



You can use diskpart to do the format c:\ for you, I assume you have only one disk.

diskpart.txt

select disk 0
select partition 1
format fs=ntfs label="system" quick
active
exit


There is already a Ghost HTA available, search the Winpe Section on this forum.

You can of course add a button here to start ghost32.exe

Make this sub

'***************************************************************************** 
'Ghost32
'****************************************************************************
Sub Ghost32	
Set objShell = CreateObject("Wscript.Shell")	
objShell.Run "Ghost32.exe" 'You have to put the necessery ghost files to WinPE path variable i. e. Windows\System32
End Sub


Then you must add the button to HTA:

[code]
<Button class = 'btn' id=capture onclick=Ghost32()> Ghost32 </Button>
[code]

I don't think that there is a point to make ghosting commands here, because there is so much of them.

This post has been edited by geezery: 30 May 2007 - 11:26 AM


#39 User is offline   pretender69 

  • Junior
  • Pip
  • Group: Members
  • Posts: 76
  • Joined: 29-June 06

Posted 30 May 2007 - 12:10 PM

actually i have 5 drives
and have already added the ghost32 :)
works great using both :)

think i can just comment out the diskpart from running before deployin the image and format from the cmd prompt.

hopefully it work will test it out. :)

how about a option for choosing what compression to use for capture ?

thx for all your hard work :)

#40 User is offline   p4ntb0y 

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

Posted 30 May 2007 - 02:12 PM

A option to include a format if its required would be nice maybe just a tick box.

I can put this in but would be nice to be in your script as this would help loads of people that are not to good at scripting.

An option to split across cd's would be nice (Only joking I still looking into this and really what to use your script when I work it out)

again many thanks for this! it's people like yourself that really help other people out.

Share this topic:


  • 18 Pages +
  • 1
  • 2
  • 3
  • 4
  • Last »
  • You cannot start a new topic
  • You cannot reply to this topic

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



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