Click here to Skip to main content
11,412,834 members (74,813 online)
Rate this: bad
good
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 5:14am
Edited 12-Dec-12 5:16am
v2
Comments
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
good
Please Sign up or sign in to vote.

Solution 1

http://www.tek-tips.com/viewthread.cfm?qid=1066088[^]
or else
application.executablepath will give you the path of the application and on start up of it, you can use file.copy method...
  Permalink  
v2
Comments
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
   
thanks
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 OriginalGriff 399
1 Sascha Lefévre 200
2 Maciej Los 180
3 ProgramFOX 130
4 Sergey Alexandrovich Kryukov 110
0 Sergey Alexandrovich Kryukov 9,025
1 OriginalGriff 7,317
2 Maciej Los 3,570
3 Abhinav S 3,298
4 Peter Leow 3,084


Advertise | Privacy | Mobile
Web03 | 2.8.150427.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