Results 1 to 2 of 2

Thread: Calling PSLoggedon.exe problem

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Feb 2006
    Posts
    77

    Angry 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

  2. #2
    New Member
    Join Date
    May 2013
    Posts
    1

    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
  •  



Click Here to Expand Forum to Full Width