
snw19701.5524940817826768E12 asked a question.
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
Assuming I'm understanding you correctly, you could easily enough handle this with a single MSI file. Basically, you would create a 'System Search' to find the folder (Installation Designer -> Behavior and Logic -> System Search), and then store the folder path in a property (i.e. FOLDERFOUND), then use the property in the following conditions:
Action 1 condition (folder doesn't exist): NOT FOLDERFOUND
Action 2 condition (folder exists): FOLDERFOUND
If I'm understanding you right, these custom actions are basically wrapping another installer, and handling maintenance configuration of an XML file.
Assuming I'm understanding you correctly, you could easily enough handle this with a single MSI file. Basically, you would create a 'System Search' to find the folder (Installation Designer -> Behavior and Logic -> System Search), and then store the folder path in a property (i.e. FOLDERFOUND), then use the property in the following conditions:
Action 1 condition (folder doesn't exist): NOT FOLDERFOUND
Action 2 condition (folder exists): FOLDERFOUND "
Yes basically the 2 vbscripts edit the configuration of an xml file. The first VBScript edits changes to an XML file upon an upgrade. The second script edits the file with new numbers and places those in the correct area of the xml files being edited.
Now I had already created a System Search String before seeing this reply, so I am following you there. I am pretty sure you are understanding what I am trying to accomplish. And REALLY appreciate it. :D
Questions:
Do I need to create "FOLDERFOUND" in the property table?
What I would like to do is:
Action 1 condition (folder doesn't exist): NOT FOLDERFOUND
If folder does not exist goto custom action NewInstall.vbs
Action 2 condition (folder exists): FOLDERFOUND
If folder(s) exist goto custom action upgrade.vbs
Thanks again for any help! I really appreciate it.
Yes basically the 2 vbscripts edit the configuration of an xml file. The first VBScript edits changes to an XML file upon an upgrade. The second script edits the file with new numbers and places those in the correct area of the xml files being edited.
Now I had already created a System Search String before seeing this reply, so I am following you there. I am pretty sure you are understanding what I am trying to accomplish. And REALLY appreciate it. :D
Questions:
Do I need to create "FOLDERFOUND" in the property table?
What I would like to do is:
Action 1 condition (folder doesn't exist): NOT FOLDERFOUND
If folder does not exist goto custom action NewInstall.vbs
Action 2 condition (folder exists): FOLDERFOUND
If folder(s) exist goto custom action upgrade.vbs
Thanks again for any help! I really appreciate it. "
You're on the right track, definitely. FOLDERFOUND shouldn't actually exist in the property table beforehand. It will get created by the System Search as long as that's the property you used when you went through the System Search Wizard.
Other than that, you just have to create your custom actions, schedule them, and use the above conditions.
Choose the item you want to search from the list below:
"Folder path, by searching in a specific folder
Next
Foldername:
DDX
A full path:
ProgramFilesFolder
Store the value in this property:
This is where I am confused, I only recieve a drop down box from here that shows a few properties like : ARPRODUCTION, DWUSLINK, etc. Should this not create itself at this point?
Also after I go back into custom Actions I run the wizard to get to the location for the sequence and that is After Upgrade:
Install UI Condition - here is the location I need to add my condition(s) correct? When I bring down the properties drop down I do not see ARPRODUCTION. Would this be the correct location I need to add these conditions? Sorry for being a pest!
So, at the end of the system search wizard, you'll get a list of properties that already exist in the Property table. You'll want to type your own unique property here at this point, so something like 'DDXFOUND' would work.
Then, when you're creating conditions in the Condition Builder, only a few of the most commonly used properties are available. You'll just want to type in the name of your property that you used before.
Ahh, I see where you're getting confused here.
So, at the end of the system search wizard, you'll get a list of properties that already exist in the Property table. You'll want to type your own unique property here at this point, so something like 'DDXFOUND' would work.
Then, when you're creating conditions in the Condition Builder, only a few of the most commonly used properties are available. You'll just want to type in the name of your property that you used before. "
I really can't believe I did not notice you were able to type your own unique property in that location. Anyways thanks, I really appreciate this help. So now that I have this created my folder search is now named DDXFOUND.
Although I am having a bit of a problem once again.(Suprise). ;) I go into the custom actions wizard and I have the following set:
Name Upgrade
Next :
Type: Run VBScript code
Stored Directly in the custom action
Next - Next
Both checked - wait for the action to finish and ignore custom action return code.
In-Script Execution set to Immediate Execution
Execution Scheduling Always Execute
Here is where I think my install fails:
I have:
Install UI Sequence
After ExecutionAction
Install UI Condition
DDXFOUND
In the condition builder I just have IDXFOUND.
For the new install I have :
Install UI Sequence:
After Upgrade(.vbs)
Install UI Condition:
NOT DDXFOUND
So I rebuild the MSI and then launch and it fails immediatley with the following in the log file:
MSI (s) (4C:28) [16:55:07:496]: Note: 1: 1708
MSI (s) (4C:28) [16:55:07:496]: Product: DDE 3.0 -- Installation operation failed.
MSI (s) (4C:28) [16:55:07:496]: Cleaning up uninstalled install packages, if any exist
MSI (s) (4C:28) [16:55:07:496]: MainEngineThread is returning 1603
=== Logging stopped: 7/24/2007 16:55:07 ===
MSI (c) (A8:80) [16:55:07:512]: Decrementing counter to disable shutdown. If counter >= 0, shutdown will be denied. Counter after decrement: -1
MSI (c) (A8:80) [16:55:07:512]: MainEngineThread is returning 1603
=== Verbose logging stopped: 7/24/2007 16:55:07 ===
I know this is something in my conditions and the way I have my Custom Actions set. Would you know by looking at this what I have done wrong?
Usually, issues with condtions only manifest themselves as errors when something is running when it shouldn't be, though. I would say to upload the full logfile, as well as some notes on what action should be running, and what action shouldn't be running. We should be able to see who's who then.
Thanks again if you have any ideas while I wait to get the log file please feel free to post. ;)
Sequences > Installation >and under ExecuteAction is the location of my two vbscripts:
Run_NewInstall
Sequence Number 1267
Conditions NOT IDXFOUND
Under that I have Upgrade
Sequence Number 1295
Conditions IDXFOUND
Any ideas? I would be happy to send you the log file if you would like to look it over if you have anytime.