Search Options
close
Search the following clips:
All Clips
news
science
politics
food
economy
art
technology
health
internet
religion
psychology
Sign Up
Install
Learn More
Login
環境変数をコンソールから設定
imamura
follow
0
6-17-2009 9:59 PM
194 views
Add a Comment
Login
to Comment. Not a member yet?
Sign up
Today's Top Clips
The Ephesian Terrace Houses
Moon Phases 2010
Never a Year Like 2009
IN SOVIET RUSSIA; JOE CAMEL SMOKES YOU.
Handbook for Living
Restoring Cells' Potential is Method of the Year
Afghanistan, New Year's Eve, 2009: Into Thine Hand I Commit My Spirit
FASTER HORSEY, FASTER!
17 Cars That We Will Never See Again.
Peacocks become a colorful problem in Florida
visit the
Top Clips page
View the Top Clips from
June 17, 2009
Embed This Clip In Your Site...
<div style="margin: 12px 0px; font-family: arial; color: #333333; background: #ffffff; border: solid 4px #e5e5e5; width: 100%; clear: left;"><div class="CM_CTB_Content_Wrap" style="margin: 0px; padding: 0px;background-color: #ffffff;"><div style="border-bottom: solid 1px #dcdcdc; white-space: nowrap; margin-bottom: 8px; background-color: #eeeeee ;background-image: url(http://clipmarks.com/images/source-bg.gif); background-repeat: repeat-x; height: 24px; line-height: 24px; vertical-align: middle; padding-bottom: 4px; color: #666666; font-size: 10px;" ><a href="http://clipmarks.com/clip-to-blog/" title="see clips that are hot right now"><img src="http://content.clipmarks.com/blog_embed/c280e75a-7882-4199-9498-f8fee6fa9824/4894F8D0-CCD0-4B23-B9CF-D21D433413E1/" alt="" width="19" height="19" border="0" style="vertical-align: middle; margin: 0px 4px; display: inline; border: none; float:none;" /></a>clipped from <a title="http://www.atmarkit.co.jp/fwin2k/win2ktips/1003setx/setx.html" href="http://www.atmarkit.co.jp/fwin2k/win2ktips/1003setx/setx.html" style="font-size: 11px;">www.atmarkit.co.jp</a></div><blockquote style="text-align: left; padding: 0px 8px; margin: 4px 0px 8px 0px; background: transparent; border: none;" cite="http://www.atmarkit.co.jp/fwin2k/win2ktips/1003setx/setx.html"><FONT size="+2">setxで環境変数の値を設定する(基本編) </FONT></blockquote><div style="height: 2px; font-size: 2px; background: #dcdcdc; border-bottom: solid 1px #f5f5f5; margin: 2px 4px;"></div><blockquote style="text-align: left; padding: 0px 8px; margin: 4px 0px 8px 0px; background: transparent; border: none;" cite="http://www.atmarkit.co.jp/fwin2k/win2ktips/1003setx/setx.html"><P> バッチ・ファイルなどで環境変数の値を設定する場合、通常は「SET」という、コマンド・プロンプトの内部コマンドを利用する。だがこのSETコマンドで設定した変数の値は、そのコマンド・プロンプト内(およびそこから起動したプロセス)でのみ有効であり、別のプロセスやユーザーからは参照できないし、変更することもできない。</P></blockquote><div style="height: 2px; font-size: 2px; background: #dcdcdc; border-bottom: solid 1px #f5f5f5; margin: 2px 4px;"></div><blockquote style="text-align: left; padding: 0px 8px; margin: 4px 0px 8px 0px; background: transparent; border: none;" cite="http://www.atmarkit.co.jp/fwin2k/win2ktips/1003setx/setx.html"><P> だがsetx.exeというコマンドを利用すると、コマンド・プロンプト上から、setコマンドのように簡単にこれらの環境変数の値を設定/変更できる。本TIPSでは、setxの基本的な使い方について紹介する。</P></blockquote><div style="height: 2px; font-size: 2px; background: #dcdcdc; border-bottom: solid 1px #f5f5f5; margin: 2px 4px;"></div><blockquote style="text-align: left; padding: 0px 8px; margin: 4px 0px 8px 0px; background: transparent; border: none;" cite="http://www.atmarkit.co.jp/fwin2k/win2ktips/1003setx/setx.html"><P> なおsetx.exeというコマンドは、Windows XPではサポート・ツールに含まれているので、まずサポート・ツールをインストールする必要がある(CD-ROMの\SupportフォルダにあるSUPTOOLS.MSIをインストールする)。Windows Server 2003やWindows Vista、Windows Server 2008の場合はシステムに標準で用意されているので、事前の作業は不要である。</P></blockquote><div style="height: 2px; font-size: 2px; background: #dcdcdc; border-bottom: solid 1px #f5f5f5; margin: 2px 4px;"></div><blockquote style="text-align: left; padding: 0px 8px; margin: 4px 0px 8px 0px; background: transparent; border: none;" cite="http://www.atmarkit.co.jp/fwin2k/win2ktips/1003setx/setx.html"><table background="undefined" bgcolor="#000066"><tr><TD><FONT color="#ffffff"><CODE>setx <B><FONT color="#ff6600">環境変数名</FONT></B> <B><FONT color="#ff6600">値文字列</FONT></B></CODE></FONT> </TD></tr></table></blockquote><div style="height: 2px; font-size: 2px; background: #dcdcdc; border-bottom: solid 1px #f5f5f5; margin: 2px 4px;"></div><blockquote style="text-align: left; padding: 0px 8px; margin: 4px 0px 8px 0px; background: transparent; border: none;" cite="http://www.atmarkit.co.jp/fwin2k/win2ktips/1003setx/setx.html"><P> 上のコマンドを実行すると、指定されたユーザー環境変数に値がセットされる(空白などを含む値文字列の場合は、" " 記号で囲むこと)。システム環境変数をセットしたい場合は、次のように、末尾に「-m」オプションを付ける(先頭に付けると、-mが変数名とみなされるので注意すること)。</P></blockquote><div style="height: 2px; font-size: 2px; background: #dcdcdc; border-bottom: solid 1px #f5f5f5; margin: 2px 4px;"></div><blockquote style="text-align: left; padding: 0px 8px; margin: 4px 0px 8px 0px; background: transparent; border: none;" cite="http://www.atmarkit.co.jp/fwin2k/win2ktips/1003setx/setx.html"><table background="undefined" bgcolor="#000066"><tr><TD><FONT color="#ffffff"><CODE>setx <B><FONT color="#ff6600">環境変数名</FONT></B> <B><FONT color="#ff6600">値文字列</FONT></B> -m</CODE></FONT> </TD></tr></table></blockquote><div style="height: 2px; font-size: 2px; background: #dcdcdc; border-bottom: solid 1px #f5f5f5; margin: 2px 4px;"></div><blockquote style="text-align: left; padding: 0px 8px; margin: 4px 0px 8px 0px; background: transparent; border: none;" cite="http://www.atmarkit.co.jp/fwin2k/win2ktips/1003setx/setx.html"><P> setxコマンドで設定した値は、システムのプロパティにある環境変数に反映される。だがここで設定された値は、新たにコマンド・プロンプトやプロセスを起動した場合にのみ反映されるので注意していただきたい。つまりコマンド・プロンプトを開いてsetxで環境変数を設定しても、そのコマンド・プロンプト内では、設定した値は参照できないのである(このあたりはUNIXのsetenvなどと異なる)。別に新しくコマンド・プロンプトを開いて、初めてその値が参照できる。コマンド・プロンプト内から子プロセスとしてcmdを起動しても、参照はできない。必ず、別プロセスとして起動しなければならない。</P></blockquote></div><div style="margin: 0px 6px 6px 4px;"><table style="font-size: 11px;border-spacing: 0px;padding: 0px;" cellpadding="0" cellspacing="0" width="100%"><tr><td style="background:transparent;border-width:0px;padding:0px;"> </td><td align="right" style="background:transparent;border-width:0px;padding:0px;width:107px" width="107"><a href="http://clipmarks.com/share/4894F8D0-CCD0-4B23-B9CF-D21D433413E1/blog/" title="blog or email this clip"><img src="http://content7.clipmarks.com/images/c2b-foot.png" border="0" alt="blog it" width="107" height="17" style="border-width:0px;padding:0px;margin:0px;" /></a></td></tr></table></div></div>
New from the makers of Clipmarks:
Amplify.com - Don't just share the news...Amplify it!
Clipmarks
Home
New Clips
Top Clips
Dashboard
Popular Topics
News
Life
Science
Technology
Entertainment
Get Started
Sign Up
Install Clipping Tool
How Clipping Works
Clip-to-Blog™
ClipSearch
Tools and Resources
FAQ
ClipWeek
Top Clippers
Top Tags
Site Map
About Clipmarks
About Us
Contact
Copyright
Privacy
EULA
OK