Wednesday, May 13, 2009

Difference Between InvokeApplication and SystemUtil.Run

SystemUtil.Run can open the Desktop applications or System Applications without need to specify the full path for system applications.Other thatn this It can open any application provided the full path of the application. It can open non-executable file and executable files.
This will be generated with Recording option while the application is selected from Start Menu।
object.Run file, [params], [dir], [op], [mode]
SystemUtil.Run "iexplore.exe","" ,,,,
We can also close the process by using CloseProcessByName method.

The InvokeApplication statement is supported primarily for backward compatibility. .It can open executable files only.
invokeapplication "C:\Program Files\Internet Explorer\iexplore.exe"
invokeapplication "\Program Files\Internet Explorer\iexplore.exe","C:"

3...alternatively we can also use the following..
Set objshell = createobject("") "notepad.exe"

No comments:

Post a Comment