πŸš€ go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: control
Article #166

Re: Question from the IS Challenged

#166
From: Robert H. Morrison
Date: Wed, 24 Jun 1998 00:00
97 lines
4745 bytes
Assuming you are using the same UnInstall Key then you can use:

    //
    //  We want UnInstall a previous version of APPLICATION
    //  so we will have to query the registry to find out if there is a version
	//	currently installed or not.  If installed then we obtain (at the same
	//	time and for no extra cost) the exact command that we must execute in
	//	order to UnInstall the previous version of the APPLICATION.
	//

    nRootKey = HKEY_LOCAL_MACHINE;

    if ( ! RegDBSetDefaultRoot( nRootKey )) then
        szKey  = "\\Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\" + @UNINST_KEY;
        szName = "UninstallString";
        nvType = REGDB_STRING;

        //
        //  If APPLICATION is already installed on this system
		//	then we want to ASK the USER if we should UnInstall it first...
        //

        if ( ! RegDBGetKeyValueEx( szKey, szName, nvType, szUninstallPath, nvSize )) then
			szMsg = Product_Name + @ASK_DEL_PREV_APP;

			nResult = AskYesNo( szMsg, YES );

			if ( nResult = YES ) then
				nvIndex = StrFind( szUninstallPath, "-f" );

				if ( nvIndex >= 0 ) then
					StrSub( szProgram, szUninstallPath, 0, nvIndex );
					StrSub( szCmdLine, szUninstallPath, nvIndex, StrLength( szUninstallPath ) - nvIndex );

					LaunchAppAndWait ( szProgram, szCmdLine, WAIT );
				endif;
			endif;
        endif;

        nRootKey = HKEY_CLASSES_ROOT;
        RegDBSetDefaultRoot( nRootKey );
    endif;

-- 
Best regards,
 _ __                      _    ,   _ _ _
' )  )     /         _/_  ' )  /   ' ) ) )
 /--' ____/___/> __  /     /--/     / / / __,_  __  o _   ______
/  \_(_) /_) (__/ (_<__   /  ( o   / ' (_(_) (_/ (_<_/_)_(_) / <_

Robert H. Morrison                      Tel:   +49 721 9628 167
Software Development, Basis Team        FAX:   +49 721 9628 261
Hitex-Systementwicklung GmbH            Email: RMorrison@hitex.de


Stefan KrοΏ½ger <skrueger@usa.net> schrieb im Beitrag <358f5e62.0@news.installshield.com>...
> Tom,
> I suggest that you first decide which product you are using, and post your
> question only to the appropriate newsgroup, instead of spamming all the
> groups on the InstallShield news server.
> 
> Then there is a discription and an example for any InstallShield function in
> online help, that should get you started.
> 
> If you don't have the time to learn InstallShield, you can visit
> http://www.ibv-tools.de to find someone to create the setup for you.
> 
> Regards,
> 
> Stefan Krueger
> Software Engineer
> skrueger@usa.net
> 
> *** InstallSite - Free resources for setup developers
> *** http://www.ibv-tools.de
> 
> 
> TOM COLSON schrieb in Nachricht <358e8c1e.0@news.installshield.com>...
> >I have no need or time to discover the ins and outs of IS, but find my self
> >in the position where I have to use it. Thus, to get to the point, I need
> >someone to point me in the right direction concerning the regdbgetkeyex
> >function: I need to get a value from a particular key, ie an install
> >directory, then pass this value on to the deldir function. as you probably
> >guessed, i need the setup script to search for and delete any previous
> >installs of my package. I have figured out how to clean up the registry,
> but
> >this deleting the directory&files has me stumped, because the install dir
> >can vary from machine to machine, and i need this to be verybrain dead(like
> >my users). thank you very much, please em response to
> >thomas.colson@seer.com
> >thanx in advance
> >
> >
> 
> 
> 
Technical Details
Message-ID: <01bd9f7d$7414f1e0$40563fc3@hitex_mo.hitex.de>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <358e8c1e.0@news.installshield.com> <358f5e62.0@news.installshield.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII
X-Google-Thread: 103dfa,a474ab19d123aed0
X-Google-Attributes: gid103dfa,public
X-Google-Thread: fa732,a474ab19d123aed0
X-Google-Attributes: gidfa732,public
X-Google-Thread: 129da7,a474ab19d123aed0
X-Google-Attributes: gid129da7,public
X-Google-Thread: 136df1,a474ab19d123aed0
X-Google-Attributes: gid136df1,public
X-Google-Thread: 1125f3,a474ab19d123aed0
X-Google-Attributes: gid1125f3,public
X-Google-Thread: 16962a,a474ab19d123aed0
X-Google-Attributes: gid16962a,public
X-Google-Thread: 11097a,a474ab19d123aed0
X-Google-Attributes: gid11097a,public
From: "Robert H. Morrison" <RMorrison@hitex.de>
Subject: Re: Question from the IS Challenged
Date: 1998/06/24
Message-ID: <01bd9f7d$7414f1e0$40563fc3@hitex_mo.hitex.de>
X-Deja-AN: 365656165
References: <358e8c1e.0@news.installshield.com> <358f5e62.0@news.installshield.com>
Organization: Hitex
Newsgroups: control,control.cancel,installfromtheweb.client,installfromtheweb.security,installfromtheweb.wishlist,installshield.express.delphi,installshield.express.general,installshield.express.vb,installshield.is5.dialogs,installshield.is5.extensibility