Windowsの[コントロールパネル]-[プログラムの変更と削除]で現在PC内にインストールされているプログラム一覧が表示されます。この情報を1件づつ手で書くのではなく、テキストデータとして別に取り出す方法はないでしょうか?

可能であらば、新たにPC構成管理専用ソフトなどをインストールすることなくデータを保存したいです。それがダメならフリーのPC構成管理専用ソフトの情報を教えていただけないでしょうか。

回答の条件
  • URL必須
  • 1人2回まで
  • 登録:
  • 終了:2007/08/02 15:25:04
※ 有料アンケート・ポイント付き質問機能は2023年2月28日に終了しました。

回答6件)

id:arainswk No.3

回答回数93ベストアンサー獲得回数3

ポイント26pt

こんなものも

http://www.forest.impress.co.jp/article/2005/07/06/safarp.html

インストール済みソフトのリストをCSV/HTML/RTF形式で保存する機能もあり

id:kaiton No.4

回答回数260ベストアンサー獲得回数34

ポイント10pt

私も#1の方が紹介されたPCVIEWを使っていますが...


http://www.microsoft.com/japan/technet/scriptcenter/resources/wm...

を参考にして

strHost = "."
Const HKLM = &H80000002

Set fs = WScript.CreateObject("Scripting.FileSystemObject")
fs.CreateTextFile "appl.txt"
Set applf = fs.CreateTextFile("appl.txt")

Const strBaseKey = _
    "Software\Microsoft\Windows\CurrentVersion\Uninstall\"

Set objReg = GetObject("winmgmts://" & strHost & _
    "/root/default:StdRegProv")

objReg.EnumKey HKLM, strBaseKey, arrSubKeys

For Each strSubKey In arrSubKeys
    intRet = objReg.GetStringValue(HKLM, strBaseKey & strSubKey, _
        "DisplayName", strValue)
    If intRet <> 0 Then
        intRet = objReg.GetStringValue(HKLM, strBaseKey & strSubKey, _
        "QuietDisplayName", strValue)
    End If
    If (strValue <> "") and (intRet = 0) Then
         applf.Write strValue & vbcrlf
    End If
Next
applf.Close
Set applf = Nothing
Set fs = Nothing 

ファイル名appl.txtは適宜変更してください。

id:ardarim No.5

回答回数897ベストアンサー獲得回数145

ポイント10pt

以下のスクリプトをxxxxx.vbsという名前(xxxxxは適当な名前を付けてください)で保存してコマンドラインから「cscript xxxxx.vbs」を実行すればプログラムの一覧を表示できます。

Const HKEY_LOCAL_MACHINE = &H80000002

Set objReg = GetObject("winmgmts:{impersonationLevel=impersonate}!\\.\root\default:StdRegProv")

unKeyPath = "Software\Microsoft\Windows\CurrentVersion\Uninstall"

objReg.EnumKey HKEY_LOCAL_MACHINE, unKeyPath, arrSubKeys

For Each Subkey in arrSubKeys
    objReg.GetStringValue HKEY_LOCAL_MACHINE, unKeyPath & "\" & subkey, "DisplayName", strValue
    If Not IsNull(strValue) Then 
        Wscript.Echo strValue
    End If
Next

wscript.Quit

少し改造すれば、プログラム名以外の情報なども取得できます。またファイルに保存したければそのように改造することもできます。


テキストファイルに書くだけであれば「cscript xxxxx.vbs > list.txt」とするだけでもいいですが。


URLはダミー

http://q.hatena.ne.jp/1185430954

質問者が未読の回答一覧

 回答者回答受取ベストアンサー回答時間
1 lizy 45 42 14 2007-07-26 23:39:51
  • id:kaiton
    http://www.microsoft.com/japan/technet/scriptcenter/resources/wmifaq.mspx#ECPAC
    を参考に
    strHost = "."
    Const HKLM = &H80000002

    Set fs = WScript.CreateObject("Scripting.FileSystemObject")
    fs.CreateTextFile "appl.txt"
    Set applf = fs.CreateTextFile("appl.txt")

    Const strBaseKey = _
    "Software\Microsoft\Windows\CurrentVersion\Uninstall\"

    Set objReg = GetObject("winmgmts://" & strHost & _
    "/root/default:StdRegProv")

    objReg.EnumKey HKLM, strBaseKey, arrSubKeys

    For Each strSubKey In arrSubKeys
    intRet = objReg.GetStringValue(HKLM, strBaseKey & strSubKey, _
    "DisplayName", strValue)
    If intRet <> 0 Then
    intRet = objReg.GetStringValue(HKLM, strBaseKey & strSubKey, _
    "QuietDisplayName", strValue)
    End If
    If (strValue <> "") and (intRet = 0) Then
    applf.Write strValue & vbcrlf
    End If
    Next
    applf.Close
    Set applf = Nothing
    Set fs = Nothing

    と解答しました。

この質問への反応(ブックマークコメント)

「あの人に答えてほしい」「この質問はあの人が答えられそう」というときに、回答リクエストを送ってみてましょう。

これ以上回答リクエストを送信することはできません。制限について

回答リクエストを送信したユーザーはいません