Jump to content

Running an executable from user's appdata


Recommended Posts

Greetings, first let me say I love Au3 so far and look forward to learning as much as possible. At the time I am still a noob and need help with something I am sure is simple but out of my reach currently. I want to run an executable file located in the current user's appdata directory.

At the time, I have my program setup where if I click a button, it will run the desired executable file, but only if I use a direct path as noted below;

C:\Users\Anthony\AppData\Roaming\GameRanger\GameRanger\GameRanger.exe

What I need is to get it to detect the current user because more than likely... everyone's computer isn't named Anthony. :P

Link to comment
Share on other sites

16 minutes ago, TheDcoder said:

Hi Anthony, Is GameRanger a game?

Its a platform, like steam except without the varied content.

,-. .--. ________ .-. .-. ,---. ,-. .-. .-. .-.
|(| / /\ \ |\ /| |__ __||| | | || .-' | |/ / \ \_/ )/
(_) / /__\ \ |(\ / | )| | | `-' | | `-. | | / __ \ (_)
| | | __ | (_)\/ | (_) | | .-. | | .-' | | \ |__| ) (
| | | | |)| | \ / | | | | | |)| | `--. | |) \ | |
`-' |_| (_) | |\/| | `-' /( (_)/( __.' |((_)-' /(_|
'-' '-' (__) (__) (_) (__)

Link to comment
Share on other sites

5 hours ago, AnthonyBF2 said:

C:\Users\Anthony\AppData\Roaming\GameRanger\GameRanger\GameRanger.exe

What I need is to get it to detect the current user because more than likely... everyone's computer isn't named Anthony. :P

 @AppDataDir  will give you that, use as   @AppDataDir & "\GameRanger\GameRanger\GameRanger.exe" in your shortcut. You can find examples in the help file.

Follow the link to my code contribution ( and other things too ).
FAQ - Please Read Before Posting.
autoit_scripter_blue_userbar.png

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