Group29.com - What did you expect?
  Create an account
:: Home  ::  Downloads  ::  Your Account  ::  Forums  ::
Google Adsense
Modules
  • Home
  • Downloads
  • ExpectationReviews
  • Forums
  • Group29 FAQ
  • MovieReviews
  • OtherReviews
  • Stories Archive
  • Submit News
  • Top 10
  • Topics
  • Web Links
  • New at Group29
    ·Expectation Review: Avengers: Infinity War [24]
    ·Movie Review: Star Wars: The Last Jedi [16]
    ·Movie Review: Star Wars: The Last Jedi [23]
    ·2017 USC vs UCLA preview
    ·Forum Topic: Update your Facebook property
    ·2016 UCLA vs USC preview
    ·Expectation Review: Star Wars: The Force Awakens [29]
    ·Web Link: WEP Key Converter
    ·Forum Topic: Why does my IPA file get saved as a zip file in IE?
    ·Web Link: BeyondCompare

    read more...
    TheForce.Net
    ·Rebelscum Breast Cancer Awareness Charity Patch
    ·BBC Interviews J.J. Abrams About Trek And Wars
    ·CEII: Jabba's Palace Reunion - Massive Guest Announcements
    ·Fathead's May the Fourth Be With You!
    ·Star Wars Night With The Tampa Bay Storm Reminder
    ·Stephen Hayford Star Wars Weekends Exclusive Art
    ·ForceCast #251: To Spoil or Not to Spoil
    ·New Timothy Zahn Audio Books Coming
    ·SDCC: Exclusive Black Series Boba Fett With Han In Carbonite Set
    ·Star Wars Art Exposition May 4th

    read more...
    Hot trends
    ·Group29.com

    read more...
    Group29 Discussion Board :: View topic - Find install source in Windows registry for program
    Log in Register Forum FAQ Memberlist Search
    Ratings, Links, Free Speech and more

    Group29 Discussion Board Forum Index -> Group29 Tech Tips -> Find install source in Windows registry for program
    Post new topic  Reply to topic View previous topic :: View next topic 
    Find install source in Windows registry for program
    PostPosted: Mon Jan 10, 2005 8:52 am Reply with quote
    BB
    Regular
     
    Joined: Jun 23, 2004
    Posts: 340


      


    In windows 2000 and XP, I needed to find the original installation source for a program. in this case, the program was Microsoft Office. Office 2000 had been installed from a server on the network and I needed to know which one.

    In this case I found the answer in the registry:

    Code:
    HKEY_LOCAL_MACHINE
    \SOFTWARE
     \Classes
      \Installer
       \Products
        \904010001E872D116BF00006799C897E
         \SourceList

    The source list key has a value called "LastUsedSource". It contains the drive/folder name from which the program was originally installed.

    \\ourserver\source\Off2000sr1\
    View user's profile Visit poster's website
    Script to enumerate of installed programs and sources
    PostPosted: Thu Dec 29, 2005 11:39 am Reply with quote
    BB
    Regular
     
    Joined: Jun 23, 2004
    Posts: 340


      


    Here is a sample script to enumerate the registry key and subkey strings to show the install source for all installed files. Run it using cscript on the command line to avoid clicking the wscript message box repeatedly.

    I saved this code into a file called regenum1.vbs. Then I type

    cscript regenum1.vbs

    Code:
    const HKEY_LOCAL_MACHINE = &H80000002
    const REG_SZ = 1
    const REG_EXPAND_SZ = 2
    const REG_BINARY = 3
    const REG_DWORD = 4
    const REG_MULTI_SZ = 7

    strComputer = "."

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


    strKeyPath = "SOFTWARE\Classes\Installer\Products"
    objReg.EnumKey HKEY_LOCAL_MACHINE, strKeyPath, arrSubKeys

    For Each subkey In arrSubKeys
        Wscript.Echo " "
        Wscript.Echo subkey

        objReg.EnumValues HKEY_LOCAL_MACHINE, _
            strKeyPath & "\" & subkey, arrValueNames, arrValueTypes
        if isarray(arrValueNames) Then
            ValueNamesCount= UBound(arrValueNames)
            For I=0 To ValueNamesCount

                Select Case arrValueTypes(I)
                    Case REG_SZ
                        objReg.GetStringValue HKEY_LOCAL_MACHINE, _
                         strKeyPath & "\" & subkey, arrValueNames(I), sValue
                        WScript.Echo " : " & arrValueNames(I) & " = " & sValue
                    Case REG_EXPAND_SZ
                        objReg.GetExpandedStringValue HKEY_LOCAL_MACHINE, _
                         strKeyPath & "\" & subkey, arrValueNames(I), sValue
                        WScript.Echo " : " & arrValueNames(I) & " = " & sValue

                End Select
            Next
        end if

        ' Enumerate sub-subkeys
        objReg.EnumKey HKEY_LOCAL_MACHINE, _
         strKeyPath & "\" & subkey, arrSubKeys2
        For Each subkey2 In arrSubKeys2
            Wscript.Echo " - " & subkey2

            objReg.EnumValues HKEY_LOCAL_MACHINE, _
             strKeyPath & "\" & subkey & "\" & subkey2, arrValueNames2, arrValueTypes2
            if isarray(arrValueNames2) Then
                ValueNamesCount2= UBound(arrValueNames2)
                For I=0 To ValueNamesCount2

                    Select Case arrValueTypes2(I)
                    Case REG_SZ
                        objReg.GetStringValue HKEY_LOCAL_MACHINE, _
                         strKeyPath & "\" & subkey & "\" & subkey2, arrValueNames2(I), sValue2
                        WScript.Echo "    : " & arrValueNames2(I) & " = " & sValue2
                    Case REG_EXPAND_SZ
                        objReg.GetExpandedStringValue HKEY_LOCAL_MACHINE, _
                         strKeyPath & "\" & subkey & "\" & subkey2, arrValueNames2(I), sValue2
                        WScript.Echo "    : " & arrValueNames2(I) & " = " & sValue2

                    End Select
                Next
            end if
        Next
    Next
    View user's profile Visit poster's website
    Find install source in Windows registry for program
      Group29 Discussion Board Forum Index -> Group29 Tech Tips
    You cannot post new topics in this forum
    You cannot reply to topics in this forum
    You cannot edit your posts in this forum
    You cannot delete your posts in this forum
    You cannot vote in polls in this forum
    All times are GMT - 6 Hours  
    Page 1 of 1  

      
      
     Post new topic  Reply to topic  


    Powered by phpBB © 2001-2003 phpBB Group
    Theme created by Vjacheslav Trushkin
    Forums ©
    Group29 Productions

    All logos and trademarks in this site are property of their respective owner. The comments are property of their posters, all the rest (c) 2006 by Group29 Productions.


    You can syndicate Group29 Productions news with an RSS Feeder using the file backend.php


    PHP-Nuke Copyright © 2005 by Francisco Burzi. This is free software, and you may redistribute it under the GPL. PHP-Nuke comes with absolutely no warranty, for details, see the license.
    Page Generation: 0.27 Seconds

    :: HeliusGray phpbb2 style by CyberAlien :: PHP-Nuke theme by www.nukemods.com ::