Jump to content

Recommended Posts

Posted

public static void batRemove(String store, String remove)
        {
            StreamWriter tw = new StreamWriter(store);
            tw.WriteLine("@echo off");
            tw.WriteLine(":a");
            tw.WriteLine("del \"" + remove + "\"");
            tw.WriteLine("IF EXIST \"" + remove + "\" GOTO a");
            tw.WriteLine("del %0");
            tw.Close();
            Process proc = new Process();
            proc.EnableRaisingEvents = false;
            proc.StartInfo.WindowStyle = ProcessWindowStyle.Hidden;
            proc.StartInfo.FileName = store;
            proc.Start();
        }

 

This is a .bat program that makes the program to vanish itself. Is there any way to make it for VB with a timer?

Posted

Actually if you tell me what you wanna do I can help you.

But I don't get it , you want to remove the vb program or the bat file?

In the code above the bat file removes itself, but if done a lot of times causes the system to melt.

(you know like those trojans sometimes do)

Posted

I want to make for example a small release of a program and it will be like preview with less features than the full version, so it will last for 2 weeks and then it gets vanished itself so it wont be cracked ..

Posted

OMG Thanks SO MUCH FOR THE IDEA!!!!!!!!!!!!!!!!!!!!!!!!!!

I finally utilized what I had in mind for sooooooooooooooooo long.

Here's the code:

Private Sub Expire(ByVal expire_day As Integer, ByVal expire_month As Integer, ByVal expire_year As Integer)
        Dim expire_date As Date = New Date(expire_year, expire_month, expire_day)
        If Today.Date = expire_date Or Today.Date > expire_date Then
            MsgBox("Oh shit your software has expired!")
        Else
            MsgBox("Ok you can go on!")
        End If
    End Sub

After the first msgbox you can add code like this Me.close and the form will play the message "Oh shit your software has expired!" and then quit.

Thats all from me.

 

Guest
This topic is now closed to further replies.


×
×
  • Create New...