Sign in to follow this  
Followers 0
ravaged1

windows username for file name (help)

3 posts in this topic

I'm trying to create a script that will download users databases that are named example: something_username.dbs

I only want to download the file for that user when they run the script.

downloading antrenamer just as a test below to see if I could save file with the users name in it.

What am I missing?

$User = @UserName

Local $hDownload = InetGet("http://update.antp.be/renamer/antrenamer2_install.exe", @HomeDrive & "\$User_antrenamer2_install.exe", 1, 1)
Do
    Sleep(250)
Until InetGetInfo($hDownload, 2)    ; Check if the download is complete.
Local $nBytes = InetGetInfo($hDownload, 0)
InetClose($hDownload)   ; Close the handle to release resourcs.
MsgBox(0, "", "Bytes read: " & $nBytes)

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

get $user out of the quotes

@HomeDrive & "\" & $User & "_antrenamer2_install.exe"
Edited by iamtheky

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

Share this post


Link to post
Share on other sites

get $user out of the quotes

Knew it was something simple.

Thanks, This forum is always so help full. :x

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  
Followers 0