How do you create system variables via batch file for Windows 7?

13,170

You are looking for the SetX command:

 setx FLEXLM_TIMEOUT "10000000" /m

Should do what you are wanting.

This command has been standard in Windows since Vista and XP had it available in the XP Support Tools. It also has the ability to set variables on remote machines if needed.

Share:
13,170

Related videos on Youtube

Ali Ullah
Author by

Ali Ullah

Updated on September 18, 2022

Comments

  • Ali Ullah
    Ali Ullah over 1 year

    How can I create a batch file which creates a new system variable?

    (You know, in advanced system settings > environment variables > System Variables).

    I want to create a new variable named FLEXLM_TIMEOUT and set its value to 10000000.

    I need to figure out a way to create this variable in an automated fashion as I have around one hundred computers that need this fix.

    • CharlieRB
      CharlieRB about 9 years
      Corporate IT issues are off topic.
    • DrColossos
      DrColossos about 9 years
      @CharlieRB This is a question about usage of Windows which is on-topic.
    • CharlieRB
      CharlieRB about 9 years
      @KevinPanko Sorry. I see it differently. The help center specifically states "issues specific to corporate IT support and networks" are off topic. If the question didn't state "I have around 100 computers that need this fix", I'd probably agree with you.
  • will
    will about 6 years