Does "SHELLEXECUTEINFO" for Lotus Script works in any windows OS? Does it also work in AIX, Linux and etc

StackOverflow https://stackoverflow.com/questions/22524773

  •  17-06-2023
  •  | 
  •  

Question

I just want to confirm regarding the "SHELLEXECUTEINFO" in lotus script. I believe it is for windows. Does it also works in Window Server 2003? I can't test it since I don't have the required machine and another thing will this work on AIX, Linux or other OS? (I think not) If ever it really would not work is there some alternatives (A Lotus Script Code that would run any file and would work on any OS)? Thanks.

Sample Codes:

' Use in Executing the Batch File or Exe File
Declare Function GetActiveWindow Lib "user32.dll" () As Long

Type SHELLEXECUTEINFO
    cbSize As Long
    fMask As Long
    hwnd As Long
    lpVerb As String
    lpFile As String
    lpParameters As String
    lpDirectory As String
    nShow As Long
    hInstApp As Long
    lpIDList As Long
    lpClass As String
    hkeyClass As Long
    dwHotKey As Long
    hIcon As Long
    hProcess As Long
End Type

Const SEE_MASK_NOCLOSEPROCESS = &H40
Const SW_SHOWNORMAL = 1
Declare Function ShellExecuteEx Lib "shell32.dll" Alias "ShellExecuteExA" (lpExecInfo As SHELLEXECUTEINFO) As Long
Const SE_ERR_FNF = 2
Declare Function WaitForSingleObject Lib "kernel32.dll" (ByVal hHandle As Long, ByVal dwMilliseconds As Long) As Long
Const INFINITE = &HFFFF
Const WAIT_TIMEOUT = &H102
Was it helpful?

Solution

As "shell32.dll" and "kernel32.dll" are available in every Windows- System (32Bit and 64Bit), this will work for every Windows system.

And for the same reason, this code will not work for any AIX / Linux / other OS, as they do not know the dlls...

If you just want to execute something and NOT have to wait for its completion, then using the built in LotusScript "shell"- function is absolutely sufficient.

Unfortunately I have no example code for any other way of doing this in NON Windows OS

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top