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 5841613
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T11:54:44+00:00 2026-05-22T11:54:44+00:00

I have this which is exporting the SDK info to a txt file. I

  • 0

I have this which is exporting the SDK info to a txt file. I would also like to export the processes that are running to the same text file.

Dim sdkCommand As String
    sdkCommand = "C:\Windows\System32\Java.exe -version 2> C:\Users\JavaSDKInfo.txt"
    Shell("cmd.exe /c" & sdkCommand)
End Sub

If I try adding this to it, I am only able to still see the output from sdkCommand, but nothing about the tasks that are running. I am assuming I need to combine the shell statements?

  Sub Main()
    Dim sdkCommand As String
    Dim proCommand As String
    sdkCommand = "C:\Windows\System32\Java.exe -version 2> C:\Users\Desktop\JavaSDKInfo.txt"
    proCommand = "C:\Windows\System32\tasklist.exe > C:\Users\Desktop\JavaSDKInfo.txt"
    Shell("cmd.exe /c" & sdkCommand)
    Shell("cmd.exe /c" & proCommand)
End Sub
  • 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-05-22T11:54:45+00:00Added an answer on May 22, 2026 at 11:54 am

    Combining all the commands into one long one using && actually made this work and made it easier. This allowed me to add a ton more command prompt commands.

    Sub Main()
    Dim sdkcommand as String
    'COmbine using && in command prompt
    sdkCommand = "java.exe >>C:\text.txt && tasklist.exe >>C:\text.txt"
    Shell("cmd.exe /c" and sdkCommand)
    

    End Sub

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

--I have some rows from my table which I would like to export in
I have a module something like this, in lib, called Fool.pm, which is based
In my application i have to export the excel file which I have achieved
I have a jar file exporting some functions which i want to use in
I have an object that is responsible for exporting a file to csv. It
I have a sql file which has a lot of insert statements (over 3000+).
I have a document which has been sloppily authored. It's a dictionary that contains
I have a model in App Engine that I am exporting in CSV format
I have a web application which I am exporting as EAR and trying to
I have a MySQL db which needs to be exported to a CSV file.

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.