|
Previous Top Next |
Prototype: | (String pCommandLine, Long pWait=0, <String pVerb>, <String pParameters>),IT_HANDLE,PROC |
pCommandline | Path and name of file to execute. If the path is a long path (i.e. including spaces and long filename) we advise that you use double quotes around the command line. |
pWait | True or false to indicate if the method should wait for the program to finish. If this parameter is false the method returns a handle to the started process. Default value is false (0) |
pVerb | The verb to use, such as IT_SE_Open, IT_SE_Print, IT_SE_Explore |
pParameters | Optional parameters to pass to the executed program. If a parameter contains a long filename or path we advise that you use double quotes around that parameter value. |
Returns | Returns the handle to the process if pWait is false. If pWait is true it returns the exit code from the called process or if no exit code was received it returns the return value from WaitForSingleObject API. |
This method is very similar to the ITRun, except this method is more geared toward running files rather than programs. It does not have an option to elevate or set the folder path, but it allows you to set the verb to use instead.
Available verbs are defined in the ITWin32Equates.inc file:
IT_SE_Open EQUATE('open')
IT_SE_Print EQUATE('print')
IT_SE_PrintTo EQUATE('printto')
IT_SE_Explore EQUATE('explore')
IT_SE_RunAs EQUATE('runas')
IT_SE_Edit EQUATE('edit')
IT_SE_Find EQUATE('find')
IT_SE_Properties EQUATE('properties')
Example:
ITS ITShellClass
Loc:FileToRun CString(2049)
Loc:WaitForProgram Byte
Code
Loc:WaitForProgram = True
Loc:FileToRun = '"C:\program files\Icetips Alta LLC\My spreadsheet.xls"'
ITS.ITRunFile(Loc:FileToRun,Loc:WaitForProgram,False,IT_SE_OPEN)
See also: