简体   繁体   中英

Set an environmental variable through command line using batch file

在此处输入图片说明

I want to create a batch file . when i execute the batch file i want environmental variable to be set and keep the command prompt to be running as shown in the image

  1. Open a command prompt
  2. Set a environmental variable
  3. Keep command prompt up and running

try this:

::@echo off
set TestModule=Actual

@for %%x in (%cmdcmdline%) do @if /i "%%~x"=="/c" @cmd /k

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM