noonand Posted December 1, 2006 Posted December 1, 2006 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 constantsConst OFN_OVERWRITEPROMPT = &H2Const OFN_HIDEREADONLY = &H4Const OFN_NOCHANGEDIR = &H8Const OFN_PATHMUSTEXIST = &H800objSmartWim.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 = NothingEnd SubI think it has to do with licensing, but not sure. Does anyone know how to get comdlg32.ocx to work in PE?Thanks!
IcemanND Posted December 2, 2006 Posted December 2, 2006 did you register comdlg32.ocx before running your app?regsvr32 comdlg32.ocx
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