Automated Copy and Run Script
Posted: 30 Jul 2016 18:33
Hi, my name is Ignacio Cabero.
I am new to batch programming.
I want to create a program that copies an executable, pastes it in the users c:\ drive, and then executes it.
Some information: I plan on distributing this to my friends via the internet. They visit mediafire and download my file, which contains the executable and the batch file. I know it sounds a little overly complex, but I have my reasons. I don't always know exactly where the file they download will be (it could be in their Desktop, Documents, Downloads, etc.), and I also don't know their PC's username. I tried using c:\Users\$USERNAME$ with no results.
Now, I would use but I find that I need the exact path to the folder where the batch file is, which I don't always know, as I plan on distributing this software to my friends. So I was basically wondering if there was any way where I could copy the executable file (that is in the same file as my batch file) by using the current directory, regardless of what that may be.
I know it sounds confusing, and the closest thing I could think of is like in Linux when you type for examplethe "."(period) signifies the current directory, that way you don't have to type the entire path. Don't know if that helps.
Anyways, if you have ANY questions, ask them. I promise I will answer all of them with as much detail as I can.
I am new to batch programming.
I want to create a program that copies an executable, pastes it in the users c:\ drive, and then executes it.
Some information: I plan on distributing this to my friends via the internet. They visit mediafire and download my file, which contains the executable and the batch file. I know it sounds a little overly complex, but I have my reasons. I don't always know exactly where the file they download will be (it could be in their Desktop, Documents, Downloads, etc.), and I also don't know their PC's username. I tried using c:\Users\$USERNAME$ with no results.
Now, I would use
Code: Select all
xcopy /s ...
I know it sounds confusing, and the closest thing I could think of is like in Linux when you type for example
Code: Select all
./program.py
Anyways, if you have ANY questions, ask them. I promise I will answer all of them with as much detail as I can.