cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

CustomAction Help

Hello,

I am currently working on a project and am pretty new with AdminStudio. In the past with the said application someone created 2 MSI's, one for an upgrade and one for a new install. Basically these two installers are two seperate vbscripts that run under custom actions during install. I really would like to combine these two to make things much easier.

Would there be a way to check to see if a folder exists and if so Run NewInstall custom action and if not run upgrade install? I understand this probably is not the way to do things and there probably much easier ways which I am learning slowly. But I need a quick fix with this:

Custom Action 1 = newinstall.vbs - Runs a new install then runs vb script and edits an xml file.

Custom Action 2 = Run Upgrade.. this just runs another script and edits the xml files currently on the system.


If I do not make any sense please give me a chance and I will try to explain more in detail.

Thanks
(25) Replies
I am also banging my head against the wall on a simple icon file. I am unable to get this set correctly. I am trying to create a shortcut with the correct icon under the all users folder. Sigh.. 😞

It keeps creating this icon file for the user that installs the app under:

C:\Documents and Settings\username\Application Data\Microsoft\Installer\{E9DE01AE-CF0C-44DA-B2B1-79E7C8009A7B}

%APPDATA%\Microsoft\Installer\{E9DE01AE-CF0C-44DA-B2B1-79E7C8009A7B}\idxshortcut_E9DE01AECF0C44DAB2B179E7C8009A7B.exe

I go into icon properties create the icon then I set the shortcut properties to but still I am getting this installed above?
I'm still not sure I understand what differentiates an 'Upgrade' from a 'Reinstall' for you, but perhaps this will help.

You say that you're trying to 'Add Another number', which I assume you would get from a user somehow. Now, the value would necessarily be stored in a property (which we'll call 'NEWVAL'), which you could then use in conditions like so:

Upgrade.vbs: DDXFOUND
NewInstall.vbs: (NOT DDXFOUND) OR NEWVAL


Now, in the case that your 'Upgrade' and 'NewInstall' scripts both run for a clean install of the MSI package (which only differs by the presence of the folder), then what you could do for Maintenance is condition the action off of the 'Installed' property:

Upgrade.vbs: DDXFOUND
NewInstall.vbs: (NOT DDXFOUND) OR Installed

Near as I can figure, one of these approaches should match what you're actually going for.
Thanks for the help once again that pretty much helped me with that question. Also on the icon question I gave up on that and just ran a custom action to copy the file I needed to the all users folder with a vbscript(CA).

I have a new question (Are you suprised yet?). I would like to do a nested install with Java version 1.4_08. I understand this is not the best direction to take but I need this for a web install. After going to CA's and runing New Nested MSI I put all my information in and then save the project. I run the application and everything seems to be working then the installer fails. After looking at the logs it appears maybe they are both trying to run at the same time? I have read over a few nested installs on this board but am a little confused so I thought I might as my guru for help once again. What would be the best way to do this?

New Nested MSI
Inside the package
Source Target=ALLUSERS=[ALLUSERS] ADDLOCAL=ALL
Execution Scheduling = Always execute

Confused where to put the Install UI Sequence or Install Execute Sequence here is where I think I maybe messing things up. Would you be able to give me a little direction with this?
::wince::

Nested MSI's can be really difficult to make work for you. Microsoft doesn't even recommend them anymore (although, they use the word 'Deprecated').

http://msdn2.microsoft.com/en-us/library/aa368010.aspx

Basically, you need to drop them in the Execute sequence between InstallInitialize and InstallFinalize and run them in Immediate execution.

Reading through the article above, you'll probably see some of the drawbacks of the nested MSI route:

--Non-functional Add/Remove Programs entry (typically, you set ARPSYSTEMCOMPONENT to hide them)
--Difficult to maintain (i.e. target with upgrades)
--Difficult to troubleshoot if they fail

These are the ones I can think of off the top of my head. More recommended options are:

--Calling Msiexec.exe as a Custom Action from the UI sequence
--Creating a setup prerequisite that gets launched from Setup.exe

How to do all of these things is documented fairly well in the InstallShield help. See: 'Nested Installations', 'Using Msiexec.exe to Launch a Second Windows Installer Setup', 'Setup Prerequisites'
Yes I really did not want to mess with nested installs from reading the microsoft site and other posts from this board. I went with Prerequisite and this worked like a charm. Just about finished and everyone is happy. Thanks for all the help. I really appreciate it.