+ Post New Thread
Results 1 to 8 of 8
Scripts Thread, adding Environment Variables? in Coding and Web Development; hello, there is any scrip to add "user Variables for %USERPROFILE%" ? i need to run it on at least ...
  1. #1

    Join Date
    Aug 2009
    Posts
    2
    Thank Post
    2
    Thanked 0 Times in 0 Posts
    Rep Power
    0

    Smile adding Environment Variables?

    hello, there is any scrip to add "user Variables for %USERPROFILE%" ? i need to run it on at least 50 students computers (xp32)



    any help its welcome.

  2. #2


    Join Date
    Feb 2007
    Location
    Northamptonshire
    Posts
    4,411
    Thank Post
    322
    Thanked 715 Times in 644 Posts
    Rep Power
    199
    Sorry, can you elaborate a bit, I can't make out the intention from your post.

    Are you trying to set the userprofile environment variable to point somewhere, or are you trying to make a new environment variable?

    Are you in an AD network?

  3. #3

    Join Date
    Aug 2009
    Posts
    2
    Thank Post
    2
    Thanked 0 Times in 0 Posts
    Rep Power
    0
    Quote Originally Posted by kmount View Post
    Sorry, can you elaborate a bit, I can't make out the intention from your post.

    Are you trying to set the userprofile environment variable to point somewhere, or are you trying to make a new environment variable?

    Are you in an AD network?
    i am trying to make a new environment variable

    just as illustrated

    class.JPG

  4. #4

    maniac's Avatar
    Join Date
    Feb 2007
    Location
    Kent
    Posts
    3,003
    Thank Post
    192
    Thanked 413 Times in 300 Posts
    Rep Power
    136
    Those custom variables are held in the registry [HKEY_CURRENT_USER\Environment]

    You could write a VB script which will add them at logon, or use REGEDIT in silent mode to import a .REG file with the necessary additions in.

    Mike.

  5. Thanks to maniac from:

    GiantEnemyAnt (11th August 2009)

  6. #5


    Join Date
    Feb 2007
    Location
    Northamptonshire
    Posts
    4,411
    Thank Post
    322
    Thanked 715 Times in 644 Posts
    Rep Power
    199
    As maniac said, you could script this quite easily in a login script something along the lines of:

    Code:
    SET CLASSTMP=W:\TEMP

  7. Thanks to kmount from:

    GiantEnemyAnt (11th August 2009)

  8. #6

    maniac's Avatar
    Join Date
    Feb 2007
    Location
    Kent
    Posts
    3,003
    Thank Post
    192
    Thanked 413 Times in 300 Posts
    Rep Power
    136
    Quote Originally Posted by kmount View Post
    As maniac said, you could script this quite easily in a login script something along the lines of:

    Code:
    SET CLASSTMP=W:\TEMP
    Didn't know about that command, even easier than the method I was suggesting!

  9. #7


    Join Date
    Feb 2007
    Location
    Northamptonshire
    Posts
    4,411
    Thank Post
    322
    Thanked 715 Times in 644 Posts
    Rep Power
    199
    Quote Originally Posted by maniac View Post
    Didn't know about that command, even easier than the method I was suggesting!
    It's quite handy for quick stuff like that.

    If you use set without any arguments/parameters it'll helpfully show you all of the current environment variables.

  10. Thanks to kmount from:

    maniac (11th August 2009)

  11. #8
    somabc's Avatar
    Join Date
    Oct 2007
    Location
    London
    Posts
    2,326
    Thank Post
    82
    Thanked 386 Times in 257 Posts
    Rep Power
    106
    You can use the
    Code:
    setx
    command to permanently change environment variables

SHARE:
+ Post New Thread

Similar Threads

  1. application data Environment variables redirect
    By ful56_uk in forum Networks
    Replies: 14
    Last Post: 27th July 2009, 10:23 PM
  2. Environment Variables Again
    By Reaper in forum Scripts
    Replies: 2
    Last Post: 19th February 2009, 05:45 PM
  3. PHP variables
    By Hightower in forum Web Development
    Replies: 8
    Last Post: 2nd December 2008, 02:54 PM
  4. Samba adding to a Server 03 environment
    By Bobo in forum Windows
    Replies: 17
    Last Post: 8th May 2008, 09:58 PM
  5. Environment variables or other method
    By HodgeHi in forum Scripts
    Replies: 3
    Last Post: 21st June 2006, 09:05 AM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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