8.11.1 EntryStartUp (register a script file for automatic startup)
- Purpose
-
Registers a script file for automatic startup.
- Syntax
EntryStartUp (FilePath, [MultiExec], [ExecType], [ExecTime], [ExecWeek], [ExecDay] [, TerminateTime])
- Arguments
-
- FilePath
-
Specify the full path of the script file as a character string, or as a variable that stores this value. The file extension .SPT is appended automatically if omitted.
- MultiExec
-
Specify whether the script file can be activated concurrently from multiple processes. Write True to allow multi-activation, or False to prohibit multi-activation.
This value is optional. If you omit this value, the value set in the execution environment file is assumed.
- ExecType
-
Specify the startup type as either of the following values:
Value
Meaning
Logon
Start the script at logon.
Service
Start the script as a service.
This value is optional. If you omit this value, the value set in the execution environment file is assumed.
- ExecTime
-
If required, specify a start time in hh:mm:ss format. Always write 00 in ss. Any other value will be switched to 00.
Omit this argument if you do not want to activate the script at a particular time.
- ExecWeek
-
If required, specify a day of the week to activate the script. Specify the day as a number or as a variable that stores this value.
The value is interpreted as follows:
Value
Meaning
1
Sunday
2
Monday
3
Tuesday
4
Wednesday
5
Thursday
6
Friday
7
Saturday
Omit this argument if you do not want to activate the script on a particular day of the week.
- ExecDay
-
If required, specify a date on which to activate the script. Specify the date as a number in the range 1 to 31, or as a variable that stores this value.
Omit this argument if you do not want to activate the script on a particular date.
The ExecDay value is ignored if you set ExecWeek.
- TerminateTime
-
Specify a time to terminate the script as a number or as a variable that stores this value. Specify a value in the range 0 to 1,440 (minutes).
This value is optional. If you omit this value, the value set in the execution environment file is assumed.
- Description
-
The EntryStartUp command registers a script file for automatic startup. The command returns True on successful execution, or False if an error occurs.
This command updates the contents of the execution environment file (.SPV) associated with the script file specified in FilePath. If no such file exists, a new execution environment file is created.
- Example
' Register for automatic startup only those script files ' in the D:\Work\Script folder that have an execution ' environment file. wkPath = "D:\Work\Script\" ' Get file names with extension .SPT in FileName. For FileName = wkPath + "*" + _SCF_EXT_ Do ' Concatenate the folder name and the file name, and set it ' in FileName. FileName = wkPath + FileName ' Change the file name extension to .SPV, and set the file ' names in the FilePath. FilePath = Left (FileName, Len(FileName) - 4)+ _SVF_EXT_ If IsExistFile (FilePath) = True Then EntryStartUp (FileName) End End For
- JP1/Script version
-
Supported from JP1/Script 05-10.