Click here to Skip to main content
11,706,979 members (59,576 online)
Rate this: bad
Please Sign up or sign in to vote.
See more: C#2.0 C#3.0 C# C#4.0
Hi friends,

I want to know how can a program copy it self

pablo italy

Think you

change: himself to itself - Krunal
Posted 12-Dec-12 4:14am
Edited 12-Dec-12 4:16am
aspnet_regiis -i at 12-Dec-12 10:26am
I smell something fishy...Are you trying to write a virus ?
pablo ramos1 at 12-Dec-12 10:34am
hi aspnet_regiis-i , no i'm not trying to write a virus, i'm developing in network
sorry because i'm bad in english
Killzone DeathMan at 12-Dec-12 11:17am
Just copy the executable file to the startup folder, and everytime the computer starts, the program will be execute by itself!
I mean copy the executable but dinamically per code!

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1[^]
or else
application.executablepath will give you the path of the application and on start up of it, you can use file.copy method...
pablo ramos1 at 12-Dec-12 10:34am
think you for help, i will see
Killzone DeathMan at 12-Dec-12 11:24am
thank for your help, i will see*
Krunal Rohit at 12-Dec-12 22:08pm

If you're satisfied with the given answer, Accept the Solution :)
Killzone DeathMan at 12-Dec-12 11:24am
5 stars Krunal
Krunal Rohit at 12-Dec-12 21:49pm
Killzone DeathMan at 13-Dec-12 4:35am
Thanks??? 5€ !!!
Just a joke :P

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 Sergey Alexandrovich Kryukov 165
1 OriginalGriff 125
2 chainerlt 110
3 ppolymorphe 89
4 Mika Wendelius 70
0 OriginalGriff 9,178
1 Sergey Alexandrovich Kryukov 8,512
2 CPallini 5,189
3 Maciej Los 4,766
4 Mika Wendelius 3,696

Advertise | Privacy | Mobile
Web02 | 2.8.150819.1 | Last Updated 12 Dec 2012
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100