This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Need INSTALLDIR multiple times
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Nov 12, 2007
02:34 PM
INSTALLDIR - Basic MSI. Value was okay, but now it is empty
Hi all,
I had imported an existing IS 10.5 Basic MSI project in IS 2008 planning to make some improvements to the project.
During testing the INSTALLDIR was always blank causing ChangeDirectory( INSTALLDIR ) to fail in some of my Custom Actions when they tried to launch programs in the installed path.
I gave up and start a fresh project in IS 2008. All was well until close to the end of the project recreation when I started adding Custom Actions and properties again. Now INSTALLDIR is blank again. I tried backing out some of the last additions, but INSTALLDIR remains blank.
In the Install-Execute sequences, my Custom Actions are located:
- Between RemoveFolders and CreateFolders
- Between WriteRegistryValues and WriteIniValues
I noticed that the standard sequencing differs considerably from IS 10.5 and suspect it is a sequencing issue.
Any idea what may suddenly cause the INSTALLDIR value to be empty when it was okay?
Thanks in advance.
Ken Hartlen
I had imported an existing IS 10.5 Basic MSI project in IS 2008 planning to make some improvements to the project.
During testing the INSTALLDIR was always blank causing ChangeDirectory( INSTALLDIR ) to fail in some of my Custom Actions when they tried to launch programs in the installed path.
I gave up and start a fresh project in IS 2008. All was well until close to the end of the project recreation when I started adding Custom Actions and properties again. Now INSTALLDIR is blank again. I tried backing out some of the last additions, but INSTALLDIR remains blank.
In the Install-Execute sequences, my Custom Actions are located:
- Between RemoveFolders and CreateFolders
- Between WriteRegistryValues and WriteIniValues
I noticed that the standard sequencing differs considerably from IS 10.5 and suspect it is a sequencing issue.
Any idea what may suddenly cause the INSTALLDIR value to be empty when it was okay?
Thanks in advance.
Ken Hartlen
(7) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Nov 12, 2007
04:32 PM
Ken Hartlen wrote:
In the Install-Execute sequences, my Custom Actions are located:
- Between RemoveFolders and CreateFolders
- Between WriteRegistryValues and WriteIniValues
Its not the location of the Custom Actions, it is the In-Script Execution type.
My Custom Actions are "Deferred" and as soon as I change them to "Immediate" then INSTALLDIR is set. But, now the Custom Actions don't work since they need to be Deferred.
Ken
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Nov 12, 2007
04:38 PM
To read a property during deferred mode, you'll need to go through CustomActionData; please see the docs linked from the sticky post at the top of this forum for more information. Searching these forums for "CustomActionData" will turn up many examples, too.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Nov 14, 2007
04:04 PM
Okay, let see if I have this straight. After reading up on CustomActionData and getting the sample from the IS2008 Help working...
I have several deferred Custom Actions that use INSTALLDIR. So, for each Custom Action, I need to create a Set-a-Property Custom action and set the Property Value whose Property Name must match the Custom Action that uses the said Property Name?
I have five deferred Custom Actions needing INSTALLDIR, so I would need five Set-a-Property Custom Actions and five unique Properties Names?
And, this functional change was done to accommodate installations on MS Vista?
Thanks.
Ken
I have several deferred Custom Actions that use INSTALLDIR. So, for each Custom Action, I need to create a Set-a-Property Custom action and set the Property Value whose Property Name must match the Custom Action that uses the said Property Name?
I have five deferred Custom Actions needing INSTALLDIR, so I would need five Set-a-Property Custom Actions and five unique Properties Names?
And, this functional change was done to accommodate installations on MS Vista?
Thanks.
Ken
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Nov 19, 2007
03:00 PM
Well that was fun!
The nice and simple use of INSTALLDIR, etc. has evolved into a land mine of interdependent CustomActions and Property Names now.
Lots of comments in the script so I don't forget how this works several months from now.
Ken
The nice and simple use of INSTALLDIR, etc. has evolved into a land mine of interdependent CustomActions and Property Names now.
Lots of comments in the script so I don't forget how this works several months from now.
Ken
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Mar 03, 2008
09:14 PM
Using either Windows Installshield 12 Professional or Installshield 2008 premier editon.
I have custom actions with Deferred Execution in System context which also has a CustomActionData associated with it.
If on XP I choose Remove from Add/Remove programs then INSTALLDIR is an empty string. If I choose Change & then choose remove INSTALLDIR contains the directory I installed my files in.
The same behaviour happens on Vista except that it's empty with Uninstall & correct with Change & then choose remove.
What am I doing wrong?
I tried to verify my basic MSI & CustomAction script was setup as per your recommendation, I never found the correct link.
This link http://knowledge.macrovision.com/selfservice/microsites/search.do?cmd=displayKC&docType=kc&externalId=Q112115&sliceId= has an item for me to select but just takes me to the same page. I selected "Discussion on Basic MSI Projects with InstallScript Custom Actions" which didn't work.
I can't sign in as we don't have a maintenance plan.
I have custom actions with Deferred Execution in System context which also has a CustomActionData associated with it.
If on XP I choose Remove from Add/Remove programs then INSTALLDIR is an empty string. If I choose Change & then choose remove INSTALLDIR contains the directory I installed my files in.
The same behaviour happens on Vista except that it's empty with Uninstall & correct with Change & then choose remove.
What am I doing wrong?
I tried to verify my basic MSI & CustomAction script was setup as per your recommendation, I never found the correct link.
This link http://knowledge.macrovision.com/selfservice/microsites/search.do?cmd=displayKC&docType=kc&externalId=Q112115&sliceId= has an item for me to select but just takes me to the same page. I selected "Discussion on Basic MSI Projects with InstallScript Custom Actions" which didn't work.
I can't sign in as we don't have a maintenance plan.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Mar 04, 2008
07:56 AM
Sorry about the problem in the KB article. I'll see if that can be fixed as soon as possible. In the meantime, the same content is available in the InstallShield Help Library that is installed with InstallShield, and it is also available on the HelpNet site. I believe that the name of the help topic that you'll want to see is Upgrading InstallShield 11.5 or Earlier Basic MSI Projects that Have InstallScript Custom Actions.
I hope that helps.
Debbie Landers
Macrovision Corporation
I hope that helps.
Debbie Landers
Macrovision Corporation
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Mar 04, 2008
06:54 PM
Had to move my SetProperty custom actions after InstallInitialise, I had them earlier which is why they failed on the uninstall case.