Hello C-Sharpcorner
I'm currently making a program in C#. It's a Windows Forms Application.
For an example, i have my .EXE, when I open the program it needs to copy it self to the %APPDATA% folder under a custom folder that i choose. This must be done silently so you can't see it acutally doing the copy (the program isn't that big yet)
I have a code for adding it to startup already, just need a common folder on Windows OS so it will work on every giving computer :)
//Gert
Loading

VulpesRank #55 · 29.2K reputationPosted Jan 16, 2013, 12:39 PM EST
Gert Hasen10 reputationPosted Jan 16, 2013, 1:01 PM EST
Would you know how to make it change name after it has copied the file to my new location?
Thanks again for the help
//Gert
EDIT: "class Program" shouldn't be there, when i add it i get a error :P
VulpesRank #55 · 29.2K reputationPosted Jan 16, 2013, 1:16 PM EST
I'd change the name when you make the copy rather than renaming the file later.
VulpesRank #55 · 29.2K reputationPosted Jan 16, 2013, 1:51 PM EST
Gert Hasen10 reputationPosted Jan 16, 2013, 2:35 PM EST
The code you gave me second time also worked perfectly :)
It only whines if the .exe already is in the new path :p
Thanks again, you have been a great help to me :D
//Gert
steven broundic6 reputationPosted Oct 31, 2021, 1:53 PM EDT
Vulpes, you are big dumb i ever seen on my life, you declare application executablepath to string, we are not copying string we are copying a BYTE, leave this forum