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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T08:22:48+00:00 2026-05-18T08:22:48+00:00

I have a windows cmd.exe script that runs a child process and needs to

  • 0

I have a windows cmd.exe script that runs a child process and needs to collect the output from the child to set three variables. The child process does some work, and prints out three values.

How do I code the parent to collect the values printed out by child ?

I can make any amendments to the child process needed to do this, but the parent script must be written as a cmd.exe batch file.

  • 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-18T08:22:49+00:00Added an answer on May 18, 2026 at 8:22 am

    Is it acceptable that child process set environment variables? parent process should be able to pick that up.

    child.bat

    set VAR1=123
    set VAR2=321
    

    parent.bat

    echo %VAR1%
    echo %VAR2%
    call child.bat
    echo %VAR1%
    echo %VAR2%
    

    You can set environment variable from child program/script whatever language you are using – there are ways to set environment variables from them.

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

Sidebar

Related Questions

Is it possible to close Windows Explorer from CMD? I have a batch that
I have installed MsysGit on Windows. The following command invoked from the cmd.exe command-line
I have a small script that performs the build and install process on Windows
I have this command that i need to run cd /d C:\leads\ssh & C:\Windows\System32\cmd.exe
I have a sh/bash script that needs to call a batch file with parameters
I have a perl script that runs a series of batch scripts for regression
I have a VBScript I wrote that needs to be executed from an MSI
OS: Windows XP, Windows 7 64bit. We have some fairly hefty cmd scripts that
I have Windows 7 OS. I have followed the instructions from the PETSc web
I have Windows box and I wish to invoke a .sh script on a

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.