Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
JobID = 0
lcComputer = "."
loWMIService = GetObject("winmgmts:" ;
+ "{impersonationLevel=impersonate}!\\" + lcComputer + "\root\cimv2")
loNewJob = loWMIService.Get("Win32_ScheduledJob")
errJobCreated = loNewJob.Create("Notepad.exe", "********123000.000000-420", .t. , BITOR(1, 2, 4, 8, 16), , , JobID)
?errJobCreated
* SCHEDULED TASKS
LOCAL lcFile, lcTasks, lcLine as String
LOCAL lnFileHndl, lnSize as Integer
lcFile = "C:\Test.txt"
ii = 0
* Get a Listing of the scheduled tasks currently on the computer
* SCHTASKS /? From command prompt for Help
RUN SCHTASKS /Query /FO CSV /NH > &lcFile
* Read the File
IF FILE(lcFile)
lnFileHndl = FOPEN(lcFile, 10)
*Check for error opening file
IF lnFileHndl < 0 &&
* Error Opening File Ignore
ELSE
lnSize = FSEEK(lnFileHndl, 0, 2) && Move pointer to EOF
IF lnSize <= 0
* File is Empty Ignore
ELSE
FSEEK(lnFileHndl, 0, 0) && Move pointer to BOF
DO WHILE ! FEOF(lnFileHndl)
lcLine = ALLTRIM(FGETS(lnFileHndl))
ENDDO
ENDIF
IF (!FCLOSE(lnFileHndl))
* Error Closing File
ENDIF
ENDIF
ENDIF