Results 1 to 2 of 2

Thread: Add entry to System Path Environment Variable....

  1. #1
    PreviousPoster is offline 100+ Helpful Posts! 50+ Helpful Posts
    Join Date
    Dec 1969
    Posts
    1,254

    Default

    I hope someone knows how to do this....I have a need to add a network location that houses many of our internal utilities and tools to the PATH System Environment Variable. I know the reg key that houses the setting, but I'm not sure how to add an entry to the key versus replacing the contents of the key. I tried using setx.exe to do it, but it looks like I can only get the command to replace the entry....my experience with scripts and custom ADM's is limited, but I'm open to any help.

    TIA,

    Mike

  2. #2
    PreviousPoster is offline 100+ Helpful Posts! 50+ Helpful Posts
    Join Date
    Dec 1969
    Posts
    1,254

    Default

    Here you can add your environment variables with an adm-file: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Contro l\Session Manager\Environment

    Here is an example which i copied from another site so I don't know if it's working or not:
    CATEGORY "Computer Template"
    CATEGORY "Environment"
    KEYNAME "SYSTEM\CurrentControlSet\Control\Session Manager\Environment"
    POLICY "Text box example"
    EXPLAIN !!TEXT_BOX_EXPL
    PART "File Path" EDITTEXT REQUIRED
    VALUENAME "path"
    END PART
    END POLICY
    POLICY "Drop down example"
    EXPLAIN !!DROP_DOWN_EXPL
    PART "Drop down alternatives" DROPDOWNLIST REQUIRED
    VALUENAME "drop"
    ITEMLIST
    NAME "1: Red" VALUE "Red"
    NAME "2: Green" VALUE "Green"
    NAME "3: Blue" VALUE "Blue"
    END ITEMLIST
    END PART
    END POLICY
    END CATEGORY
    END CATEGORY
    [strings]
    TEXT_BOX_EXPL="Defines value for path"
    DROP_DOWN_EXPL="Defines value for drop"

    And of course it needs modification before you can use it!!!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

Search Engine Friendly URLs by vBSEO