setting windows environment variables

Jaeho Shin netj@ropas.snu.ac.kr
Thu Jul 22 16:33:00 GMT 2004


On Tue, 2004-07-20 15:18:34 -0500, Jason Joines wrote:
> 	I have a Cygwin BASH script which takes user input, uses ldapsearch, 
> etc., to set a bunch of environment variables.  I can then use these 
> from bash with no problem.  I would also like to make these environment 
> variables available to the windows command interpreter.
> 	Is there anyway to do this?

Try setx:
http://www.microsoft.com/windows2000/techinfo/reskit/tools/existing/setx-o.asp

You can change Windows environment variables from the command line, so
that you can call setx and change them from bash scripts.  It works
excellent for me to share a single ssh-agent Windows-wide. :)

You can use it only on NT/2000/XP, perhaps.
I'm not sure what's available on Windows 9X/ME.


> 	Also, is there a BASH equivalent of the windows cmd start command 
> 	that lets you start many processes without having to wait on each to finish?

``cygstart'' should be what you are looking for.

-- 
신재호 | Jaeho Shin <netj@ropas.snu.ac.kr> | http://netj.org/
Research On Program Analysis System, Seoul National University
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 186 bytes
Desc: not available
URL: <http://cygwin.com/pipermail/cygwin/attachments/20040722/24fe98b5/attachment.sig>


More information about the Cygwin mailing list