Jump to content

WinPE 3 & HTA - OpenFileDialog Usage


keithc

Recommended Posts

i have a .HTA app - based on the one availible here, and all works well (in windows).

however, when i run this in winPE the dialog presents itself as blank.

Does anyone know a method for presenting a proper open file dialog via HTA in WinPE

currently im using the following to load the dialog (which works in windows) - ive tried a variety of other methods that all result in the dialog being drawn as blank.

'****************************************************************************

'* TEST DIALOG

'*

'****************************************************************************

Function selectFile()

Dim Result

Dim IE : Set IE = CreateObject("InternetExplorer.Application")

With IE

.Visible = False

.Navigate("about:blank")

Do Until .ReadyState = 4 : Loop

With .Document

.Write "<html><body><input id='f' type='file'></body></html>"

With .All.f

.Focus

.Click

Result = .Value

End With

End With

.Quit

End With

Set IE = Nothing

Dim ChooseFile

ChooseFile = Result

Dim isWim

isWim = InStr((UCase(ChooseFile)), ".WIM")

if isWim <> 0 Then

wimfilename.value = ChooseFile

checkWim()

else

msgbox("error - wim not selected")

end if

'MsgBox ChooseFile()

End Function

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...