Install4j restore version - install4j

I've added a custom application to my installer project and use it as recovery tool if something went wrong during update or if the new application data contains any bugs.
So far so good, restoring files and database works, but I can't figure out how to restore the version number. How can I implement this?

You would have to restore the file .install4j/i4jparams.conf in the installation directory. It contains the version number, also the file .install4j/response.varfile if you query installer variables in your code.

Related

What is the easiest way to restore D365's code base to original?

How do you restore the code base to fresh installation? I am having some build/sync issues and I would like to undo all my code changes and start over.
Since you are asking for the easiest way: Deploy a new environment :)
Jokes aside, what I would do is to clean up the AOSService\PackagesLocalDirectory directory and delete the folders that contain your customizations. Alternatively you can copy the contents of the directory from a clean environment of the same version, in case you don't know the names of your customization packages anymore.
From Pradeep's comment: Then Open visual studio, Go to Model Management and Refresh model. Then do a full build and synchronize database.
This should restore your environment back to a clean installation.

Copying original *viewdefs.php into custom folder? suiteCRM / sugarCRM CE

I saw someone "extending" an existing viewdef by simply copying the stock file into the custom folder and then modifying that copied file.
It makes sense, but I don't see that in official documentation.
Example modules/Leads/metadata/editviewdefs.php copied to custom/modules/Leads/metadata/editviewdefs.php
Is this safe/correct way of doing it?
That's the correct way to do it.
A quick reminder about future SuiteCRM upgrades and view/edit-defs.
Sometimes newer SuiteCRM versions add/edit fields to modules and the upgrade process will not upgrade your copy of those files, sometimes causing weird errors.
If you have access to a Backup is more easy to copy the file from there and then edit it with a new Uploader Package.

typo3 crashed page after installed extension

After I instaled extension in typo 3 version 4.5 I can't log in to backend, my page is blank and after I try to go on http://mydomain/typo3/install/index.php I get this message :
The Install Tool is locked.
Fix: Create a file typo3conf/ENABLE_INSTALL_TOOL
This file may simply be empty.
For security reasons, it is highly recommended to rename
or delete the file after the operation is finished.
If the file is older than 1 hour TYPO3 has automatically
deleted it, so it needs to be created again.
Installing any extensions in such an old TYPO3 probably will kill your installation, as any modern extension is incompatible to the old sources.
Modern extensions have namespaces, autoloader, use API classes and functions unknown to the old installation, maybe even use PHP7 features unknown to the old PHP which is needed to run those old TYPO3.
now for your cleanup:
For entering the instal-tool do as the message indicates:
create/update that file and then you can enter the install tool.
but in 4.5 you will not get much help to get the system running again.
you must disable the malicious extension:
in the file typo3conf/localconf.php you need to delete the extension key from the list of installed (active) extension. For this you can use any editor. One is build in the InstallTool.
After that you need to remove the cached version of the localconf.php: remove the temp* files in the folder typo3conf/.
Now your system should work again (but still might be unclean).
you should remove the extension (typo3conf/ext/extensionkey).
Maybe there are new tables and fields in the database. Therefore do a database compare in the InstallTool.

How to remove a folder created by old version of application with files during upgrade in advanced installer

Many thanks in advance, I am using advanced installer 12.1, the scenario is we have already installed application with some custom location feature and is extends the default application location, this installation creates some folders to store temporary files like "Temporary" folder, this folder is used by the application on every minute basis and hence there are some files in this folder, now issue is when i run a new build or try to install the new version of the application, i again select the another custom location, before finishing the installation the installer deleting all the folders installed with older version but not deleting the folders which contains files created by the application e.g the temporary directory above is deleted if it is empty but when it is non-empty it is not removed.
Solution i tried:
1) I used file Removal tool to remove the file, but i think it point the current location and not pointing the older application path.
2) A custom VB script, but again the same issue as #1
3) I tried uninstall cleanup wizard, result #1
Please guide me how i can delete that folder, any help would be appreciated.
Thanks

Installshield - Few files getting removed on major upgrade

I updated an installer file (.ism) for major upgrade in which I made the following changes:
updated product code,
updated package code,
updated versionmin and max in upgrade,
updated product version,
few strings in which old version was mentioned.
Now when I am upgrading my product using this setup, few files get removed automatically.
I did not make any changes in those files in target machine and the same files (no change in content) are in my new setup.
Also I did not add any entry in "RemoveFiles" table to remove them.
Also checked the installation log in which I am just seeing this:
Action 14:14:59: RemoveFiles. Removing files
RemoveFiles: File: CapibilityDemo.htm, Directory: C:\Program Files\Server\Printing\
RemoveFiles: File: HTTP.js, Directory: C:\Program Files\Server\Scripts\OpenLayers\lib\OpenLayers\Protocol\
RemoveFiles: File: Script.js, Directory: C:\Program
Files\Server\Scripts\OpenLayers\lib\OpenLayers\Protocol\
Can anyone please help me in resolving this issue ?
Thanks
Taran
Dynamic components are probably the problem.
This link is someone who was having a similar problem while patching (which is like a minor update)
Basically what is happening is that MSI has determined that the 'old' components have been removed (since they are dynamically generated, the GUIDs change every build). So in your upgrade it is removing the components you 'removed'. However it isn't laying down the new components, likely because it has determined there isn't a need for it to do so. You should examine your MSI file in Orca and look for the files/components that didn't get installed in your upgrade, and then search the install log for that GUID. That should give you a clue as to the next steps.
Also, here is the installshield best practice recommendations for Dynamic file linking.