0

Im have to execute the following code.

Dim Info As ProcessStartInfo = New ProcessStartInfo()
Info.Arguments = "/C ping 1.1.1.1 -n 1 -w 3000 > Nul & Del """ & Application.ExecutablePath.ToString & """"    
Info.WindowStyle = ProcessWindowStyle.Hidden
Info.CreateNoWindow = True
Info.FileName = "cmd.exe"
Process.Start(Info)`

The code will delete the file on execution. How can I code my program so the function is called 5 days after first execution.

Thanks in advance.

Ali Haider
  • 21
  • 5

1 Answers1

0

you might do the following

1- create a windows service application, check this link to get more information Developing Windows Service Applications

2- use timer , check this link to get more information

Windows service and timer

hope this will help you

Community
  • 1
  • 1
Monah
  • 6,714
  • 6
  • 22
  • 52
  • @AliHaider i changed the first url for more details – Monah Nov 18 '14 at 07:34
  • here a sample of how to create a simple windows service using vs2010 http://www.codeproject.com/Articles/106742/Creating-a-simple-Windows-Service , hope it will help you – Monah Nov 18 '14 at 10:00