Ask a Question related to Windows Server, Design and Development.
-
Sarah Tanembaum #1
Environment Variables - How to
I'm wondering if there are such a command line/console version of setting
the environment variables.
Instead of using the GUI version, I'm used to create user using the console
command, e.g:
net user ...
net user localgroup ...
It is faster and I can use a .bat for automation.
Now, I need to set up environment variables for all users in the systems.
I'm using the control-panel -> system ->advanced -> environment variables to
set up all the environment variables. How can I do that using the console
windows(as administrator)?
Thanks
Sarah Tanembaum Guest
-
Setting Environment Variables
Greetings, My ColdFusion application has to act slightly differently depending on whether it is on the live server or the develop server. The... -
J2EE environment variables
Hi all, I need to know how to set the J2EE environment variables. I can see that the JAVA_HOME environment variable is set, but i also need the... -
HTA environment variables?
I have an HTA (HTML Application) that builds another HTA and (after writing it to disk via FSO) invokes MSHTA.EXE to run it. Is it possible to... -
setting environment variables in IIS
Hi, How can I set up environment variables to be used in the script in IIS ? Thanks, Pradeep -
who interpretes the environment variables
My question is does Operating system interpretes any environment variable for any purpose?? Or does it just see them as name-value pairs?? ... -
Peter #2
Re: Environment Variables - How to
use the SET command
set myvar=fred
echo %myvar%
"Sarah Tanembaum" <sarahtanembaum@yahoo.com> wrote in message
news:2k30rbF173vkrU1@uni-berlin.de...console> I'm wondering if there are such a command line/console version of setting
> the environment variables.
>
> Instead of using the GUI version, I'm used to create user using theto> command, e.g:
>
> net user ...
> net user localgroup ...
>
> It is faster and I can use a .bat for automation.
>
> Now, I need to set up environment variables for all users in the systems.
> I'm using the control-panel -> system ->advanced -> environment variables> set up all the environment variables. How can I do that using the console
> windows(as administrator)?
>
> Thanks
>
>
Peter Guest
-
Sarah Tanembaum #3
Re: Environment Variables - How to
"Peter" <bscinc@hotmail.com> wrote in message
news:OSFUGDtWEHA.4032@TK2MSFTNGP11.phx.gbl...setting> use the SET command
> set myvar=fred
> echo %myvar%
>
>
> "Sarah Tanembaum" <sarahtanembaum@yahoo.com> wrote in message
> news:2k30rbF173vkrU1@uni-berlin.de...> > I'm wondering if there are such a command line/console version ofsystems.> console> > the environment variables.
> >
> > Instead of using the GUI version, I'm used to create user using the> > command, e.g:
> >
> > net user ...
> > net user localgroup ...
> >
> > It is faster and I can use a .bat for automation.
> >
> > Now, I need to set up environment variables for all users in thevariables> > I'm using the control-panel -> system ->advanced -> environmentconsole> to> > set up all the environment variables. How can I do that using theI know about setting it up for the current console, but I need to set up for>> > windows(as administrator)?
> >
> > Thanks
> >
> >
>
all users and permanent as well.
I know that you can do the above for the current windows, or use the login
script to set that up, but I'm sure there are another where, I think, you
have to write it to the registry so it will apply for all user.
Thanks
Sarah Tanembaum Guest
-
Sarah Tanembaum #4
Re: Environment Variables - How to
"Peter" <bscinc@hotmail.com> wrote in message
news:OSFUGDtWEHA.4032@TK2MSFTNGP11.phx.gbl...setting> use the SET command
> set myvar=fred
> echo %myvar%
>
>
> "Sarah Tanembaum" <sarahtanembaum@yahoo.com> wrote in message
> news:2k30rbF173vkrU1@uni-berlin.de...> > I'm wondering if there are such a command line/console version ofsystems.> console> > the environment variables.
> >
> > Instead of using the GUI version, I'm used to create user using the> > command, e.g:
> >
> > net user ...
> > net user localgroup ...
> >
> > It is faster and I can use a .bat for automation.
> >
> > Now, I need to set up environment variables for all users in thevariables> > I'm using the control-panel -> system ->advanced -> environmentconsole> to> > set up all the environment variables. How can I do that using thePerhaps any one can shed me some lights --->> > windows(as administrator)?
> >
> > Thanks
> >
> >
>
when I did Control Panel -> System ->Advanced -> Environment Variables and
set some environment variables, where did it get written to? and how do one
do it using the command line/console? Thanks
Sarah Tanembaum Guest
-
Torgeir Bakken \(MVP\) #5
Re: Environment Variables - How to
Sarah Tanembaum wrote:
Hi> I'm wondering if there are such a command line/console version of setting
> the environment variables.
You can e.g use setx.exe for this.
For WinXP yo it is included as a utility in the support tools installation
package (on your WinXP CD) installed by suptools.msi.
It is also in the free part of Win2000 Resource Kit:
[url]http://www.microsoft.com/windows2000/techinfo/reskit/tools/existing/setx-o.asp[/url]
I would think you can use either version on either OS version.
When adding or removing components from the _path_ from the command line,
I suggest using Pathman.exe (Path Manager).
Pathman.exe can be downloaded from here:
[url]http://www.microsoft.com/windows2000/techinfo/reskit/tools/existing/pathman-o.asp[/url]
It will e.g. handle repeated entries.
Pathman.exe is also in the Windows Server 2003 Resource Kit Tools
[url]http://www.microsoft.com/downloads/details.aspx?FamilyID=9d467a69-57ff-4ae7-96ee-b18c4790cffd&DisplayLang=en[/url]
(The kit will install on WinXP or later)
--
torgeir, Microsoft MVP Scripting and WMI, Porsgrunn Norway
Administration scripting examples and an ONLINE version of
the 1328 page Scripting Guide:
[url]http://www.microsoft.com/technet/community/scriptcenter/default.mspx[/url]
Torgeir Bakken \(MVP\) Guest
-
Sarah Tanembaum #6
Re: Environment Variables - How to
"Torgeir Bakken (MVP)" <Torgeir.Bakken-spam@hydro.com> wrote in message
news:OxozC6uWEHA.2716@tk2msftngp13.phx.gbl...setting> Sarah Tanembaum wrote:
>> > I'm wondering if there are such a command line/console version of[url]http://www.microsoft.com/windows2000/techinfo/reskit/tools/existing/setx-o.asp[/url]> Hi> > the environment variables.
>
> You can e.g use setx.exe for this.
>
> For WinXP yo it is included as a utility in the support tools installation
> package (on your WinXP CD) installed by suptools.msi.
>
> It is also in the free part of Win2000 Resource Kit:
>[url]http://www.microsoft.com/windows2000/techinfo/reskit/tools/existing/pathman-o.asp[/url]>
> I would think you can use either version on either OS version.
>
>
> When adding or removing components from the _path_ from the command line,
> I suggest using Pathman.exe (Path Manager).
>
> Pathman.exe can be downloaded from here:
>[url]http://www.microsoft.com/downloads/details.aspx?FamilyID=9d467a69-57ff-4ae7-96ee-b18c4790cffd&DisplayLang=en[/url]>
> It will e.g. handle repeated entries.
>
> Pathman.exe is also in the Windows Server 2003 Resource Kit Tools
>>
> (The kit will install on WinXP or later)
>
>
> --
> torgeir, Microsoft MVP Scripting and WMI, Porsgrunn Norway
> Administration scripting examples and an ONLINE version of
> the 1328 page Scripting Guide:
> [url]http://www.microsoft.com/technet/community/scriptcenter/default.mspx[/url]
Thanks I will check it out, but in the mean time, I found this under:
HKLM\Current ControlSet\Control\Session Manager\Environment\
....
....
And it contains all the path I created plus some that I'm not quite
understand.
It has some hex number for certain Environment Variables. Any idea?
Can I just export the above and reload into different machine that has
similar setup? Thanks
Sarah Tanembaum Guest
-
Dave Patrick #7
Re: Environment Variables - How to
Note that system environment variables are stored in;
HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment
User environment variables are stored in;
HKCU\Environment
Also note the type is Reg_Expand_Sz which must be created with regedt32.exe
Yes you can export and then import the *.reg file through regedit.exe but be
careful with system variables.
--
Regards,
Dave Patrick ....Please no email replies - reply in newsgroup.
Microsoft Certified Professional
Microsoft MVP [Windows]
[url]http://www.microsoft.com/protect[/url]
"Sarah Tanembaum" wrote:
| Thanks I will check it out, but in the mean time, I found this under:
|
| HKLM\Current ControlSet\Control\Session Manager\Environment\
| ...
| ...
|
| And it contains all the path I created plus some that I'm not quite
| understand.
| It has some hex number for certain Environment Variables. Any idea?
|
| Can I just export the above and reload into different machine that has
| similar setup? Thanks
|
|
Dave Patrick Guest
-
Sarah Tanembaum #8
Re: Environment Variables - How to
Thanks Dave. What is that hex number represent? Is it the ascii number?
Thanks
"Dave Patrick" <mail@NoSpam.DSPatrick.com> wrote in message
news:OZEvd0zWEHA.1368@TK2MSFTNGP10.phx.gbl...regedt32.exe> Note that system environment variables are stored in;
> HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment
>
> User environment variables are stored in;
> HKCU\Environment
>
> Also note the type is Reg_Expand_Sz which must be created withbe> Yes you can export and then import the *.reg file through regedit.exe but> careful with system variables.
>
> --
> Regards,
>
> Dave Patrick ....Please no email replies - reply in newsgroup.
> Microsoft Certified Professional
> Microsoft MVP [Windows]
> [url]http://www.microsoft.com/protect[/url]
>
>
> "Sarah Tanembaum" wrote:
> | Thanks I will check it out, but in the mean time, I found this under:
> |
> | HKLM\Current ControlSet\Control\Session Manager\Environment\
> | ...
> | ...
> |
> | And it contains all the path I created plus some that I'm not quite
> | understand.
> | It has some hex number for certain Environment Variables. Any idea?
> |
> | Can I just export the above and reload into different machine that has
> | similar setup? Thanks
> |
> |
>
>
Sarah Tanembaum Guest
-
Dave Patrick #9
Re: Environment Variables - How to
You're probably looking at them through regedit hence the hex value for a
type Reg_Expand_Sz element. Try looking at them with regedt32.exe
--
Regards,
Dave Patrick ....Please no email replies - reply in newsgroup.
Microsoft Certified Professional
Microsoft MVP [Windows]
[url]http://www.microsoft.com/protect[/url]
"Sarah Tanembaum" wrote:
| Thanks Dave. What is that hex number represent? Is it the ascii number?
| Thanks
Dave Patrick Guest
-
Sarah Tanembaum #10
Re: Environment Variables - How to
Dave,
under regedt32, it display okay without the hex, but when I
exported the Environment registry and read the text file, some values are in
hex number. Any ideas?
Thanks
"Dave Patrick" <mail@NoSpam.DSPatrick.com> wrote in message
news:eJYTbe4WEHA.2792@TK2MSFTNGP10.phx.gbl...> You're probably looking at them through regedit hence the hex value for a
> type Reg_Expand_Sz element. Try looking at them with regedt32.exe
>
> --
> Regards,
>
> Dave Patrick ....Please no email replies - reply in newsgroup.
> Microsoft Certified Professional
> Microsoft MVP [Windows]
> [url]http://www.microsoft.com/protect[/url]
>
>
> "Sarah Tanembaum" wrote:
> | Thanks Dave. What is that hex number represent? Is it the ascii number?
> | Thanks
>
>
Sarah Tanembaum Guest
-
Dave Patrick #11
Re: Environment Variables - How to
Yes, don't worry about it. You can't read them with a text editor.
--
Regards,
Dave Patrick ....Please no email replies - reply in newsgroup.
Microsoft Certified Professional
Microsoft MVP [Windows]
[url]http://www.microsoft.com/protect[/url]
"Sarah Tanembaum" wrote:
| Dave,
| under regedt32, it display okay without the hex, but when I
| exported the Environment registry and read the text file, some values are
in
| hex number. Any ideas?
|
| Thanks
Dave Patrick Guest
-
Sarah Tanembaum #12
Re: Environment Variables - How to
"Dave Patrick" <mail@NoSpam.DSPatrick.com> wrote in message
news:u$sH464WEHA.1380@TK2MSFTNGP09.phx.gbl...are> Yes, don't worry about it. You can't read them with a text editor.
>
> --
> Regards,
>
> Dave Patrick ....Please no email replies - reply in newsgroup.
> Microsoft Certified Professional
> Microsoft MVP [Windows]
> [url]http://www.microsoft.com/protect[/url]
>
>
> "Sarah Tanembaum" wrote:
> | Dave,
> | under regedt32, it display okay without the hex, but when I
> | exported the Environment registry and read the text file, some valuesThanks.> in
> | hex number. Any ideas?
> |
> | Thanks
>
>
Sarah Tanembaum Guest



Reply With Quote

