AnthonyBF2

Running an executable from user's appdata

8 posts in this topic

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

Share this post


Link to post
Share on other sites



2 hours ago, AnthonyBF2 said:

GameRanger

Hi Anthony, Is GameRanger a game?


AutoIt.4.Life Clubrooms - Life is like a Donut (secret key)

Spoiler

My contributions to the AutoIt Community

Some messages & Apologizes:

If I hurt you, Please accept my apologies, I never (regardless of the situation) mean to hurt anybody!!!

Also, I am very busy with my project so I will appear in the last row of the online list, if you want to contact me: Email@TheDcoder.xyz

Or you can have a nice chat with me in freenode, I use the same nick on freenode too!

3fHNZJ.gif

PLEASE JOIN ##AutoIt AND HELP THE IRC AUTOIT COMMUNITY!

Share this post


Link to post
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.

1 person likes this

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

Share this post


Link to post
Share on other sites

Oh, ok... was wondering if it would break the "Game automation" rule.


AutoIt.4.Life Clubrooms - Life is like a Donut (secret key)

Spoiler

My contributions to the AutoIt Community

Some messages & Apologizes:

If I hurt you, Please accept my apologies, I never (regardless of the situation) mean to hurt anybody!!!

Also, I am very busy with my project so I will appear in the last row of the online list, if you want to contact me: Email@TheDcoder.xyz

Or you can have a nice chat with me in freenode, I use the same nick on freenode too!

3fHNZJ.gif

PLEASE JOIN ##AutoIt AND HELP THE IRC AUTOIT COMMUNITY!

Share this post


Link to post
Share on other sites
4 hours ago, argumentum said:

click on this @AppDataDir. :) 

I am just trying to make a shortcut application that has buttons that leads to different things like Skype, Steam, etc. I never liked pinning shortcuts all over my desktop or toolbars.

Share this post


Link to post
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.

1 person likes this

Share this post


Link to post
Share on other sites
22 hours ago, argumentum said:

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

Thank you very much! It works well.

1 person likes this

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