blog.livedoor.jp Open in urlscan Pro
147.92.146.242  Public Scan

URL: http://blog.livedoor.jp/akf0/archives/51224565.html
Submission: On April 08 via manual from JP — Scanned from JP

Form analysis 2 forms found in the DOM

Name: comment_formPOST https://comment.blogcms.jp/livedoor/akf0/51224565/post

<form action="https://comment.blogcms.jp/livedoor/akf0/51224565/post" method="post" name="comment_form" id="comment-form" onsubmit="setCommentAuthor(this); return submitOnce(this.button);">
  <table cellpadding="0" cellspacing="0" class="form">
    <tbody>
      <tr class="input-auther">
        <th class="author">名前</th>
        <td id="comment-author-form"><input id="author" name="author" value=""></td>
      </tr>
      <tr class="input-etc">
        <th>&nbsp;</th>
        <td>
          <label class="input-memorize" for="bake">情報を記憶<input id="bake" type="checkbox" name="cookie"></label>
          <label class="input-rating">評価<select id="rank" name="rating">
              <option value="">--</option>
              <option value="1">1(最低)</option>
              <option value="2">2</option>
              <option value="3">3</option>
              <option value="4">4</option>
              <option value="5">5(最高)</option>
            </select></label>
          <label class="input-rating-face" for="radio-rating-face"><input type="radio" id="radio-rating-face" value="face" name="rating_icon">顔</label>
          <label class="input-rating-star" for="radio-rating-star"><input type="radio" id="radio-rating-star" value="star" name="rating_icon" checked="checked">星</label>
        </td>
      </tr>
      <tr class="input-facemark">
        <th>&nbsp;</th>
        <td><a href="javascript:void(0);" id="emojiLink1" onclick="showEmojiPanel(this.id, 'text')"><img src="https://parts.blog.livedoor.jp/img/usr/cmn/tool.gif" id="tool" width="18" height="18" alt="絵文字"></a></td>
      </tr>
      <tr class="input-comment-body">
        <th nowrap="">&nbsp;</th>
        <td>
          <div class="textarea-outer"><textarea id="text" name="body"></textarea></div>
        </td>
      </tr>
      <tr class="submit">
        <th>&nbsp;</th>
        <td><input type="submit" value=" 投稿する " class="button" name="button"></td>
      </tr>
    </tbody>
  </table>
</form>

POST http://www.melma.com/backnumber_175383/

<form method="post" action="http://www.melma.com/backnumber_175383/">
  <table width="132" border="0" cellpadding="0" cellspacing="1" bgcolor="#7EAB00">
    <tbody>
      <tr>
        <td>
          <table border="0" cellspacing="0" cellpadding="0" bgcolor="#7EAB00">
            <tbody>
              <tr>
                <td>
                  <table border="0" cellspacing="0" cellpadding="1" bgcolor="#ffffff">
                    <tbody>
                      <tr bgcolor="#7EAB00">
                        <td style="text-align: center; font-size: small;"><strong style="color:#FFF !important;">メルマガ登録・解除</strong></td>
                      </tr>
                      <tr bgcolor="#F2FD68">
                        <td>
                          <table border="0" cellspacing="2" cellpadding="0" align="center">
                            <tbody>
                              <tr>
                                <td style="padding-left: 0.3em; font-size: medium;"><a href="http://www.melma.com/backnumber_175383/" target="_blank" style="color:#00C !important;">【出張版】全ては時の中に…</a></td>
                              </tr>
                              <tr>
                                <td style="font-size: x-small;"><label for="yes"><input value="add" name="mailmag" type="radio" style="vertical-align:middle;" checked="checked"
                                      id="yes"><a href="http://melma.com/contents/law.html" target="_blank" style="color:#00C !important;">規約</a><span style="color:#000 !important;">に同意して登録</span></label>&nbsp;</td>
                              </tr>
                              <tr>
                                <td style="font-size: x-small;"><label for="no"><input value="del" name="mailmag" type="radio" style="vertical-align:middle;" id="no"><span style="color:#000 !important;">解除</span></label></td>
                              </tr>
                              <tr>
                                <td style="font-size: x-small;">
                                  <div align="center"><input name="email" type="text" style="width:122px; " maxlength="64"></div>
                                </td>
                              </tr>
                              <tr>
                                <td style="font-size: x-small;">
                                  <div align="center"><input value="dgregist" name="procregister" type="hidden"><input name="btregsit2" type="submit" value=" 送信 " style="color:#000 !important;"></div>
                                </td>
                              </tr>
                            </tbody>
                          </table>
                        </td>
                      </tr>
                      <tr>
                        <td align="right"> <span style="font-size:x-small; color:#000 !important;">powered by</span>
                          <a href="http://melma.com/" target="_blank"><img src="http://melma.com/contents/campaign/k_h_campaign/img/rogo0704.gif" width="83" height="15" border="0" alt="メルマガスタンドmelma! トップページへ" style="vertical-align:middle;"></a></td>
                      </tr>
                    </tbody>
                  </table>
                </td>
              </tr>
            </tbody>
          </table>
        </td>
      </tr>
    </tbody>
  </table>
</form>

Text Content

プログラミングブログを書く4月9日話題の記事


全ては時の中に…

システム開発全般の技術や開発に役立つツール、プログラミングのサンプルを紹介しています。

 * < 【VB.NET】Zipファイルを扱う
 * 【ソフトウェア】VB.NETの開発支援ツール(WMICSO) >


2007/12/1323:58


【POWERSHELL】GACに登録されているDLLをコピーする

.NETからPowerShellを利用する場合、"System.Management.Automation.dll"が必要となる。
このファイルは、PowerShellをインストールした際にGAC(Global Assembly Cash)と呼ばれるアセンブリの配置場所に保管される。
(GACに保管されているアセンブリは、端末全体で参考可能になる)
このファイルに対し、参照設定を行う必要があるが、Visual Studioの参照設定からこのファイルを参照することはできない。
また、DLLファイルの実体がGAC以外に存在しないため、DLLファイルの保管場所を指定することもできない。

そこで、以下の方法を使って、DLLファイルを入手する必要がある。
 1.Windows SDKを入手する。
  →ダウンロードは、こちらから(Windows SDK)
 2.PowerShellのコマンドを利用してファイルを入手する。
  PowerShellで以下のコマンドを実行すると、PowerShell用のアセンブリを配置(コピー)する。
  (PowerShellのインストールフォルダにSDKというフォルダを作成し、そこにコピーする)


    [void] (New-Item -path $PSHome -itemType "directory" -name "SDK");

    [System.AppDomain]::CurrentDomain.GetAssemblies() | Where {$_.FullName -like "*PowerShell*";} | Copy-Item -path {$_.Location;} -destination ($PSHome + "\SDK");

    [System.AppDomain]::CurrentDomain.GetAssemblies () | Where {$_.FullName -like "*Management.Automation*";} | Copy-Item -path {$_.Location;} -destination ($PSHome + "\SDK");

    [System.AppDomain]::CurrentDomain.GetAssemblies() | Where {$_.FullName -like "*Configuration.Install*";} | Copy-Item -path {$_.Location;} -destination ($PSHome + "\SDK");


  ※SDKをインストールする必要がない場合には、こちらの方法で良い。

【コマンドの説明】


  [void] (New-Item -path $PSHome -itemType "directory" -name "SDK");


  →PowerShellのインストールフォルダにSDKというフォルダを作成する。


  [System.AppDomain]::CurrentDomain.GetAssemblies()


  →GACに登録されているアセンブリファイルの一覧を取得する。


  Where {$_.FullName -like "*PowerShell*";}


  →取得したアセンブリのファイル一覧から-likeの後に指定した文字列があるファイルを抽出する。


  Copy-Item -path {$_.Location;} -destination ($PSHome + "\SDK")


  →アセンブリの実体となるファイルをコピーする。

 ※これらのコマンドをパイプで繋げ、次のコマンドに結果を渡しながら処理している。

上記のファイルを入手したら、VB.NETからPowerShellを操作する事前準備が整うことになる。

【GACについて】
.NET Frameworkをインストールすると、"%SystemRoot%\Assembly"フォルダがGACに設定される。(標準設定時)
GACは、特殊なフォルダ構造となっていて、単純にファイルのやりとりをすることができない。
上記のフォルダを参照すると分かるが、アセンブリビューアという特殊なモードでフォルダを閲覧することになる。

VB.NETからPowerShellを実行するために必要となるDLLの入手方法の説明になってしまった…
次の記事で実際にVB.NETからPowerShellを実行する方法について説明する。



「POWERSHELL」カテゴリの最新記事

 * コマンドシェルの記事一覧
 * 【PowerShell】進行状況を表示する
 * 【PowerShell】ドライブを確認する
 * 【PowerShell】環境変数を利用する
 * 【PowerShell】Windows PowerShell 2.0 CTPでGet-Helpが利用できない
 * 【PowerShell】ヒア文字列を利用する
 * 【PowerShell】エスケープシーケンス
 * 【PowerShell】文字列内で変数を参照する
 * 【PowerShell】現在日時を取得する
 * 【PowerShell】データ型の変換
 * 【PowerShell】データ型の確認
 * 【PowerShell】コマンドで四則演算を行う
 * 【PowerShell】配列に値を設定する
 * 【PowerShell】配列の利用
 * 【PowerShell】変数の利用

カテゴリ:PowerShellVB.NET
タグ : VB.NET PowerShell コマンド 実行 GAC
 * akf0
 * Comments( 0 )
 * Trackbacks( 0 )
 * 




コメントする

名前   情報を記憶 評価 -- 1(最低) 2 3 4 5(最高) 顔 星    

 


 * < 【VB.NET】Zipファイルを扱う
 * 【ソフトウェア】VB.NETの開発支援ツール(WMICSO) >


<<   December,2007   >>


S M T W T F S

            1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
27 28 29 30 31          


TagCloud

 * C#
 * C++
 * C言語
 * Excel
 * Microsoft
 * Office
 * Oracle
 * PowerShell
 * PrintDocument
 * Server
 * SMO
 * Spread
 * SQL
 * SQLServer
 * Studio
 * VB.NET
 * VBA
 * Virtual
 * Vista
 * VISUAL
 * Windows
 * WMI
 * アプリケーション
 * イベント
 * インストール
 * クラス
 * コマンド
 * コマンドプロンプト
 * コントロール
 * テーブル
 * データ
 * データベース
 * データ型
 * パフォーマンス
 * ファイル
 * フォーム
 * フォルダ
 * 一覧
 * 印刷
 * 引数
 * 確認
 * 項目
 * 作成
 * 実行
 * 取得
 * 出力
 * 設定
 * 操作
 * 追加
 * 日付
 * 表示
 * 文字列
 * 変換
 * 変更
 * 利用


最新記事

サイトマップ
Windowsの記事一覧
コマンドシェルの記事一覧
VB.NETの記事一覧
Web技術関連の記事一覧
データベース関連の記事一覧
MS Office関連の記事一覧
【C言語】strtok()を利用する場合の注意点
【C言語】数値の桁数を取得する
【Linux】シェルで進捗を表示する

カテゴリ別アーカイブ

サイトマップ (7)
Web技術 (1)
プロジェクト管理 (4)
要件定義 (1)
レビュー (1)
設計技術 (4)
デザインパターン (1)
テスト技法 (2)
ネットワーク (2)
Microsoft (3)
Windows (53)
コマンドプロンプト (32)
PowerShell (19)
Linux (11)
仮想化技術 (8)
統合開発環境(IDE) (15)
GrapeCity (14)
VB.NET (290)
Visual Basic (2)
ASP.NET (4)
AJAX (1)
C/C++ (20)
C# (7)
Java (5)
Google Android (3)
Lua (3)
HTML (4)
CSS (2)
VBScript (10)
WSH (5)
Ruby (2)
PowerBuilder (8)
データベース (11)
SQL (75)
Oracle (26)
SQL Server (61)
Microsoft Office (11)
Excel (39)
Word (4)
Access (5)
VBA(MS-Office) (39)
ソフトウェア紹介 (27)
ソフトウェア(自作) (11)
Eee PC (6)
資格試験 (1)
日記 (2)

月別アーカイブ

2015年12月
2012年12月
2012年03月
2010年08月
2010年07月
2010年03月
2009年12月
2009年10月
2009年08月
2009年07月
2009年05月
2009年04月
2009年03月
2009年02月
2009年01月
2008年12月
2008年11月
2008年10月
2008年09月
2008年08月
2008年07月
2008年06月
2008年05月
2008年04月
2008年03月
2008年02月
2008年01月
2007年12月
2007年11月
2007年10月
2007年09月
2007年08月
2007年07月
2007年06月

Recent Comments

【VB.NET】DataGridViewのSelectedRowsを整列する
7033
【VB.NET】スレッドで生成した別のクラスからフォームのコントロールを扱う
ラクチェ
【SQL Server】指定したデータベースのテーブル一覧を取得する
じいさん
【VBS】現在時刻の形式をyyyymmddhhmmssにする方法
さらに通りすがり
【SQL Server】メモリの最大使用量を設定する
hir
【VBS】現在時刻の形式をyyyymmddhhmmssにする方法
ふうらいぼう
【VB.NET】リッチテキストのフォントが勝手に変更されるのを抑制する
なっち
【VC++】スレッド(pThread)を利用する環境を整える
blogleaks
【コマンド】Windowsサービスを削除する
ookuma
【SQL Server】フルテキストインデックスを利用する
taka


Profile


ふりっつ



システムエンジニア
取得資格:
 ソフトウェア開発技術者
 MCP(70-290)
メールマガジン:
 【出張版】全ては時の中に…



メールマガジン


メルマガ登録・解除

【出張版】全ては時の中に… 規約に同意して登録  解除



 powered by


Links

株式会社KITOHA
PictMaster(テスト技法)
Amazon(開発関連書籍)
Crammedia.com(ベンダー試験用問題集)

ブログランキング












Amazon



スポンサー











 * 



Powered by ライブドアブログ