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

  • Home
  • SEARCH
  • 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 6994519
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T19:54:11+00:00 2026-05-27T19:54:11+00:00

I am making an installer which will be 100% depending on system variable such

  • 0

I am making an installer which will be 100% depending on system variable such as %TEMP% or %Path%, users first double click windows.bat file.

But, How can i setup permanent system variable in Windows XP, Vista, 7, 8 using VBS or BATCH?

I tried with BATCH but in Windows XP, most users do not have setx by default, so i want to avoid using that technique. Is there better way to do that?

C:\Documents and Settings\sun>REG ADD "HKLM\SYSTEM\CurrentControlSet\Control\Ses
sion Manager\Environment" /v MyApplicationWillUsetThis /d "C:\WhatEverPathToIncl
udeHereQuestionMark"

The operation completed successfully

C:\Documents and Settings\sun>REG ADD "HKLM\SYSTEM\CurrentControlSet\Control\Ses
sion Manager\Environment" /v MyApplicationWillUsetThis /d "C:\WhatEverPathToIncl
udeHereQuestionMark"
Value MyApplicationWillUsetThis exists, overwrite(Y/N)? Y

The operation completed successfully
  • 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-27T19:54:11+00:00Added an answer on May 27, 2026 at 7:54 pm

    You can create a REG_SZ value under HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment in the registry. The name of the value specifies the name of the environment variable, the value specifies the value of the environment variable.

    You can also modify existing values.

    In order to modify the registry you can use the RegRead and RegWrite method of the WScript.Shell object. For an example have a look at Manipulating the System Registry.

    Edit: You could at first delete the existing value and recreate it afterwards.

    REG DELETE "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment" /v MyApplicationWillUsetThis /f
    REG ADD "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment" /v MyApplicationWillUsetThis /d "C:\WhatEverPathToIncludeHereQuestionMark"
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am making an installer in java swing it almost completed only one thing
I'm making an app that will be installed and run on multiple computers, my
Making my first steps with NHibernate, I'm trying to have it creating my Tables
Making an adobe flex ui in which data that is calculated must use proprietary
Making my first steps in RIA Services (VS2010Beta2) and i encountered this problem: created
I am making a Java desktop application which involves lot of data, state, etc.
Background: I am making a VSTO 4.0 add in for Outlook 2007 which enables
I have a WiX installer which sets up a couple of root IIS websites
IE9 users can disable an add-on, such as a browser helper object, by clicking
I'm planning to write a C library which will act as an umbrella wrapper

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.