Jump to content

Recommended Posts

Posted

Hello All,

Simple question?

I'm trying to get Autoit Script to select (but not open) a folder in Windows Explorer

so that I can get to the folder's ACL security properties.

Any help is appreciated.

Thanx

Posted

Hi CyberSlug,

Thanks,

Your script works nicely but is somewhat too complex for my needs.

The script should not require any user interaction

It simply needs to open a predetermined folder in explorer and hi-light "select" a sub- folder

Say for example that I want the "C:\Documents and Settings" folder opened in explorer with the"Administrator" folder selected.

Posted

Run('explorer.exe /select, "C:\Documents and Settings\Administrator'"')

or

$path = "C:\Documents and Settings\Administrator\"

Run('explorer.exe /select, ' & """" & $path & """")

<{POST_SNAPBACK}>

Posted

The first of your 2 options

Run('explorer.exe /select, "C:\Documents and Settings\Administrator"')

works nicely in an .au3 file,

I would need to translate it to an AutoitX vbscript format.

doesn't seem to like the following:

Dim oShell

Dim oAutoIt

''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''

' Initialise Variables & Objects

''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''

Set oShell = WScript.CreateObject("WScript.Shell")

Set oAutoIt = WScript.CreateObject("AutoItX3.Control")

oShell.Run 'explorer.exe /select, "C:\Documents and Settings\Administrator"'1, FALSE

Posted

The first of your 2 options

Run('explorer.exe /select, "C:\Documents and Settings\Administrator"')

works nicely in an .au3 file,

I would need to translate it to an AutoitX vbscript format.

doesn't seem to like the following:

Dim oShell

Dim oAutoIt

''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''

' Initialise Variables & Objects

''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''

Set oShell = WScript.CreateObject("WScript.Shell")

Set oAutoIt = WScript.CreateObject("AutoItX3.Control")

'oops misssed a comma, but problem remains

'should be:

oShell.Run 'explorer.exe /select, "C:\Documents and Settings\Administrator"', 1, FALSE

<{POST_SNAPBACK}>

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
  • Recently Browsing   0 members

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