Jump to content

Recommended Posts

Posted (edited)

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
Posted

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

Posted (edited)

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
  • 1 year later...
Posted

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 :)
Posted

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"

Posted

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

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

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

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