Introduction: This article will show to how to configure an Installer to install only if the user has sudo access else abort the Installation.
Instructions:
1. Create a new project.
2. Goto Sequence and Pre-install Sequence, Add Execute Script/Batch file action and then add the following command to check whether the user has the sudo access or not,
groups username.
Note: If you see the group ‘sudo’ in the output, the user is a member of the sudo group and it should have sudo access.
3. Add a Panel: Display message to display $EXECUTE_STDOUT$ which hold the result of groups username command.
4. Add a rule to display message panel only if
Operand 1 : $EXECUTE_STDOUT$ does not contain
Operand 2: sudo
5. Add Abort Installation plug-in to abort the installation with a rule of
Operand 1 : $EXECUTE_STDOUT$ does not contain
Operand 2: sudo
To use the Plug-in "AbortInstallAction", please download from this link https://www.revenera.com/install/products/installanywhere/installanywhere-files-utilities and add AbortInstallActionCustomCode.jar in [InstallAnywhere Folder]\plugins.
Learn more: https://www.revenera.com/install/products/installanywhere/installanywhere-files-utilities
Related Articles
Installer Fails When JDK is Installed on D: Due to Writable JRE Folder Security Check 7Number of Views Unable to build commandline : This is an incomplete installation of InstallAnywhere 2022 Evaluation. 7Number of Views InstallAnywhere 2022 Public Hotfix A - Project upgraded to InstallAnywhere 2022 from an older version skips a panel in the… 7Number of Views Abort an Installation 5Number of Views Installer Hangs During Installation When Standard User Runs Installer That Installs Log To Program Files (x86) or Program … 4Number of Views
Hi, I am Reva - Ask me anything.
No new updates
Thanks for the feedback!
Your feedback has been saved.Rate this response:
Add additional feedback (optional)
Are you sure you want to cancel
the case creation?
Are you sure you want to cancel the case creation?
Are you sure you want to close this case
| Products | Region | Phone Numbers |
|---|---|---|
|
FlexNet Operations FlexNet Embedded FlexNet Publisher FlexNet Connect FlexNet Code Insight InstallAnywhere InstallShield |
North America * |
+1 630-332-2513
(toll) +1 877-279-2853 (toll-free in North America) |
| Europe * |
+44 1925 944367
(toll) +44 800 047 8642 (toll-free in Europe) |
|
| Japan * | +81 3-4540-5335 (select option 2) | |
| Australia * |
+61 3 9895
2177 +61 1800 560 603 (toll-free in Australia) |
|
|
Usage Intelligence (formerly
Revulytics) Compliance Intelligence |
Please use the Case Portal to submit your support ticket or reach out to your Revenera contact. | |
Revenera Assistant
Case id: 00001065
Activity: Status change: 2 hours ago