Click here to Skip to main content
11,935,053 members (52,016 online)
Rate this:
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
aspnet_regiis -i 12-Dec-12 10:26am
I smell something fishy...Are you trying to write a virus ?
pablo ramos1 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 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 12-Dec-12 10:34am
think you for help, i will see
Killzone DeathMan 12-Dec-12 11:24am
thank for your help, i will see*
Krunal Rohit 12-Dec-12 22:08pm

If you're satisfied with the given answer, Accept the Solution :)
Killzone DeathMan 12-Dec-12 11:24am
5 stars Krunal
Krunal Rohit 12-Dec-12 21:49pm
Killzone DeathMan 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
Top Experts
Last 24hrsThis month

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