![]() |
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
![]() |

|
| Microsoft Windows xp error all errors and bugs related to Microsoft winxp error |
![]() |
|
Scheduled task?
|
LinkBack | Thread Tools | Display Modes |
|
|
#1 (permalink) |
|
Administrator
Posts: 18,702
Join Date: Jan 2006
Rep Power: 10
IM:
|
We want Powerpoint presentation to start running automatically on a Windows XP PC, but it has to start according to a certain schedule. The schedule is in txt format, but this schedule changes continually (daily). Also, the schedule may say 8:00 but we need the presentation to always start 15 minutes earlier than the time displayed in the schedule. Can somebody give me tips on how to achieve this? |
|
|
|
|
|
|
|
|
#2 (permalink) |
|
Administrator
Posts: 18,702
Join Date: Jan 2006
Rep Power: 10
IM:
|
Dim objFSO: Set objFSO = CreateObject("Scripting.FileSystemObject") Dim objShell: Set objShell = CreateObject("wscript.Shell") Dim objFile: Set objFile = objFSO.OpenTextFile("C:\schedule.txt") Dim objOutput: Set objOutpu=objFSO.CreateTextFile("C:\SchedResults.tx t") x = 0 Do While Not objFile.AtEndOfStream x = x + 1 strTime = objFile.ReadLine strNewTime = FormatDateTime(DateAdd("n", -15, strTime), 4) & ":00" strPresentation = "C:\Path to File\present.ppt" strTask = "powerpnt /s " & strPresentation objOutput.WriteLine "schtasks /create /ru system /sc once /st " & strNewTime & " /tn Present" & x & " /tr " & Chr(34) & strTask & Chr(34) objShell.Run "schtasks /create /ru USERNAME /rp PASSWORD /sc once /st " & strNewTime & " /tn Present" & x & " /tr " & Chr(34) & strTask & Chr(34) Loop objFile.Close objOutput.Close Set objFile=Nothing Set objShell=Nothing Set objFSO=Nothing |
|
|
|
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|