solutionone Posted June 7, 2007 Posted June 7, 2007 Hi again, Geezery.Well after working with several different plans of actions to get the current disk/volume status, so when running the imagex.hta, we know immediately what drives are where (e.g. if plugging in a removable drive, you will see its label and what lettter is assigned.) I've come up with this working example.Basically we modify the imagex.hta so the default wim location is not hard coded. it should pop up a window asking for the location when the imagex.hta has started. This may mean you need to move the imagex /info within the hta to run after this is entered.Basically what we can do, is set the imagex.hta to run the command I have placed in diskpart.cmd. this will output the volume list to a file called. disklist.txt in the x:\windows\system32 directory. Then in the actual html within the hta. we can add this iframe to display the formatted disklist.txt above the current buttons. (see Concept image)I have built this basic example for you, As the HTA is your baby I will let you integrate it. I integrated it on my copy with a static disklist.txt and not actually re-running the diskpart list volume in the hta and it displays nicely and makes capturing alot easier when faced with multiple partitions/disks.Hope this helps, worked on it for ages trying to get a working model.Also I have asked my mate to look at making the dynamic diskpart hta for the applying side of things. He said it will take a week or two. But he'll send me something as soon as possible.disklist.zip
geezery Posted June 8, 2007 Author Posted June 8, 2007 Here is a preview of next version:I still have to make that browse for folder function. I havent't found any working methods from vbscript, so I think I have to use something else:)
HUMA2000 Posted June 8, 2007 Posted June 8, 2007 Where can I get a copy of your project or the source file?? I'm very interested on it.
geezery Posted June 8, 2007 Author Posted June 8, 2007 (edited) Ok, added a new version. I need some testers to find bugs:)I made an autoit script for the browse function, since I couldn't find any working vbscript methods. There is a file called browse.exe. Here is the code for it:$file = "X:\Windows\System32\browse.txt"if FileExists ($file) then FileDelete($file)EndIf$message ="Select location of *.wim files"$Open = FileOpenDialog($message,"C:" & "\", "Windows Imaging Files (*.wim)", 1 + 2 )FileWriteLine($file, $Open)The only purpose for the browse.exe is to get the browse for file dialog open in winpe v2. I made some testing and it worked for me. There is also a new Hard Disk Info function, but I had no time for testing it. So there might be something to improve.I had to put the zip to my personal ftp, since the limit uploading here is 200kb and the zip is 207kb:) Edited June 8, 2007 by geezery
geezery Posted June 8, 2007 Author Posted June 8, 2007 I guess so. ****. I don't have it here at home.
powaking Posted June 8, 2007 Posted June 8, 2007 Was able to unzip with winrar but not sure if there are any missing files. Here is what I got in the zip:append.gif - 2kcapture.gif - 2kcmd.gif - 2kdrvmap.vbs - 1kexit.gif - 2khtastyle.css - 2kimagex24.hta - 16kreload.gif - 2kTrying it out now. I had added a button for Rdeploy since we use that too to the toolbar so don't want to just replace what I have. I'll let you know how it works.
geezery Posted June 8, 2007 Author Posted June 8, 2007 (edited) nothing Edited June 8, 2007 by geezery
powaking Posted June 8, 2007 Posted June 8, 2007 Let me know if this works.Having trouble witht he script. Keeps coming up with Type Mismatch for VolInfo. Tried DIM'ing it in the Globals but no luck.browse.rar
geezery Posted June 8, 2007 Author Posted June 8, 2007 (edited) Found a bug, I will put new files in a moment.New package I quick tested it also and it works. The browse.exe was also corrupted. Use the new css file, or edit your current one, since there is some new styles for disk information. Edited June 8, 2007 by geezery
powaking Posted June 8, 2007 Posted June 8, 2007 Anyway to make it execute imagex /info command hidden? Don't like to see the black dos box popup when selecting your wim and getting the list of images.
geezery Posted June 8, 2007 Author Posted June 8, 2007 If you can find another way to write stdout please tell me.Set oExec = objShell.Exec("imagex.exe /info " + strFile)Do While Not oExec.StdOut.AtEndOfStream sReadLine = oExec.StdOut.ReadLine
powaking Posted June 8, 2007 Posted June 8, 2007 Well if you pipe it to a text file you won't see any windows flashing and then just read the text file. Thats one way.
geezery Posted June 8, 2007 Author Posted June 8, 2007 (edited) That's true. Actually in earlier versions I did it that way, but I was not sure about writing to ram disk. Edited June 8, 2007 by geezery
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now