Jump to content
Sign in to follow this  
FlintBrenick

Open Explorer

Recommended Posts

FlintBrenick

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

Share this post


Link to post
Share on other sites
zackrspv

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ë 맧ëñ§ë øƒ !ïƒë.

Share this post


Link to post
Share on other sites
FlintBrenick

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

Share this post


Link to post
Share on other sites
TheDot

Wont:

ShellExecute(@MyDocumentsDir)$path = "c:\"ShellExecute($path)
Do the same thing? Not cutting you down, just askin :)

I tried both codes but ShellExecute seems to work way better :)

Share this post


Link to post
Share on other sites
sandpaper

Personnaly I use this way :

$Path = "C:\Documents and Settings"
Run("explorer /e, " & '"' & $Path & '"')

it work even there are space in $Path and windows is not installed in "c:\windows"

Share this post


Link to post
Share on other sites
Ascend4nt

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

Run("explorer.exe /n,/e,/select,C:\Windows\notepad.exe")
  • Like 1

Share this post


Link to post
Share on other sites
rajeshontheweb

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

Share this post


Link to post
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
Sign in to follow this  

×