Jump to content

Open A Folder Using A Variable?


Recommended Posts

How do I run a folder, using a variable e.g

Opt("ExpandEnvStrings", 1)

$var2 = "notepad.exe"
run($var2)

$var1 = "%appdata%"
run($var1)

$var3 = "c:\"
run($var3)

I've tried the _rundos, and the run(@comspec, but i think they were totally off

this itself

$var2 = "notepad.exe"
run($var2)
works without a hitch but folders are another thing.. :)
Link to comment
Share on other sites

"explorer.exe " and NOT "explorer.exe" ( you forgot the space! :) )

Opt("ExpandEnvStrings", 1)

$var2 = "notepad.exe"
run($var2)

$var1 = "%appdata%"
run("explorer.exe " & $var1)

$var2 = "c:\"
run("explorer.exe " & $var2)
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...