Click here to Skip to main content
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 304
1 Sergey Alexandrovich Kryukov 295
2 Shweta N Mishra 216
3 Maciej Los 210
4 PIEBALDconsult 184
0 OriginalGriff 7,630
1 Sergey Alexandrovich Kryukov 7,022
2 DamithSL 5,586
3 Manas Bhardwaj 4,946
4 Maciej Los 4,525


Advertise | Privacy | Mobile
Web01 | 2.8.1411023.1 | Last Updated 12 Dec 2012
Copyright © CodeProject, 1999-2014
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