Jump to content

WinPE 2.0 GimageX COM based HTA


geezery

Recommended Posts


  • 3 weeks later...

i would like to say thank you very much for an outstanding solution for a gui to imagex. i have a few questions that have been brought up in a few past posts but not sure if ever answered.

a. i would like to use the map drive option, but the pop screen does end up out of screen with no way to move it.

b. this one is more important but i use nothing but winxp images and would like to incorporate the bootsect command into this proceeds to make it fully unattended or work within our environment. any code or help with this would be greatly appreciated.

c. is there still an option or way to remove the new none working progessbar, and show the ugly command prompt window? at this time it looks as if it has just hung.

thank you everyone for your help.

d@ve

Link to comment
Share on other sites

Hello all,

I have not been here reading for very long time. I have made very much changes for the version that is currently downloadable to the public. I have reverted back to the ImageX.exe usage for some functions, because I have found some problems when using the gimagexcom ActiveX. It is still in the package, but I'm only using it for some functions.

If someone is interested testing it I can give the link, just put an email to the address that is found from the first post.

Here is some things that are changed:

* Cleaned up the code a lot

* Added the "bootsect.exe /nt52 C: /force" command after the image has been applied. (I'm also using this for Windows XP deployment only) This can be easily changed to /nt60 if you are applying Vista images.

* Fixed the bug in the Map network window going out of the range

* Changed the (Apply,Capture & Append) functions to use the imagex.exe instead of the gimagex com

* Added a Delete function (Can delete entries from imagelist)

etc....

geezery

Link to comment
Share on other sites

I'd like to try it out I suppose. I've made so many changes to the current version that it wouldn't be worth it to update to the newer version.

Hope you don't mind I've been kinda advertising this thread in my sig. I did it more so I would be able to find it if I needed it.

Link to comment
Share on other sites

I have done the following:

Changed the background pic. You can see this a couple pages back, I uploaded them.

Changed some functions for the buttons at the bottom. Removed Map Network drive, capture image, append image. I changed these to launch my own applications, one that Maps 2 network drives at once, kills mshta and relaunches the HTA again. I couldn't automate the reload button. I also have it launch programs to preinstall applications for Vista and XP. I have other things I'm going to change in the future that I haven't gotten to yet:

- change the prompt after imaging complete to restart instead of shut down, and also have option for Restart or install programs instead of cancel.

you seemed to have given up. I need another feature which I was going to do myself. When the DISKPART menu comes up (besides the complaint that I can't use the keyboard on that screen) I need another option. I come across some systems (notebooks) that have media drives that the WinPE makes the C drive, so the script doesn't work automatically because it can't assign Disk 0 a drive letter (its already taken). So I have to manually go into diskpart and reassign vol 1 drive letter to another letter before I can format the drive to C and start the image.

So.... FEATURE REQUEST: add another radio button to the Diskpart pop-up that says "use custom diskpart.txt" file. You click that, browse to the file, select it and click proceed. So that way I can have a custom text file to do diskpart if I have to do one of those notebooks.

I'm in a flux right now (business stuff) with imagex so I'm not sure what my future with it will be. :no:

Link to comment
Share on other sites

I have gotten a lot of use out of this script, and modified it heavily for my own use.

I really appreciate the work that’s been done here.

On that note, I would like to contribute to this group.

I have seen several posts where people have had issues using USB drives due to the nature of there dynamic allocation of a drive letter.

I have a script that will find the drive letter of your USB drive, and change it to the drive letter of your choice. I have created this so I can run this script from my USB drive with the drive letter assign as Z:.

There are a couple of prerequisites that need to be followed first. They have to do with the setup of the USB drive initially.

My USB drive has 2 partitions. The first partition is a 1GB partition that holds the boot files for WinPE. The second partition holds the script and image files, and is 460GB.

The 1st partition should be formatted as Fat32, and should be setup to boot your WinPE.

The following article is a good one for this. (hint look for creating a UFD boot disk)

http://technet.microsoft.com/en-us/library/cc709665.aspx

Once you have the WinPE boot created, format the second partition using NTFS, and label the volume IMAGE This is important because the script looks for this drive by its volume label and gets the drive letter.

The attached zip file contains 4 files.

startnet.bat (this is an example and should not be coppied to your winpe windows\system32 dir.)

getUSBLetter.bat (copy this to your WinPE windows\system32 directory)

chgletter.txt (copy this to your WinPE windows\system32 directory)

image.bat (copy this to your WinPE windows\system32 directory)

What are the scripts doing.

The first script is getUSBLetter.bat.

This script uses a filesystem object to look at all “hard disks” on your system, then find the volume with the label of “IMAGE” it also sets the drive letter in the variable USB, which can be used in scripts.

The second task of the script is to change the drive letter that it finds using diskpart. In my case I have a chgletter.txt file that I pass to diskpart that changes the %USB% to Z

The third part of the script is basically the same as the first, and queries the drive again and resets the variable USB to the new drive letter.

At the end of this bat file it calls image.bat file that will cd to the drive letter %USB% and starts the wizard.hta.

I am sure there are better ways to achieve this, but this works well for me, and I haven’t seen any post here to help those users who are looking for a solution.

I hope this is useful.

Ken.

getusbletter.zip

Link to comment
Share on other sites

geezery,

The latest version is awsome.

I had to make one minor change, I had to change line 644

If cmdpc > 1 Then

I had to change this to 2 for my setup. I guess the command window that I enter the cmd.exe /c mshta.exe z:\imagex.hta

and the window that is opened for the hta count as more than one and I was getting the error to close a command window.

There werent any windows for me to close without the application closing.

Keep up the good work!

Ken.

Edited by KenKightly
Link to comment
Share on other sites

geezery,

The latest version is awsome.

I had to make one minor change, I had to change line 644

If cmdpc > 1 Then

I had to change this to 2 for my setup. I guess the command window that I enter the cmd.exe /c mshta.exe z:\imagex.hta

and the window that is opened for the hta count as more than one and I was getting the error to close a command window.

There werent any windows for me to close without the application closing.

Keep up the good work!

Ken.

Hello, you can launch the HTA without cmd /c. If you launch it like that it won't close the cmd.exe process in the background. It stays open as long as you can see the HTA in front of you. You don't have to make that change to line 644 if you launch the hta directly without the extra cmd.exe. You can see this scenario by launching the tasklist.exe from the command line. There is the extra cmd still open.

I have to count the number of opened cmd.exe processes, because the diskpart logic is based on that.

You also asked if it would be possiple to apply the image to i.e. D: drive. You can now select where to apply the image. The default value is still C:, but you can change it to what ever you want.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...