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
- :
- custom actions just refusing to work!!!
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 24, 2010
04:16 PM
custom actions just refusing to work!!!
We have a couple custom actions that were first to just trigger some batch files, but they just did not seem to work.
I use a launch executable and I have it set for the following:
Working Directory: SystemFolder
Filename & Command line: "[SystemFolder]cmd.exe" /c "[LR_TC_BIN]sat-create-portal-db.bat"
Now I was thinking that this was not working because a file required by the bat file had to be in the same folder as the bat file, but since the working folder in this case is the SystemFolder it probably could not find the file and therefore failed.
So I took the contents of the bat file and created a custom actions from them as all it is doing in launching a PostgreSQL .exe file with command line.
So I use system search to locate the PostgresSQ .exe and then call a custom action that uses the Executable Property custom actions. So it looks like the following:
Executable Property: POSTGRESQL_BIN_DIR
Command Line
And the result of this custom action is:
Action 7:05:49: Create_Portal_Database_builtin_test.
MSI (s) (F0:50) [07:05:49:750]: Executing op: CustomActionSchedule(Action=Create_Portal_Database_builtin_test,ActionType=3122,Source=C:\Program Files\PostgreSQL\8.4\Bin\,Target="C:\Program Files\PostgreSQL\8.4\Bin\psql.exe" -U postgres < "C:\Program Files\SMART Technologies\SMART Administrative Tools\liferay-portal-6.0.1\tomcat-6.0.26\bin\sat-prep-portal-db.sql",)
MSI (s) (F0:50) [07:05:49:750]: Note: 1: 1721 2:
Create_Portal_Database_builtin_test 3: C:\Program Files\PostgreSQL\8.4\Bin\ 4: "C:\Program Files\PostgreSQL\8.4\Bin\psql.exe" -U postgres < "C:\Program Files\SMART Technologies\SMART Administrative Tools\liferay-portal-6.0.1\tomcat-6.0.26\bin\sat-prep-portal-db.sql"
Error 1721. There is a problem with this Windows Installer package. A program required for this install to complete could not be run. Contact your support personnel or package vendor. Action: Create_Portal_Database_builtin_test, location: C:\Program Files\PostgreSQL\8.4\Bin\, command: "C:\Program Files\PostgreSQL\8.4\Bin\psql.exe" -U postgres < "C:\Program Files\SMART Technologies\SMART Administrative Tools\liferay-portal-6.0.1\tomcat-6.0.26\bin\sat-prep-portal-db.sql"
So does anyone have any clues as to why these custom actions are failing, where as if I run them from the command line they work as expected?
Thanks for any help.
I use a launch executable and I have it set for the following:
Working Directory: SystemFolder
Filename & Command line: "[SystemFolder]cmd.exe" /c "[LR_TC_BIN]sat-create-portal-db.bat"
Now I was thinking that this was not working because a file required by the bat file had to be in the same folder as the bat file, but since the working folder in this case is the SystemFolder it probably could not find the file and therefore failed.
So I took the contents of the bat file and created a custom actions from them as all it is doing in launching a PostgreSQL .exe file with command line.
So I use system search to locate the PostgresSQ .exe and then call a custom action that uses the Executable Property custom actions. So it looks like the following:
Executable Property: POSTGRESQL_BIN_DIR
Command Line
And the result of this custom action is:
Action 7:05:49: Create_Portal_Database_builtin_test.
MSI (s) (F0:50) [07:05:49:750]: Executing op: CustomActionSchedule(Action=Create_Portal_Database_builtin_test,ActionType=3122,Source=C:\Program Files\PostgreSQL\8.4\Bin\,Target="C:\Program Files\PostgreSQL\8.4\Bin\psql.exe" -U postgres < "C:\Program Files\SMART Technologies\SMART Administrative Tools\liferay-portal-6.0.1\tomcat-6.0.26\bin\sat-prep-portal-db.sql",)
MSI (s) (F0:50) [07:05:49:750]: Note: 1: 1721 2:
Create_Portal_Database_builtin_test 3: C:\Program Files\PostgreSQL\8.4\Bin\ 4: "C:\Program Files\PostgreSQL\8.4\Bin\psql.exe" -U postgres < "C:\Program Files\SMART Technologies\SMART Administrative Tools\liferay-portal-6.0.1\tomcat-6.0.26\bin\sat-prep-portal-db.sql"
Error 1721. There is a problem with this Windows Installer package. A program required for this install to complete could not be run. Contact your support personnel or package vendor. Action: Create_Portal_Database_builtin_test, location: C:\Program Files\PostgreSQL\8.4\Bin\, command: "C:\Program Files\PostgreSQL\8.4\Bin\psql.exe" -U postgres < "C:\Program Files\SMART Technologies\SMART Administrative Tools\liferay-portal-6.0.1\tomcat-6.0.26\bin\sat-prep-portal-db.sql"
So does anyone have any clues as to why these custom actions are failing, where as if I run them from the command line they work as expected?
Thanks for any help.
(3) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Dec 01, 2010
07:27 AM
My immediate reaction is that the quotes are probably causing you a problem. I think enclosing the [SystemFolder] inside the quotes is sending the litteral "[SystemFolder]" rather then the value of the variable [SystemFolder]...
"[SystemFolder]cmd.exe" /c "[LR_TC_BIN]sat-create-portal-db.bat"
Should be
[SystemFolder]cmd.exe /c [LR_TC_BIN]sat-create-portal-db.bat
"[SystemFolder]cmd.exe" /c "[LR_TC_BIN]sat-create-portal-db.bat"
Should be
[SystemFolder]cmd.exe /c [LR_TC_BIN]sat-create-portal-db.bat
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Dec 01, 2010
08:30 AM
Tim,
I believe that you have the string quoted correctly as I am doing the same thing.
What OS are you running on? If you are running on Vista, Windows 7, or 2008 Server you will probably need to set 'In-Script Processing' to 'Deferred Execution in System Context' to avoid permissions problems.
I believe that you have the string quoted correctly as I am doing the same thing.
What OS are you running on? If you are running on Vista, Windows 7, or 2008 Server you will probably need to set 'In-Script Processing' to 'Deferred Execution in System Context' to avoid permissions problems.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Dec 02, 2010
07:53 AM
Thanks for the replys.
Yes I was calling the .bat files in Deferred in System Context, but after looking into these bat files I fould that they they were trying to find files relative to the location of the bat file and these were what was failing as this custom action was setting the working folder to be the system32 folder.
So I updated the bat file to cd to the location where the bat file resides and then it seems to work correctly now.
Thanks,
Yes I was calling the .bat files in Deferred in System Context, but after looking into these bat files I fould that they they were trying to find files relative to the location of the bat file and these were what was failing as this custom action was setting the working folder to be the system32 folder.
So I updated the bat file to cd to the location where the bat file resides and then it seems to work correctly now.
Thanks,
![](/skins/images/8CE4FAD0DE6F3A6F9D0567434D2D2DAE/responsive_peak/images/icon_anonymous_message.png)