Sep 25, 2016 08:29 AM
(This post was last modified: Sep 25, 2016 02:40 PM by merso.)
hey guys
i usee this peace of code to rename and to melt my file to targeted directory.but dont work like i want to work.this code melt and create new file but dont start that newlly created exe as it should,olso it shows me error that cant acces to that new created exe.imagine two exe file first one is server1.exe second is server2.exe(this one is copyed and renamed).so after i execute server1.exe i get him in taskmanager,and after some time its melt and copyed in my temp folder like server2.exe.but that server2.exe is not running its popup error whitch i already mention earlyer.in taskmanager all the time was server1.exe running.so anyone could provide any tips.
thanks
Code
string MeltPath = Path.Combine(folder where you want to move, "new file name.exe");
File.Delete(MeltPath);
File.Move(ExecutablePath, MeltPath);
File.SetAttributes(MeltPath, FileAttributes.Hidden);
Process.Start(MeltPath);
Environment.Exit(0);i usee this peace of code to rename and to melt my file to targeted directory.but dont work like i want to work.this code melt and create new file but dont start that newlly created exe as it should,olso it shows me error that cant acces to that new created exe.imagine two exe file first one is server1.exe second is server2.exe(this one is copyed and renamed).so after i execute server1.exe i get him in taskmanager,and after some time its melt and copyed in my temp folder like server2.exe.but that server2.exe is not running its popup error whitch i already mention earlyer.in taskmanager all the time was server1.exe running.so anyone could provide any tips.
thanks



![[Image: PVoDiqS.png]](https://i.imgur.com/PVoDiqS.png)