5
Answers

C# Copy .EXE to %APPDATA%

Gert Hasen

Gert Hasen

12y
5.6k
1
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
Answers (5)
0
Fadi Yoosuf

Fadi Yoosuf

NA 5 0 16y
Wov......thanks alot..... I will try that way...
0
Bechir Bejaoui

Bechir Bejaoui

NA 20.1k 5.3m 16y

you can use GetOwner method of the Win32_Process witch is the WMI SDK to get any process owner