Jump to content

Open Windows Explorer with specific columns


Recommended Posts

Hi all,

I am wondering if it is possible to run a windows explorer with a specific path, using specific columns (like Comments, owner etc.)

I am using ShellExecute to open Windows Explorer. I guess it is better than using Run (but I don't know why...)

Paris

Link to comment
Share on other sites

  • 2 weeks later...

I'd almost give anything just to get Windows Explorer to open the same way everytime - you know, you make changes to the columns, select different columns, make the window a little bigger. Close it down. Then open windows explorer again and shazaam... all gone to poo. I've tried the 'Remember setting', the 'Make windows the same' etc - all no good.

Have you guys seen a fix for this in any of the forums?

Sorry Paris, for not having anything helpful.

Regards,Andy (no, the other one)

Link to comment
Share on other sites

  • 1 year later...

Been over a year and I am still working on this.

Opt("WinTitleMatchMode", 4)
Opt("MustDeclareVars", 1)
Opt("ExpandEnvStrings", 1)

local $winpid = 0
local $handle
local $open_dir = ""
local $x = 0
local $y = 0
local $w = 0
local $h = 0

$open_dir = "c:\"

; Now launch Windows Explorer...
$winpid = Run("Explorer.exe /e, " & $open_dir, "", @SW_SHOW)

; Get the handle of that window so it can be used in rezise...
if @OSVersion = "WIN_XP" or @OSVersion = "WIN_2000" Then
  if WinWait("Classname=ExploreWClass", "", 45) = 0 then Exit
  $handle = WinGetHandle("Classname=CabinetWClass", "")
else
  if WinWait("Classname=CabinetWClass", "", 45) = 0 then Exit
  $handle = WinGetHandle("Classname=CabinetWClass", "")
endif

; Determine position and size...
if @DesktopWidth > 1600 then
  $x = 250
  $y = 80
  $w = 1200
  $h = 900
else
  $x = 100
  $y = 50
  $w = @DesktopWidth - ($x*2)
  $h = @DesktopHeight - ($y*2)
endif

; Move and resize...
WinMove($handle, $open_dir, $x, $y, $w, $h)

Can now open Windows Explorer and make it the size I want.

I would greatly appreciate any help on commands to set the View to Details

and to unset Grouping (in Vista) if it happens to apply ITSELF again.

Also if anyone can shed light on set the column sizes that would be an incredible.

Thanks in advance.

Any help with Windows 7 would also be appreciated...

Edited by Andy007

Regards,Andy (no, the other one)

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