I have powershell scripts in file (.ps1), How can I run it from Install4j during the installation?
If I'm choosing "Run Script" control, What should I need to write inside?
Thanks.
I would rather use a "Run executable" action for that purpose. You can then call the excutable
${installer:sys.system32Dir}\WindowsPowerShell\v1.0\powershell.exe
with the command as the argument.
Related
I would like to choose the user for run configuration so that my application runs with reduced permissions.
Unfortunately there doesn't seem to be any option available for this in Intellij.
Only way I can think of so far is to run as "Shell script" and clean/package my JAR in "before launch" configuration. This however requires a lot of manual configuration and cannot be used to run tests. It becomes even more annoying when the user has a password (which could be stored in Intellij's configuration like database passwords for example).
I've found the "shorten command line" option but I don't see any way to add my own configuration. If I could, it would be something like:
sudo -u nobody java [options] className [args]
If program can be run via command line - you can try using External Tools to run it.
How I can run a CMD/Powershell before my Java GUI Application will be build and invoked.
I want run the command: sass ANYFILE.scss:ANYFILE.css to compile my scss file first.
In the Run/Debug Configurations I found nothing which helps me at the Before launch option.
Add the External Tool in IDE which will run any command you want, then add it in Before launch section.
There is a PowerShell plugin that provides a run configuration to run powershell scripts. You can add it as Before launch option as well.
Is there a way by which a shell script can be invoked from IntelliJ Run/Debug configurations?
I just found out that we can invoke a shell script with the help of BashSupport plugin.
'Add External tool' in the 'Before Launch' does the trick.
Screenshot
IntelliJ IDEA 2019.2 update
New version of IntelliJ IDEA has Shell Script Support included. It means you can now create Shell Script build for your project.
Edit Configurations > (+) Add New Configuration > Shell Script
You can also build your project before executing your script by adding Run Another Configuration task. That's how it looks like: Add Shell Build window
Not sure about 11, but in 12 there's a part of Run/Debug Configuration that is called "Before Launch" and you can select your shell script in "Add External tool" option.
I can see that MSBuild makes use of the /t:Package on the command line, but what's the euivalent for including this option in an msbuild script file.
The equivalent in a build script file is to use the MsBuild task. See link below.
Msdn Build Task
Are you invoking an msbuild script from another script using the MsBuild task? If so, the parameter you want to use is Targets http://msdn.microsoft.com/en-us/library/z7f65y0d.aspx.
I need to run a sql script while installing my program. I made a bat file which runs the script, and created a custom action on the commit of the setup project. The idea is the installer puts the file.sql(contained into my main project) in the installation path and then the custom action uses this file. How can this be possible?? Because doing this I get
this error: "There is a problem with this win installer package. A program run as part of the setup did not finish as expected.". Thanks.
You use SQLCMD to do this in your .bat file. A good example exists on TechRepublic. See figure B on how to configure your path. Another path example is shown in a brief article about a SQLCMD startup script; search for "startup script" on the page.