Jump to content

Open Explorer


Recommended Posts

Hey, I'm sure other ppl know how to do this but I've seen some questions so here is the code:

;Method #1
$Path = "C:\Documents and Settings"
Run("C:\WINDOWS\EXPLORER.EXE /n,/e," & $Path)

;Method #2
;Run("C:\WINDOWS\EXPLORER.EXE /n,/e,C:\Documents and Settings")

Exit

When you use the command Run("C:\WINDOWS\EXPLORER.EXE /n,/e,C:\Documents and Settings") it will open the folder "Documents and Settings" in Window's Explorer.

~Flint Brenick~

Edited by FlintBrenick
Link to comment
Share on other sites

Hey, I'm sure other ppl know how to do this but I've seen some questions so here is the code:

;Method #1
$Path = "C:\Documents and Settings"
Run("C:\WINDOWS\EXPLORER.EXE /n,/e," & $Path)

;Method #2
;Run("C:\WINDOWS\EXPLORER.EXE /n,/e,C:\Documents and Settings")

Exit

When you use the command Run("C:\WINDOWS\EXPLORER.EXE /n,/e,C:\Documents and Settings") it will open the folder "Documents and Settings" in Window's Explorer.

~Flint Brenick~

Wont:

ShellExecute(@MyDocumentsDir)
$path = "c:\"
ShellExecute($path)

Do the same thing? Not cutting you down, just askin :)

-_-------__--_-_-____---_-_--_-__-__-_ ^^€ñ†®øÞÿ ë×阮§ wï†høµ† ƒë@®, wï†høµ† †ïmë, @ñd wï†høµ† @ †ïmïdï†ÿ ƒø® !ïƒë. €×阮 ñø†, bµ† ïñ§†ë@d wï†hïñ, ñ@ÿ, †h®øµghøµ† †hë 맧ëñ§ë øƒ !ïƒë.

Link to comment
Share on other sites

Wont:

ShellExecute(@MyDocumentsDir)
$path = "c:\"
ShellExecute($path)

Do the same thing? Not cutting you down, just askin :)

Really? It works fine for me (Note: Using Windows XP Home SP2).

Thanks for the alternate code though!

~Flint Brenick~

Edited by FlintBrenick
Link to comment
Share on other sites

  • 1 year later...

Even better, select the file or folder you want. Example:

Run("explorer.exe /n,/e,/select,C:\Windows\notepad.exe")
Link to comment
Share on other sites

there is one occassion the shellexecute($path) can fail (or atleast i feel so)

its at times when folder filetype association is tampered by viruses. i have seen cases when u try to double click on folders (of any kind) u are unable to open them as long as the infection remains. i have had to use

start>run>explorer.exe /e
in those cases
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...