Jump to content











Photo
- - - - -

Win7PE_SE - Autoit - FileOpenDialog - filter not working properly


  • Please log in to reply
5 replies to this topic

#1 Drgnfyre

Drgnfyre
  • Members
  • 4 posts
  •  
    United States

Posted 27 May 2011 - 08:13 PM

Just downloaded Win7PE SE the other day. Trying to get an AutoiT function to work properly under Windows PE 3.1 (Windows 7 Enterprise as source).

I have a small AutoIT script - it asks the user to pick a *.TBI file for restoration to the machine (please don't ask why I'm not using imagex/WIM)..

Anyway - AutoIT line is..


$message="Please Select File to Restore"

  $Restore_File2 = FileOpenDialog($message, "G:\", "Image for Windows Backup Files (*.tbi)", 3)


The problem is - under WinPE 3.1 / Win7PE_SE - the File dialog box comes up okay, but it does not filter out the appropriate files - it just lists every file in the directory.
(I had tried this previously just building a winpe from the windows 7 waik, and came up with the same results).

Did some digging out on the AutoIT forums - some people had run across this, and came to the conclusion it was due to Explorer libraries not being loaded (or Internet explorer libraries..)

So - I figure - hey, this win7pe_se thing has internet explorer, AND explorer built into it.. that might work.


So - I have gotten this to work properly ONE Time. I have no idea what I did different between the build that worked and the build that didn't. (Have been having some trouble getting it to behave exactly how I wanted it).

Options I've got turned on / enabled. (things I can think of that are different than the standard build)

Build in ram.
boot manager - standard

had turned on 'use your extracted wim folders' at one point - but that made things blow up, so disabled that.
Using Windows 7 Enterprise x86 as source. (DVD extracted to a folder)
cddrive - run all programs from ram (This is primarily a restoration boot drive - but would like to have windows explorer and such handy for troubleshooting a machine, etc)

shell - explorer shell - disabled PE start menu (but have tried with it enabled)

components - additional files, calc, hwpnp, ie 8, ie flash, (have tried it without flash, and without IE), mmc, msi, paint, photoviewer, wordpad,notepad,penetwork,remotedesktop,ms visual c++
tweaks, default wallpaper, bginfo, classic shell (again, tried without it - doesnt seem to matter), clearlock, context menu, reboot and shutdown, shutdownpe-disabled (tried with it enabled, no difference)
apps - defaults.

drivers - usb, virtual pc, vmware, driver integration - integrating lan packs from driverpacks.net, and a winpe cab file supplied by dell for 90% of their network drivers.

finalize - standard items, i think. tried adding a Pin item, but didn't have any luck. Am using a modified autorun.cmd (put into additional files) to launch a batch file that waits for the network to become available, then maps a drive based on your IP. This also copies a link to the desktop, then runs the autoit script.

autoit script asks what file to restore, then launches Image for Windows with the appropriate command and passes it the filename, etc.



Now - if I hadn't seen this work, I'd just give up on having it behave.

But I hope I'm just missing something simple here.



Thinking about it - having typed it all out.. :)

I did have some confusion on the whole autorun thing. It was extremely unclear to me as to what to edit to get my programs / batch file to run correctly. Mucking around a bit, I found that if I just made my own autorun.cmd and put it in additional files / windows / system32 / autorun.cmd - this seemed to have the desired effect. But since it's my own, did I break something?

Is there a better way to have the win7pese call my own custom batch file? I saw mentions of adding it to the registry, etc - but I don't see an easy place to do that in the winbuilder structure. / win7pese project.

Any advice you can provide would be appreciated.

#2 sbaeder

sbaeder

    Gold Member

  • .script developer
  • 1338 posts
  • Location:usa - massachusettes
  •  
    United States

Posted 28 May 2011 - 03:23 PM

Options I've got turned on / enabled. (things I can think of that are different than the standard build)

What about the "standard" vs. "full" setting in the 1-copy files script?

#3 Drgnfyre

Drgnfyre
  • Members
  • 4 posts
  •  
    United States

Posted 28 May 2011 - 04:26 PM

Its set to standard. What does this option actually do?

#4 Drgnfyre

Drgnfyre
  • Members
  • 4 posts
  •  
    United States

Posted 28 May 2011 - 11:22 PM

I changed it to "full" file copy - did not seem to make a difference.

For kicks, I started over - took the default settings, pointed to my source, rebuilt - still doesn't filter out the inaccurate files correctly.

Strange, because I know it worked - once.. I don't know what's different in my options from now vs when it worked the one time.

Oh well - if my users can't select the right file, it just closes out - maybe I'll have it verify the file extension before calling my image restore program. (Only reason it's even an issue is the backup program splits the image up for me - so there are about 4-6 files for each image)

#5 MedEvil

MedEvil

    Platinum Member

  • .script developer
  • 7771 posts

Posted 29 May 2011 - 12:05 AM

Find out which dll your script calls to get the dialog. Then take some dependency checking tool, like dependency walker, and look inside the dll for what other dll it requires for proper operation.
Add all those and the dialog should start working fine.

:dubbio:

#6 gbrao

gbrao

    Frequent Member

  • Advanced user
  • 474 posts
  •  
    India

Posted 26 June 2020 - 06:52 AM

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.






2 user(s) are reading this topic

0 members, 2 guests, 0 anonymous users