1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Can I use the REG command for this

Discussion in 'Scripting & Programming' started by dales, Mar 10, 2009.

  1. dales

    dales Gigabyte Poster

    Hi all,

    I'm trying to create a batch file that uninstalls a product before rolling out its new version. However the product (groupwise) when its installed creates itself in the registry as a random key in currentversion\uninstall section of the registry so I cannot simply do a reg query "blah/blah/groupwise uninstallstring"

    Does anyone know of the right way I should be doing this by either searching all the keys in uninstall checking for groupwise and then retrieving the uninstallstring, or is there another tool i can use to do this task (the tool has to be referenced by all computers so it can find the random key).

    After I can retrieve the key I can set it as a variable and instigate the uninstall routine.
    Certifications: vExpert 2014+2015+2016,VCP-DT,CCE-V, CCE-AD, CCP-AD, CCEE, CCAA XenApp, CCA Netscaler, XenApp 6.5, XenDesktop 5 & Xenserver 6,VCP3+5,VTSP,MCSA MCDST MCP A+ ITIL F
    WIP: Nothing
  2. greenbrucelee
    Highly Decorated Member Award

    greenbrucelee Zettabyte Poster

    Not sure if this is really what you want but you could try this. I am not sure if it works I have just come across it in my office it will update the code in the registry for a product

    You can get the upgrade code of an existing application by enabling Windows Installer logging and running a Repair of that application from Control Panel.

    1. Load the registry key file
    2. Clear our your Local Settings\Temp folder
    3. Run a Repair from Add/Remove Programs in Control Panel
    4. Look for a log file in the Temp folder. It will have a random filename
    5. Look for a line that says "UpgradeCode =" - this will be your upgrade code
    Certifications: A+, N+, MCDST, Security+, 70-270
    WIP: 70-620 or 70-680?
  3. kevicho

    kevicho Gigabyte Poster

    Certifications: A+, Net+, MCSA Server 2003, 2008, Windows XP & 7 , ITIL V3 Foundation
    WIP: CCNA Renewal

Share This Page