Change default installation location and Create a desktop shortcut link in Install4j - install4j

I am using Install4j to create installer for my app.
I want to change the default installation folder location to "My Documents" folder. I am trying to do it from "Installation location"" screen. But not getting the result.Can anyone please tell me that which things i need to change/edit ?
I want to create a desktop shortcut link icon. I am trying to do it using "Add a Desktop link" action under "Desktop Integration"" category. But not getting the expected result. I am sure than I am missing something but don't know which part. So can anyone please suggest me the whole operation to add a desktop link ?
I am not an expert on Install4j but have the basic knowledge. I have searched on google and checked the previous threads on stackoverflow but didn't get my expected result.
Thanks in advance for your help.

I want to change the default installation folder location to "My Documents" folder.
In the "startup" node of your installer, add a "Run script" action with the script:
File docsDir = WinFileSystem.getSpecialFolder(SpecialFolder.DOCS, false);
File installationDir = new File(docsDir, "myApp");
context.setInstallationDirectory(installationDir);
return true;
I want to create a desktop shortcut link icon. I am trying to do it using "Add a Desktop link" action
Probably the file does not exist yet. Move the action after the "Install files" action on the "Installation" screen.

Related

Install4j, "File Associations" (selection) screen does not appear in Unix installer

When creating installers with multiple file associations, the "File Associations" screen in the installer (which allows the user to select/deselect which extensions to associate with the application being installed) appears in the Windows installer created, but does not appear in the Unix shell installer. This means all file associations are made without the user getting to choose.
Is there a way to force the appearance of the file associations screen?
This is indeed a bug in install4j, it will be fixed in 8.0.3, please contact support#ej-technologies.com to get a build where this is already fixed.

Install4j: Turning off "Suggest application directory"

In our "Installation Location" screen we have switched off "Suggest application directory" because it was appending a suffix to the directory users chose (not sure where the suffix came from as different people where seeing different things with the same build).
I wanted to know what kind of impact this change could have as the screen help says: "[...] only switch this off if you substitute a different installation directory in the screen validation".
We don't actually substitute the directory in the screen validation, however before showing the Welcome screen we do run an action to set an initial installation directory our users can override.
By default, the "Installation location" screen appends the installation directory name that you have configured in the media wizard.
If you turn off “Suggest application directory”, and a user selects "C:\Program Files" as the installation directory, the application will be directly installed into that directory, which is not desirable.

Can't create new sites and pages in Teamsite

I've just installed Teamsite on Linux CentOS 6.5. I've used Silent Installer and mostly default properties (install.properties), I logged in as a root user and everything seems to be good but the problem occurs when I'm trying to create New site or New page. I click as a usual File -> ... and there is only New File, New Branch etc. but there is no New Page or New Site button. Do you know what could went wrong during the installation or what can I do to "restore" this buttons and create sites/pages? Thx.
Ensure you are under a Workarea. Create a workarea under a branch and give it a try.
If you are already under a Workarea, then this would the issue with your license. Have you generated right licence from the official license website from HP Autonomy.
The Features are tied to License what you have. Just to cross verify if you do not see SiteMap TAB next to Content and Workflow ( just above file menu ) that indicated you are missing a full licence.
Please generate new licence and try deleting old and start Teamsite server issuing iwreset -a command.
Let me know if this helps.

API Gen with NetBeans 7.2.1

I cannot generate the documentation of my project. Getting the error message under NetBeans "'"php.exe"' is not recognized as an internal or external command, operable program or batch file.".
The ApiGen 2.8.0 standalone has been unzipped in a separate folder and its reference is given under Tools->Options->apigen.
Any advice from anyone? Thks in advance.
The problem is that your Netbeans installation does not know where your PHP executable is by default. You'll need to add the PHP path to your windows environment by following these steps;
Unzip APIGen in a suitable location by personal preference
Go to your PHP executable directory (For XAMPP on C it would look like C:\xampp\php
Copy the location address in your window path at the top
Open start menu and right click "Computer"
Choose "Advanced system settings" to your left and click "Environment vars" in the new window.
In the second list view, mark "Path" entry and click "Edit"
Position cursor at the very end in the value field.
Type semi-colon and paste your copied path on step #3, make sure your path ends with backslash.
Click ok and then make sure to restart Netbeans.
Go to Options -> PHP and then click "Search", Netbeans should now be able to find your PHP executable.
To set up APIGen in netbeans;
Go to Options -> PHP -> APIGen
Browse to your extracted APIGen location and select the apigen.bat file.
You may also add " --debug" after apigen.bat in order to get detailed error reports if something fails.
Your system should now be ready to generate documentaiton. The first time you generate the documentation you'll be asked to select the output folder and what the documentation should cover.

Deploy a Desktop Shortcut to a Device running Windows CE 4.2 (VS2005)

I have an application written using VS2005 in C# targeting the Compact Framework 2.0 SP2. As part of the solution, I have CAB deploy project which deploys to the device without a problem. What I can't do is create a shortcut to my application on the devices desktop.
I have spent several hours reading various bits of documentation (why is the search at the MSDN site so bad?), followed the instructions but no joy.
What I've done is:
Add the "Windows Folder" node to the File System
Created a folder underneath that named "Desktop"
Created a shortcut to the Applications Primary Output and placed that in the "Desktop" folder
What am I missing?
A bit late but maybe this will help somebody like me who searched for this issue, I solved the problem like this:
I added a custom folder on the root node (File System on Local Machine) and called it %CE3%.
That is the shortcut for \Windows\Desktop.
I added my shortcut (right click create new shortcut) and gave it a name.
That's it, then I build!
When analysing the Shortcuts section in the inf generated, it looked good.
[Shortcuts]
"ShortCutName",0,"MyApp.exe","%CE3%"
And when I deployed and it worked perfectly!
I'm using VS2008 and deploy on windows CE 5.0
Here is a list of shortcuts: windows CE shortcuts
A Windows CE shortcut (CE of any version or flavor, including WinMo) uses a ASCII-text based file. They are in the form:
{XX}#{PATH}
Where:
XX = the number of the characters in the path, to include the number a # sign
PATH = fully qualified path to the file to run
For example:
20#\Windows\calc.exe
The other option is to use the CEShortcuts section of the INF file used to generate your CAB.
In the [DefaultInstall] section of the INF, set the CEShortcuts to a section name of your choice (something like "Shortcuts"), then add that section with your shortcut descriptor. MSDN details it here.
MSDN also has an article on creating a deployment project to generate the cab (available here), but in all honesty, the project capabilities are limited and IMO the tool just generally sucks. To this day we still use direct calls to CABWIZ (which also sucks, but it's our only choice) with hand-written INF files.
I had this same problem and found a simple solution, if anyone still needs this.
Instead of adding a windows special folder, just add a custom folder named Windows, then a folder within it named Desktop, and put the shortcut there.
This worked for me.
The Simplest way is to go into the Application folder in Cab Project(setup), right click on your EXE Program(Application exe that you want to make shortcut for) and chose "Create Shortcut to" and move that file to any folder you want such as "Start Menu Folder"
Mitch: create the LNK file as before, but give it a name like "shortcut.lnkx" (note the "x" on the end). You can then add it to the "Desktop" folder in your CAB project. Once the file is added, change the TargetName property to "shortcut.lnk" and compile. I think this will work.
Assuming that you use Windows Mobile (5.0 or 6.x) you could use that syntax to create a file as a shourtcut(*,lnk):
SHORTCUT = XX#"\Program Path..."?\Icon File Path...,-Icon Number
Where:
XX = Count of characters to be included in arguments after the Program Path to process.
Program Path = Target exe file location.
Icon File Path = If exe file does not contain an icon image or you want to use another, this is the location of the file containing the icon image.
Icon number = Index of icon image within the file, it starts with 0.
Ex: 86#"\Storage Card\Logical Sky CEdit\cedit.exe"?\Storage Card\Logical Sky CEdit\cedit.exe,-101
I had test it, and works fine.
1.Copy the file.
2.Go to desktop (or wherever you want to create the shortcut).
3.Right click on an empty space, click Paste Shortcut.
That's it.
Actually, this is pretty simple ! (Using VS 2008 and Smart Device CAB project)
1- In the solution explorer on VS, Go to your CAB project and right-click on it.
2- Go to View -> File System
3- Here, on the left column, right-click and "Add Special Folder"
4- Select Start Menu Folder for the shortcut folder
5- Go to the Application Folder just above
6- On the right column, right click on the Primary output and select "Create shortcut to bla bla bla"
7- Then you just have to move it to the start menu folder on the left and rename the File :)
OPTIONAL: You can even add fonts to the device using "Fonts folder" in the "Add Special Folder" menu !
Cheers
I assume that you're working with a "Smart Device CAB Project"? I don't think this project creates shortcuts in the correct manner for Windows CE 4.2. I think you can download an SDK from Microsoft that after installation will show you something like "Windows CE CAB Project" as a project option.
I think you can do this manually, though. A Windows CE shortcut is a file with a *.lnk extension, so if you want a shortcut labeled "My Application", create a text file on your PC named "My Application.lnk". The file's contents should be:
46#\Program Files\My
Application\MyApplication.exe (the # should be the full path length)
or whatever full path your application has on the Windows CE device.
In your CAB project, continue with adding the "Windows" folder and then the "Desktop" folder as you were. In the Desktop folder, right-click and add the LNK file that you created. You may have to soft-reset the device in order to have the shortcut show up after installation.