View Full Version : SB5: Remember Installation Folder Between Installs??
NewsArchive
02-03-2005, 03:11 AM
[Wednesday, February 02, 2005 9:44 PM]
I need to make the default installation folder C:\INA. But the user is allowed
to change that. How do I set the default AND remember the installation folder
between installs? In SB4 I added some registry settings to do this. I have
tried this in SB5 and the registry setting IS getting inserted but when I
install again, that setting is NOT being read back in.
What am I missing??
Thanks
Chris
NewsArchive
02-05-2005, 10:23 AM
[Thursday, February 03, 2005 1:48 PM]
Chris,
You can use the "Detect Previous Version script" item. Please use the same
Product GUID here.
Somethig like the following:
....
....
Set Variable %_SB_INSTALLDIR% to [INSTALLDIR]
Set Variable %_SB_PROGRAMGROUP% to [PRODUCTNAME]
! %SB_BACKUPDIR% holds the path that all backup files will be copied to when
overwritten
Set Variable %_SB_BACKUPDIR% to %_SB_INSTALLDIR%\BACKUP
Set Variable %_SB_INSTALLDIR% to Detect Previous Version
("{B1C06C90-696B-11D9-72AE-01631BD32CD6}")
....
....
Does this help?
Friedrich
--
Friedrich Linder
www.lindersoft.com
Fax: 1.954.252.3910
NewsArchive
02-05-2005, 10:24 AM
[Thursday, February 03, 2005 4:26 PM]
>Chris,
>
>You can use the "Detect Previous Version script" item. Please use the same
>Product GUID here.
Friedrich,
I'm curious about this. Where in tne registry is the GUID stored? I'm
guessing GUID use originated from the MSI part of the design. Do you happen
to have an MSDN reference where MS discusses the GUID and MSI?
>
>Somethig like the following:
>
>....
>....
>
>Set Variable % SB INSTALLDIR% to [INSTALLDIR]
>Set Variable % SB PROGRAMGROUP% to [PRODUCTNAME]
>
>! %SB BACKUPDIR% holds the path that all backup files will be copied to when
>overwritten
>Set Variable % SB BACKUPDIR% to % SB INSTALLDIR%\BACKUP
>
>Set Variable % SB INSTALLDIR% to Detect Previous Version
>("{B1C06C90-696B-11D9-72AE-01631BD32CD6}")
>
>....
>....
>
>Does this help?
>
>Friedrich
--
Best regards,
Mark
NewsArchive
02-05-2005, 10:24 AM
[Friday, February 04, 2005 4:15 PM]
Mark,
SB5 stores the Product GUID is under:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Curr entVersion\Uninstall
The Product GUID uniquely identifies your product. For example:
The SB5 Developer Edition Product GUID is:
{4D910660-BBBC-11D8-6784-02015E7D18BE}
The SB5 Professional Edition Product GUID is:
{B1C06C90-696B-11D9-72AE-01631BD32CD6}
You can use this GUID in the "Detect Previous Version" script item to
get the installation path.
Unfortunately, I don't have a good link available :-(
Friedrich
--
Friedrich Linder
www.lindersoft.com
Fax: 1.954.252.3910
NewsArchive
02-05-2005, 10:25 AM
[Friday, February 04, 2005 5:06 PM]
>Mark,
>
>SB5 stores the Product GUID is under:
>HKEY LOCAL MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\ Uninstall
>
>The Product GUID uniquely identifies your product. For example:
>
>The SB5 Developer Edition Product GUID is:
>{4D910660-BBBC-11D8-6784-02015E7D18BE}
>
>The SB5 Professional Edition Product GUID is:
>{B1C06C90-696B-11D9-72AE-01631BD32CD6}
>
>You can use this GUID in the "Detect Previous Version" script item to
>get the installation path.
>
>Unfortunately, I don't have a good link available :-(
Thanks, Friedrich. I spent some time on MSDN yesterday and discovered there
is a large amount of info. about this stuff. Far too much for my tiny brain
to assimilate.
--
Best regards,
Mark
NewsArchive
02-05-2005, 10:25 AM
[Thursday, February 03, 2005 4:48 PM]
Do I insert this script into my install script? If yes, where at?
Thanks.
NewsArchive
02-05-2005, 10:26 AM
[Thursday, February 03, 2005 4:52 PM]
I see where you are refering to in the script but I have no ida on how to
insert anything into the script. Is there any help or documentation available
yet, I need some serious help with SB5.
Thanks.
Chris
NewsArchive
02-05-2005, 10:26 AM
[Friday, February 04, 2005 4:24 PM]
Chris,
You have several options. You can drag a function from the "Script Items"
list and drop it to the Script. You can also double click a script item to
add it to the Script.
Does this help?
Friedrich
--
Friedrich Linder
www.lindersoft.com
Fax: 1.954.252.3910
NewsArchive
02-05-2005, 10:26 AM
[Thursday, February 03, 2005 5:07 PM]
I inserted the script item and it looks like this:
Set Variable %_SB_INSTALLDIR% to Detect Previous Version
("13F6C030-74AC-11D9-6784-3FB8784F18BE")
I copied the Product GUID from the main window Product GUID but it didn't
retreive the install path.
I changed the script item to:
Set Variable %_SB_INSTALLDIR% to Detect Previous Version
("{13F6C030-74AC-11D9-6784-3FB8784F18BE}")
and that also didn't work.
What might I be doing wrong?
Thanks.
NewsArchive
02-05-2005, 10:27 AM
[Friday, February 04, 2005 4:20 PM]
Hi Chris,
I have attached a screenshot. This script detects and uses the installation
path of SetupBuilder 5 Developer Edition.
The SB5 Developer Edition Product GUID is:
{4D910660-BBBC-11D8-6784-02015E7D18BE}
....
....
! If destination system is running ME/98/95, the built-in variable
{SYS32DIR} automatically points to {SYSDIR}
Set Variable %SYS32DIR% to {SYS32DIR}
! If destination system does not have a writable Windows\System folder,
system files will be written to the Windows\ folder
If %SYS32DIR% Folder is not writable Then
Set Variable %SYS32DIR% to %WINDIR%
End
! Important: Initialize default install folder and program group variables
Set Variable %_SB_INSTALLDIR% to [INSTALLDIR]
Set Variable %_SB_PROGRAMGROUP% to [PRODUCTNAME]
! %SB_BACKUPDIR% holds the path that all backup files will be copied to when
overwritten
Set Variable %_SB_BACKUPDIR% to %_SB_INSTALLDIR%\BACKUP
Set Variable %_SB_INSTALLDIR% to Detect Previous Version
("{4D910660-BBBC-11D8-6784-02015E7D18BE}")
Message Box "%_SB_INSTALLDIR%" -- "Result"
....
....
Does this help?
Friedrich
--
Friedrich Linder
www.lindersoft.com
Fax: 1.954.252.3910
NewsArchive
02-05-2005, 10:27 AM
[Friday, February 04, 2005 6:33 PM]
My code 'appears' to match what you have but SB5 is not pulling the last
installed path. It is using the default install path. I am lost. Can you take
a look at my SB5 file and see what I am missing?
Also, when I insert the Detect Previous Install script item, can it default to
using the Product GUID by itself since that is already defined to the install
script? That way we / I don't have to copy & paste it. I know this is a small
item but it helps.
Thanks
NewsArchive
02-05-2005, 10:27 AM
[Friday, February 04, 2005 6:54 PM]
Chris,
> My code 'appears' to match what you have but SB5 is not pulling the last
> installed path. It is using the default install path. I am lost. Can you
> take
> a look at my SB5 file and see what I am missing?
Of course! Please send your script to friedrich (at) lindersoft (dot) com.
But I am going home now (it was a long night and I look like a Zombie <g>).
I'll be back tomorrow morning.
> Also, when I insert the Detect Previous Install script item, can it
> default to
> using the Product GUID by itself since that is already defined to the
> install
> script? That way we / I don't have to copy & paste it. I know this is a
> small
> item but it helps.
Good idea. I'll add this.
Thanks,
Friedrich
--
Friedrich Linder
www.lindersoft.com
Fax: 1.954.252.3910
NewsArchive
02-05-2005, 10:28 AM
[Friday, February 04, 2005 6:49 PM]
One more item. After I install my application, I search the registry for my
product GUID and it is not found. I can find the SB5 Develoers GUID but not my
install programs. WHy isn't my GUID in the registry?
Thanks.
NewsArchive
02-05-2005, 10:28 AM
[Friday, February 04, 2005 6:55 PM]
Do you have the uninstall capability enabled?
Thanks,
Friedrich
NewsArchive
02-05-2005, 10:29 AM
[Friday, February 04, 2005 7:04 PM]
Yes, and that works fine.
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.