Adding a custom action in Wise
I've got a wisescript that runs an executable on the network compiled into an exe. I'm trying to insert this into an MSI with Wise. The exe, when run independently, performs as expected.
When I run the MSI, I get 'Internal Error 2762'
I'm running the custom action in the execute immediate process. What am I doing wrong?
When I run the MSI, I get 'Internal Error 2762'
I'm running the custom action in the execute immediate process. What am I doing wrong?
0 Comments
[ + ] Show comments
Answers (6)
Please log in to answer
Posted by:
wiseapp
19 years ago
Posted by:
VikingLoki
19 years ago
First decide where you want to launch the .exe from. If it's a one shot launched only during install and never used again, use "Execute Program from installation" to imbed the .exe into the Binary Table and have it run from within the MSI. If it is used after installation and needs to remain on the workstation, add the .exe to the MSI/MST and select the "Execute Program from Installed Files" CA.
Insert the CA into the MSI Script immediately before InstallFinalize at the bottom of Execute Deferred. That will make the last step of the MSI install to run that .EXE file. (This is the most common location for CAs, BTW)
Insert the CA into the MSI Script immediately before InstallFinalize at the bottom of Execute Deferred. That will make the last step of the MSI install to run that .EXE file. (This is the most common location for CAs, BTW)
Posted by:
Bladerun
19 years ago
Excellent, that worked like a charm. I set the CA to run in the sequence you mentioned Viking, using Execute Program from Installation.
Is there any difference between "Execute Program..." and "Execute Wisescript..." in this scenario?
EDIT: 1 more follow up question: If I follow the above procedure, and AlwaysInstallElevated is set properly, will the command that the wise script is calling also run elevated?
Is there any difference between "Execute Program..." and "Execute Wisescript..." in this scenario?
EDIT: 1 more follow up question: If I follow the above procedure, and AlwaysInstallElevated is set properly, will the command that the wise script is calling also run elevated?
Posted by:
wiseapp
19 years ago
Hi Blade:
Good to hear your problem was solved mate
With reference to your follow up questions here are the answers:
1. Execute program from installation/destination executes any exe that you specify
2. Execute Wise Script from destination/installation will ony allow you to select WSE files that are made using Wise Script editor.
3. If you set AlwaysInstallElevated in your MSI then only the MSI that you're trying to execute will be elevated now this depends even on ur organisational GP(group policies) since in our org. the elevated rights key after installation automatically gets deleted so only the MSI can be executed.
I hope this would answer your questions.
Good to hear your problem was solved mate
With reference to your follow up questions here are the answers:
1. Execute program from installation/destination executes any exe that you specify
2. Execute Wise Script from destination/installation will ony allow you to select WSE files that are made using Wise Script editor.
3. If you set AlwaysInstallElevated in your MSI then only the MSI that you're trying to execute will be elevated now this depends even on ur organisational GP(group policies) since in our org. the elevated rights key after installation automatically gets deleted so only the MSI can be executed.
I hope this would answer your questions.
Posted by:
Bladerun
19 years ago
I believe that it does. AlwaysInstallElevated is permanently set in Group policy, so then the command that my wisescript is running should also run elevated, correct?
Interesting point too, I never even thought to set the AlwaysInstallElevated key in a package. I'll have to keep that in mind for future use. [:)]
Interesting point too, I never even thought to set the AlwaysInstallElevated key in a package. I'll have to keep that in mind for future use. [:)]
Posted by:
MSIPackager
19 years ago
I never even thought to set the AlwaysInstallElevated key in a package
I wouldn't have said this was good packaging practice - I'd leave this sorta stuff to be handled by group policy if I were you. RE your custom action question - if you have placed it in execute deferred you can set the CA to run in system context if you need elevated rights...
Cheers,
Rob.
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
so that the conversation will remain readable.