ry94080
07-29-2016, 02:10 PM
Hi all,
I use the following code to open up an object and run some scripts.
Function MisysLogonScript(sDept As String)
Dim sSettings As String
sDir = "C:\Users\" & UserNameWindows & "\AppData\Roaming\PendingLog\"
sTextFileName = "PendingLog.txt"
sSettings = "C:\Users\" & UserNameWindows & "\AppData\Roaming\PendingLog\PendingLog.r4w"
Set oSession = New Reflection4.Session
With oSession
.Visible = True
.OpenSettings sSettings
How do I go about getting the Process ID of this session? The reason I ask is osession.quit and Set osession = nothing doesn't seem to be killing the process in the Task Manager. It leaves it hanging and I have to manually kill it.
I was hoping to get the process ID so I can kill it via VBA and not kill any other potential sessions running.
Any ideas?
I use the following code to open up an object and run some scripts.
Function MisysLogonScript(sDept As String)
Dim sSettings As String
sDir = "C:\Users\" & UserNameWindows & "\AppData\Roaming\PendingLog\"
sTextFileName = "PendingLog.txt"
sSettings = "C:\Users\" & UserNameWindows & "\AppData\Roaming\PendingLog\PendingLog.r4w"
Set oSession = New Reflection4.Session
With oSession
.Visible = True
.OpenSettings sSettings
How do I go about getting the Process ID of this session? The reason I ask is osession.quit and Set osession = nothing doesn't seem to be killing the process in the Task Manager. It leaves it hanging and I have to manually kill it.
I was hoping to get the process ID so I can kill it via VBA and not kill any other potential sessions running.
Any ideas?