Posts posted by powaking
-
-
The current release is using that COM component and it works nicely, but the progress bar doesn't work. If you find bugs please report them here.
I actually found one and I will repair it in the next version. I wish that I could some how show the progressbar also. I actually have the progress indicator working in the HTA if you are using it from the Windows XP or Vista. You just have to define the com component a bit different.
Sorry haven't tried your HTA in a while. So nothing from this code works? Can you get time remaining? If so could you use that to calculate progress????
Set objWIM = WScript.CreateObject("GImageX.GImageXCtrl", "objWIM_")
objWIM.Source = "test.wim"
objWIM.Destination = "c:\test"
objWIM.ImageIndex = 1
objWIM.Check = TRUE
objWIM.Verify = TRUE
objWIM.ApplyImage
WScript.DisconnectObject objWIM
Set objWIM = Nothing
Sub objWIM_Progress(Percent, TimeRemaining)
WScript.Echo Percent & "% - " & TimeRemaining & " sec(s)"
' Abort the operation by using the line below
'objWim.Abort = TRUE
End Sub
Sub objWIM_ProgressInfo(Info)
WScript.Echo Info
End Sub -
I updated the com based ImageX.hta, but there is currently no support for progress indicator. If you find a way to show the progress indicator it would be more than nice.
Take a look at this: ImageX COM
The author of AutoIt wrote up a COM for imagex and made a GUI for it and shows a progress. Maybe you can implement the use of the COM to grab the progress???
-
-
Trying to get this autoit script to authenticate a password and group member in WinPE 2.0 (VistaPE)
$oMyError = ObjEvent("AutoIt.Error", "ComError")
$username = Inputbox("Username",'Enter your username',"","",200,100,-1,-1)
$password = Inputbox("Password",'Enter your password',"","*M",200,100,-1,-1)
$domain = ""
$group = ""
If Uservalidate($domain, $username, $password, $group) = 0 then
MsgBox(16 + 262144, "Error", "Try again", 8)
EndIf
Func UserValidate($Domain, $UserName, $Password, $InGroup = "")
Local $NameSpace = ObjGet("WinNT:")
Local $ADS_SECURE_AUTHENTICATION = 0x0001
Local $DomObj = $NameSpace.OpenDSObject ("WinNT//" & $Domain, $UserName, $Password, $ADS_SECURE_AUTHENTICATION)
If @error <> 0 Then Return 0
Return 1
EndFunc ;==>UserValidate
Func ComError()
If IsObj($oMyError) Then
$HexNumber = Hex($oMyError.number, 8)
SetError($HexNumber)
Else
SetError(1)
EndIf
EndFunc ;==>ComErrorKeep getting errors on ObjGet command.
Before I pull my hair out is this even possible in WinPE2.0 environment? Am I wasting my time? Is there another method?
-
-
I think the USB boot is a lot quicker if the target computer supports high speed usb on the boot. But if it uses USB 1.1 then the CD-boot method is a lot quicker.
I've managed to get VistaPE booted via PXE using TFTP32 app. Much quicker than CD and no need to carry one around. Really comes down to if the nic supports pxe booting and it can be tricky to setup too. I haven't tried with just WinPE but don't see it being any different.
-
-
-
-
geezery,
I have some experience with AutoIt that I may be able to help with. I've created a RC tool for my team that will push out a VNC service (using RealVNC) to remote computers and such. Some experience with WIM in AutoIt (not a whole lot but do use some of the WIM features in AutoIt to get PC information). Your admin console sounds exactly what I could use this for and would be willing to test it out with you.
-
-
-
-
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.
-
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 - 2k
capture.gif - 2k
cmd.gif - 2k
drvmap.vbs - 1k
exit.gif - 2k
htastyle.css - 2k
imagex24.hta - 16k
reload.gif - 2k
Trying 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.
-
You check this out for drive mapping?
http://www.ss64.com/wsh/drivemap.html
Be nice to prompt to map a drive first.
-
-
Edited by powaking
I hardcoded this line to the hta file:
Set oExec = oShell.Exec("imagex.exe /info " + strFile)
to this
Set oExec = oShell.Exec("imagex.exe /info m:\vistape\mywim.wim")
One I did that I was able to view that wims image number and description.
It appears it has something to do with this:
Set objSel1 = window.document.getElementById("select1")
strFile = myFilepath + objSel1.options(objSel1.selectedindex).text
??
-
p4ntb0y->
Do you know how I can get this dialog to work on Winpe v2. It works on Windows XP, but not on WinPe based system.
Here is the full sub, just make a button to call it. I also tried BrowseForFolder method and safrcdlg.CommonDialog and none of them work in Winpe. I noticed that in winpe's notepad there is a nice dialog when opening files. I wonder how I can call it?
'****************************************************************************
'* Browse Folder Button
'****************************************************************************
Sub Browse
Dim objDialog, FilePath, JustPath, objFile
Set objDialog = CreateObject("UserAccounts.CommonDialog")
objDialog.Filter = "Wim Files|*.wim|All Files|*.*"
objDialog.FilterIndex = 1
objDialog.InitialDir = myFilePath
FilePath = objDialog.ShowOpen
If FilePath = 0 Then
Exit Sub
Else
FilePath = objDialog.FileName
Set objFile = objFSO.GetFile(FilePath)
MyFilePath = objFSO.GetParentFolderName(FilePath) & "\"
Window_Onload
End If
End SubHave you taken a look here?
-
Edited by powaking
powaking->Can you make a test in VistaPe?
Copy this code to notepad and change the filename.wim to your wim filename. Then Save it to same folder where the wim is i. e. test.vb script: test.vbs
Tried it but got this error:
Line: 6
Char: 1
Error: The system cannot find the file specified
Code: 800700002
Source: WshShell.Exec
I even issued a cscript //H:WScript for giggles and got the same results.
BUT
I then relealized I hadn't copied the required wim files into the system32. Once I did that then I got the msgbox displaying the WIMs information. So looks like we are heading in the right direction.
Now just need to make a plugin for Vistape to copy these files to the system32 folder (so I don't have to manually do it each and every time).
Edit:
If I add this:
Do While Not oExec.StdOut.AtEndOfStream
sReadLine = oExec.StdOut.ReadLine
pos = Instr(1, sReadLine, "<DESCRIPTION>", 1)
if pos = 0 then
else
msgbox pos
end if
loop
To the Test.vbs all I get is 5 for the value of pos.
Edit #2: (Sorry but I think this is it and we can work from here)
This works. It displays the Image number, description and name
CAll Volumes
Redim strNames(0)
Redim strIndx(0)
Redim strDesc(0)
Sub Volumes
Dim oExec,OShell, list
Set oShell = CreateObject("WScript.Shell")
Set oExec = oShell.Exec("imagex.exe /info i:\vistape\MyWim.wim")
Do While Not oExec.StdOut.AtEndOfStream
sReadLine = oExec.StdOut.ReadLine
pos = Instr(1, sReadLine, "<NAME>", 1)
pos2 = Instr(1, sReadLine, "<IMAGE ", 1)
pos3= Instr(1, sReadLine, "<DESCRIPTION>", 1)
If pos2 > 0 Then
i = i + 1
Redim Preserve strIndx(i)
Redim Preserve strNames(i)
Redim Preserve strDesc(i)
strDesc(i) = "NO DESCRIPTION"
tmpStr1 = Right(sReadLine, Len(sReadLine) - (pos2 + 13))
strIndx(i) = Left(tmpStr1, Len(tmpStr1) -3) 'increased to 3 to remove the additional "
msgbox strIndx(i)
End If
If pos > 0 Then
tmpStr1 = Right(sReadLine, Len(sReadLine) - (pos + 5))
strNames(i) = Left(tmpStr1, Len(tmpStr1) -8)
msgbox strNames(i)
End If
If pos3 > 0 Then
tmpStr1 = Right(sReadLine, Len(sReadLine) - (pos3 + 12))
strDesc(i) = Left(tmpStr1, Len(tmpStr1) -15)
msgbox strDesc(i)
End If
loop
End Sub
When I incorporated this into your hta I still don't get the information in the hta.
-
@powaking
Forgive my ignorance, but when you talk about Vista PE, are you just talking about WinPE 2.0 (the version created with the latest WAIK that is a cut down/basic version of Windows Vista), or is this some new custom system, like Bart PE?
I guess you can say it is like BartPE. It uses either Vista source or WAIK to build a wim file. Here is the website for the VistaPE project: http://vistape.boot-land.net/eng/about.html
It does use the WinPE2.0 core with the addition of adding a shell and the ability to use 32bit tools.
@Geezery
I tried the WinPE.wim file from the WAIK booting via PXE on a machine and when I attempted to launch the hta file I was presented with a Open With dialog box. Sorry, haven't really played around with WinPE itself, been focused on the VistaPE project myself. Would like to get a gui working for wim files as this might be the choice we will be moving towards in our environment (currently using RDeploy for our imaging needs).
-
Nightman has made the following available: WSH, MDAC, HTA, WMI and XML. Although that plugin is in beta so I would have to say that it might not be fully supported. Everything else in your hta works it just doesn't list the images, description or lay the image down on the hard drive. The autoit tool does.
-
Well, I'm doing this from VistaPE (made with Winbuilder) I haven't done this scrictly in a WinPE environment. I did try the AutoIt gui and after modifying it a bit it did display the images and description and also layed the image down.
I haven't tried it with the wim file from the AIK, I'll give that a try and am using imagex 6.0.6000.16386
-
WinPE 2.0 GimageX COM based HTA
in Windows PE
What if you open up a VBS script window to display the progress rather right in the HTA itself would that work?? Or run it behind the HTA and have it put the output into a text file then have the HTA read the text file? Maybe name the text file what ever the percentage is and just have HTA refresh that directory showing the percentage (taken from the name of the text file)???? Just throwing some ideas out.