Jump to content

FileOpenDialog - Windows PE 3.1 - Filter Problems


Recommended Posts

I wrote a small gui a while back to help do restores at my workplace. I have an autoit script that asks the user to select the appropriate file and then it launches our restore program.

I'm trying to use this now in WinPE 3.1, and the filter option seems to be ignored.

The relevant lines I'm using are..

Func RestoreButton2()
  $message="Please Select File to Restore"
  $Restore_File2 = FileOpenDialog($message, "X:\", "Image for Windows Backup Files (*.tbi)", 3)
  if not @error then 
    Run (@ComSpec & " /c " & 'x:\programs\ifwv2\imagew.exe /r /uy /d:w0 /f:"'&$Restore_File2 &'" /a /x /ubi /o /log:0',"X:\programs\ifwv2")
  Exit
  EndIf
EndFunc

Using AutoIT 3.3.6.1

When I run the program, it brings up the file dialog box just fine, but it doesn't filter out any files - it shows every file in the directory.

Have tried this with WinPE 3.0 (Windows 7 WAIK Based), WinPE 3.1 (Windows 7 SP1 WAIK based).

If I run the script in Windows 7, it's just fine, so it's something with the WinPE Environment.

I swear I found a thread about this last week, but now I cannot seem to locate it.

I also tried the Win7PE_SE / winbuilder method - thinking that with Windows Explorer and Internet Explorer built into the build, it might work.

I did get it to work once - but now I cannot get it to work again (Had to rebuild the project). I'm asking in the Win7PE_SE forums as well, but thought someone here might have stumbled across what magic Registry / DLL settings I need in the PE environment to get this to work. (This had been working fine previously in a BartPE / Windows XP PE Environment)

Failing getting the filter to work properly, what would be the line(s) I'd need to have it only accept a file selection ending in .tbi?

Any assistance would be appreciated.

Thanks.

Edited by DrgnFyre
Link to comment
Share on other sites

  • 9 years later...

Ok, I know this is a very old thread.

Adding this because it may be useful to others. Here's what I found:

With a 64-bit Windows (modded/lited) or a 64-bit Windows PE :

- FileOpenDialog filters work ok with a 64-bit compiled AutoIt script (exe), but

- FileOpenDialog filters do not work ok with a 32-bit compiled AutoIt script (exe).

This seems to depend on whether "Windows Search" has been removed from Windows or the Windows PE.

So, if a working FileOpenDialog filter is what you want, retain "Windows Search".

It may be just one dll or reg entry, I'm too lazy to dig any further.

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
 Share

  • Recently Browsing   0 members

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