I am trying to run a simple program that copies an executable file from my "E:\" drive to my "C:\" drive, and then run that executable.
I have no experience with batch. Seriously. I come from a python and C++ background, but I wanted to experiment with batch. Here is my code:
Code: Select all
xcopy /s E:\test.exe C:\
start "C:\test.exe
When I start the batch file, I get a black command prompt that starts for a few seconds, with a line that says
Code: Select all
Access denied
I run as administrator, and it copies.
There are two problems here:
1) I want this to work without having to run as administrator
2) I want the executable to not only copy the file to C:\, but I also want it to run automatically
Thank you. If you need ANY more information, just ask.
Thank you,
Ignacio Cabero