user3012974
user3012974

Reputation: 43

Set an environmental variable through command line using batch file

enter image description here

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

Upvotes: 0

Views: 71

Answers (1)

npocmaka
npocmaka

Reputation: 57322

try this:

::@echo off
set TestModule=Actual

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

Upvotes: 1

Related Questions