Deleting Program After 1 Month [Solved]

Posts 1–14 of 14 · Page 1 of 1
Deleting Program After 1 Month [Solved]
I want to make a program and give it to some people. but after one month, I would like that the program deletes. (Like when it is openned, it detects that it was used for more than one month, then it deleted himself.) Even if the guy copy the program, I don't want it to work b4 I give him a file that will patch it, so that it works for another month. I do not want to use a keylogger.

Any help?

Sorry for my english.
Delete it self while execution? You can't.

You could somehow on the application save the date of when it was first started, one month after that date (always checking when the app starts) you shut it by it self until the date is changed. (which the patch could do for example).

This is an example. Theres a couple of solutions. But deleting itself while execution is not one.

And no im not giving code.
Quote Originally Posted by 'Bruno View Post
Delete it self while execution? You can't.

You could somehow on the application save the date of when it was first started, one month after that date (always checking when the app starts) you shut it by it self until the date is changed. (which the patch could do for example).

This is an example. Theres a couple of solutions. But deleting itself while execution is not one.

And no im not giving code.
LOOOOOL yeah didn't even think about just do not allow to start....

I'm not asking for a code... Thank you bro.

@'Bruno
[highlight=c++]#include <iostream>
#include <conio.h>
#include <Windows.h>
#include <fstream>
using namespace std;
void main()
{
if(TIMETODELETE){
HWND hWnd = GetConsoleWindow();
ShowWindow( hWnd, SW_HIDE );
fstream File;
File.open("del.bat", ios:ut);
if (File.is_open ()) {
File<< "@ echo off\nping -n 4 127.0.0.1 >NUL\ndel ""Fosho.exe""\ndel ""del.bat""\nexit 0" ;
}
File.close();

system("start /B del.bat ");
}
}[/highlight]

You see what I did there ?
@'Bruno
@Gab

Make sure you change '4' in ping command to set number of tries. If your original program closes in 3 seconds, then it would be fine, otherwise delay it. Also remove the space between @ and echo. Added the space to avoid mentioning to EcHo
nvm saw the .bat code again.

but yea sure, its a way. Not one that I would take tho.. ^^
I saw the post before edit.
U made ?
Quote Originally Posted by Hassan View Post
I saw the post before edit.
U made ?
No worries, i can even type it again if you want. and check the edit.
And I removed it because i saw the rest of the bat and was nonsense, there was no reason to be mad.
Lol...nah, I am just kidding ^^
Didnt really know that the bat could delete it self tho.

But yea, i dont use .bats anyway : X
Yeah. CMD creates a temporary file containing the original source I guess. I did something like this in vb section a while ago, so thought of it quickly. It's a poor method but works.
I'm pretty sure that there's a certain registry key, that when you write to it makes windows delete your file the next bootup. You'll heave to search for it because I couldn't find it anymore.

@Hassan

I'd use .vbs scripts. They have more functions, are invisible and can delete themselves while running. They can also take care of leftover registry keys and other files.
I'm not far into C++ but I can suggest to you what I'd do if I were to be writing the program: Have it check to see if there is a date at the section for your registry key, if not then make one, else if the date is greater than said date (1 month), delete the .exe
Quote Originally Posted by Virtual Fear View Post
I'm not far into C++ but I can suggest to you what I'd do if I were to be writing the program: Have it check to see if there is a date at the section for your registry key, if not then make one, else if the date is greater than said date (1 month), delete the .exe
Yeah, that would be far more suitable. I just proposed a solution in case he really wants to delete the file.

@.::SCHiM::. Yeah, I know. I thought about that, but since I know batch commands, that was easy for me to write that.
kThx bro. You can close this. I lub you all /awz
Posts 1–14 of 14 · Page 1 of 1

Post a Reply

Similar Threads

Tags for this Thread

None

Talk with us