|
-
Jun 13th, 2012, 09:36 AM
#1
Thread Starter
Lively Member
Calling PSLoggedon.exe problem
I currently have a form, with 1 textbox, and 1 button.
The button calls
HTML Code:
Dim objProcess As New System.Diagnostics.Process
objProcess.StartInfo.FileName = "\\hqcm01\AppDeploy\Johnson Outdoors Suite\Additional Tools\PSTools\PSloggedon.exe"
objProcess.StartInfo.Arguments = TextBox1.Text
objProcess.Start()
Where textbox1 would be the username of a user, or the computername.
This works fine, and opens and runs as expected... however....
for the life of me, I cannot figure out why it closes automatically when it's done searching. Is there anyway to stop this?
Thanks,
Tony
-
May 25th, 2013, 01:22 PM
#2
New Member
Re: Calling PSLoggedon.exe problem
Hello,
Excuse the late reply but I have an answer from issues of my own I'm trying to solve (getting the output of psloggedon to be piped to a file). The automatic closing is by design and occurs in many command line based programs (which the pstools suite are). If you manually run psloggedon.exe by clicking it in explorer it will also close automatically once run as it basically it is designed to do one thing and everything "interactive" is given at the launch of the program as arguments (what computer or user you're looking for) so there are no prompts or changes to make during runtime. You can recreate and verify this is the case by using
HTML Code:
Shell("ipconfig /all", AppWinStyle.NormalFocus, True)
Because ipconfig is a command line program, it will output the results and then close automatically. The only reason you see the results in a command line without outputting the results to a file is because the command line doesn't close or clear it's session history so you see it in the window.
Hope this helps,
Bryan
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|