1

I am writing a small app to automatically connect my PC to the internet at a certain time and I am using rasdial.exe for it...

Private Sub SetIt_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SetIt.Click
    Dim windir As String = Environment.GetEnvironmentVariable("WINDIR")
    Shell(windir & "\system32\rasdial.exe", AppWinStyle.NormalNoFocus)
End Sub

My question is how to make the shell function run at a specified time or after a certain interval??

Also how to wake up my PC from hibernation using vb and winresume.exe

1 Answers1

2

Create a console application to do the work necessary, and then use a Windows Scheduled Task to do the scheduling work for you. My answer here shows how to accomplish the scheduling.

Community
  • 1
  • 1
Kyle Rosendo
  • 25,001
  • 7
  • 80
  • 118
  • and how to delete the task if the app is closed... (all the time the app will be running in the background) –  Mar 25 '10 at 06:38