Jump to content

Wim imaging HTML application


Recommended Posts

Posted

Hi,

I've got a drive imaging app for .wim files all working in HTA using SmartWim, but when I use it in Windows PE the Microsoft Common Dialog control (comdlg32.ocx) to browse for files doesn't work.

code snippet:

<object id="objSmartWim" style="display:none" classid="CLSID:14B92924-451C-4C17-A65A-9FEC9E2547DA" viewastext="true"></object>

<script language="vbscript">

Dim ReturnCode

' Common dialog constants

Const OFN_OVERWRITEPROMPT = &H2

Const OFN_HIDEREADONLY = &H4

Const OFN_NOCHANGEDIR = &H8

Const OFN_PATHMUSTEXIST = &H800

objSmartWim.File = OpenFile()

objSmartWim.Path = "C:\test"

objSmartWim.Image = "image1"

ReturnCode = objSmartWim.CaptureImage(True)

Function OpenFile()

Dim objComDlg

Set objComDlg = CreateObject("MSComDlg.CommonDialog")

With objComDlg

.DialogTitle = "Open"

.Filter = "Windows image (.wim) files|*.wim"

.MaxFileSize = 255

.Flags = .Flags Or OFN_HIDEREADONLY Or OFN_PATHMUSTEXIST Or OFN_NOCHANGEDIR

.ShowOpen

If (.FileName <> "") Then

OpenFile = .FileName

End If

End With

Set objComDlg = Nothing

End Sub

I think it has to do with licensing, but not sure. Does anyone know how to get comdlg32.ocx to work in PE?

Thanks!


Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
  • Recently Browsing   0 members

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