Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8936351
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T10:11:52+00:00 2026-06-15T10:11:52+00:00

I’m using code below to execute my commands in cmd. Which is actually made

  • 0

I’m using code below to execute my commands in cmd. Which is actually made for running an exe on my server.

Private Sub Command1_Click()
    Dim FN As Integer
    FN = FreeFile
    'DOS COMMANDS
    ServerName = "\\mydbserv"
    ExePath = """d:\myfolder\my.exe"""
    UserName = "myserver\myuser"
    Password = "mypass"
    MyCommand = "psexec " & ServerName & " -u " & UserName & " -p " & Password & " -i " & ExePath
    'Open Bat file
    Open "C:\Mybatc.bat" For Output As #FN
        Print #FN, "cd c:\Users\myuser"
        Print #FN, MyCommand
        Print #FN, "Exit"
    Close #FN
    'Activate
    result = Shell("C:\Mybatc.bat", vbHide)
    End
End Sub

everything was fine until i seen that cmd is not getting closed when process is done.
and the worse is the exe i was trying to run remotely also not stops. When i check the cpu usage it always shows “00” doesnt even starts.. It shows like working for ever but never works actually.
So my question is :

  1. Why i cant run this exe file remotely? (or why it just shows like running)
  2. How can i remotely run and close when finished this exe file on server?
  3. How can i close the window and process when finished on my pc as well?
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T10:11:53+00:00Added an answer on June 15, 2026 at 10:11 am

    How about this?

    1. install Windbg on the server.
    2. config the windbg auto attach to your exe, when your exe is ready to running.
      http://ask.brothersoft.com/image-file-execution-options-debugger-83827.html
    3. running your script
    4. after your exe is started, the windbg will attach to it.
    5. input ‘g’ in the windbg command, let your exe to running.
    6. wait until you think it should finished
    7. ctrl-break to let the process hang on
    8. input ‘~*kb’ to windbg command, to see what’s going on in every thread,
      to find out why they are waiting, and what they are waiting for?
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm new to using the Perl treebuilder module for HTML parsing and can't figure
I am reading a book about Javascript and jQuery and using one of the
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
That's pretty much it. I'm using Nokogiri to scrape a web page what has
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I am trying to understand how to use SyndicationItem to display feed which is
I am currently running into a problem where an element is coming back from
I'm using v2.0 of ClassTextile.php, with the following call: $testimonial_text = $textile->TextileRestricted($_POST['testimonial']); ... and
I have this code to decode numeric html entities to the UTF8 equivalent character.
I have a French site that I want to parse, but am running into

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.