The code below is an exert of my program. It allows the user to easly schedule a copy using robocopy and shedule task manager. The problem is it is only working when you have the "Weekly" check box checked and not the others. I am not sure what to do as I am positive the code is right. How can I use shell command so that when it opens up the shell it will leave it up so that I can see exactly what is happening? I have it set up to put all the logs in a file but it is not even creating a log.
Code:Dim Often As String = String.Empty Select Case True Case Radiohourly.Checked : Often = "HOURLY" Case Radiodaily1.Checked : Often = "DAILY" Case RadioWeekly1.Checked : Often = "WEEKLY" Case Radiomonthly1.Checked : Often = "MONTHLY" End SelectCode:schedule = "SCHTASKS /Create /SC " & Often & " /D " & startday & " /RU Administrator /RP " & password & " /ST " & TextTime.Text & ":00" & " /TN " & """" & title & """" & " /TR " & """" & path & """" & " > " & """" & "C:\copypal\slogs\" & title2 Shell("cmd /c" & schedule, vbHide)




Reply With Quote