Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

environment in Win32

Status
Not open for further replies.

scriptico

Programmer
Joined
Jan 9, 2001
Messages
6
Location
DE
Hi!
I'm trying to set WinXP environment variables with Tcl.
I know that these variables are stored in the env structure and I know how to change this structure. But I don't know how to pass this structure back to Windows, so that these variables remain changed when I e.g. reboot.
Any suggestions?
 
I don't think you can using the env() structure. I'm not sure how XP supports DOS commands but I think you have to do something like [exec "set EVAL vaule"] Bob Rashkin
rrashkin@csc.com
 
I don't think you can using the env() structure. I'm not sure how XP supports DOS commands but I think you have to do something like [exec "set EVAL value"] Bob Rashkin
rrashkin@csc.com
 
You can't change the external environment in this way
and expect it to have any effect on the environment
outside the scripts execution environment.

A possible workaround would be to use a script to
edit XP's equivalent to the old autoexec.bat and
config.sys files, or the old *.ini files.
Also if you are familiar enough with the registry, tcl
has the ability to modify the registry. Take a look at:
You can introduce your env variables from there.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top