PDA

View Full Version : Application that run once,and Delete itself!



triperzonak
17th September 2008, 02:47
How can i create application that will run once and after that it will "delete itself" in windows OS?

im trying to use QFILE::remove() but its not working..

jpn
17th September 2008, 19:04
May I ask what do you intend to do?

Windows won't let you delete a file which is in use. The executable is in use while running the program. What you can do is to delete it from another process or mark it to be deleted upon next Windows startup.

maverick_pol
17th September 2008, 19:31
It sounds like you are working on a "intruder" application : )

good luck.

triperzonak
18th September 2008, 09:09
nope not intruder application..

Im creating a utility which is design to run once cause if it runs again it may cause problems, It is design to delete some data, to fixed problem on first run but on the second and so on it will be the cause of bigger problems..

my solution until this time is I created a "deleter" to delete the application after running..

wysota
18th September 2008, 09:39
How do you delete the deleter? :)

triperzonak
18th September 2008, 12:30
:) i dont.. i just put an argument password so that i can reuse it if i have to create other same type(run once) of utility..

cross platform is hard, in linux its ok but in windows its not.. hayzzz :D