Install4j create user data directory - install4j

Install4j has the system variable sys.docsdir that will create a data directory in the proper place. But I can not find an action to add to the installation that will create an empty directory. What is the action? If I need to create custom script, a sample would be awesome.

The installer variable sys.docsdir contains the path to the user-specific "Documents" folder on Windows, it does not create a directory.
To install files into a subfolder of the sys.docsdir directory, add a new root under Files->Define distribution tree with the name ${installer:sys.docsdir}/myfolder and add the files below that folder.
To install to a folder that is resolved at runtime, the name of the installation root can contain your own installer variable, like ${installer:myDataDir}. In that case, you have to define that variable (for example with a "Set a variable" action) before the "Install files" action runs.

You may find your answer here, in the following link:
http://blog.ej-technologies.com/2010/12/more-installation-options-with.html
Hope it helps you.

Related

Avoid creating installation directory for patch installation

Today I need a solution to avoid creating a installation directory by install4j version 6.1.3 in a context of a patch installation. I wrote an installer which contains some files to install them to an existing application installation. The files should be bundled together with the patch installer. At the install files action i deactivated the install runtime selection point but the installer still created the installation directory containing a folder called .install4j. In this folder there are only some install4j files. When I deactivate the whole install files action the folder will not be created but the bundles files will also be not extracted to the temp-dircetory, right? I also marked the installation directory as an excluded file at the media-wizard. Do I missed something?
Thanks in advance
I would recommend to use the "Add-on installer" installer type on the "Installer->Update options" step.
If you need to update the version number, an alternative solution would be to remove the "Install files" action and add a ZIP file files.zip on the "Installer->Custom Code & resources" step that contains the new files. In the "Installation" screen, add an "Install content of a ZIP file" action with the "Zip file" property set to ${installer:sys.resourceDir}/files.zip.

Is there anyway to have different destination name of the installing file at than the source name?

I want to have different file name at the destination side after installing it. Is there anyway to do it? I did not get that option in the Add Files and Directories action under Define Distribution tree. Please advise.
The "Install files" action has a "Directory resolver" script to change the installation directory for each file, but there's no facility to change the file name.
You would have to use a "Move files and directories" action for that purpose.

Get the root folder of the installation drive in install4j

For specific needs I would like to install some files in the root directory of the installation, for example if the installation is under C:/Program Files, so I need to set some files in C:/.
There may be an easier way, but I would create a "run a script" action and parse ${installer:sys.installationDir} to get the root of that...

Is it possible to rename a folder in Nuget

I'm creating a nuget package to install some ascx files into a solution. The folder i want the ascx files to be stored in will be different depending on the project. IE folder name will be the same as the project name.
Is it possible to have a pop up to capture text so I can rename the folder in the content section of a nuget package during install. Is it then possible to add this folder name to the namespace of the files within the folder?
I know its possible to add $rootnamespace$ with a .pp extension to replace the key with the correct root namespace, but can you append to this too?
You ought to look into the options for Automatically Running PowerShell Scripts During Package Installation and Removal.

External output folder in eclipse

Is there a way in eclipse to make the project's output folder an external folder, instead of a folder located under the project root?
Yes, you can define it as a linked folder.
This this SO answer for more (or this one)
To create a new linked folder select New->Folder, input bin in the folder name: field then click Advanced>>
Click Link to folder in the file system
Click on Variables... to bring up the Select Path Variable dialog.
If this is your first time, or you are linking to a new location select New... and give the variable a sensible name and path.
More precisely, you define your output directory (say 'bin') as a linked folder, then you set that directory as the official output one of your project.