How to remove an appimage's user mofied settings after or before deleting the appimage file? - linux

I launched an appimage using appimagelauncher. Then, I modified some settings of that app.
I know that appimages are not installed, so it can't be uninstalled. So, I deleted the appimage file.
But, when I downlaoded the appimage again, I observed that the user's previously modified settings were still there.
Now, how can I completely remove those user modified settings and launch that software as if it were newly installed?

The AppImage format doesn't define an explicit place where the applications configuration should be installed. Which means that the application can write such file wherever they please (as a regular installed application does).
Applications usually write their configurations to "$HOME/.config", you can look there for a file or folder with the application name. You can also ask the application author or check the documentation.

Related

Required production files for custom modules

I created some custom modules and Visual Studio drops the build files directly into the Kofax Bin directory. It is important to note that I'm using the modules as Winforms applications and Windows services (at the same time). The generated files are
MyModule.exe
MyModule.exe.config
MyModule.InstallLog
MyModule.InstallState
MyModule.pdb
I think that I only need the .exe file here. Of course I also add the .aex file to the directory to install the module. I also created two batch files to register the module on the local machine
RegAscEx.exe MyModule.aex
pause
and to install the module as a Windows service
"C:\Windows\Microsoft.NET\Framework\v4.0.30319\installutil.exe" "%~dp0MyModule.exe"
pause
after running them as administrator I can delete them from the directory of course. I would like to know if it should be always fine to provide the .exe file, .aex file and the two batch files (which will be deleted later) only?
Basically correct. Some thoughts:
Build your application using the Release configuration (vs Debug). See discussion here.
PDB files usually are not needed in production. Still, you may want to generate and keep them if you plan on debugging in production.
The app.config file should be kept. Maybe you want to use application settings later on, and the supportedRuntime element is useful if someone wants to run your CM on a machine without that version of .NET framework being present (Windows will show a nice error message)
Keep the AEX file. This is required if someone wants to register your CM on another machine (e.g. deploying from DEV > TEST > PROD).
Include a single batch file that allows registering your CM on a new machine as well as adding it to Kofax Capture. Here's an example:
rem "C:\Windows\Microsoft.NET\Framework\v4.0.30319\RegAsm.exe" SmartCAP.CM.Sample.dll /codebase /tlb:SmartCAP.CM.Sample.tlb
rem RegAscSc.exe /f Register.inf
Another thing I usually include is the ability to install my CM in a similar fashion to native KC modules, for example: SmartCAP.CM.Sample.exe -install and SmartCAP.CM.Sample.exe -uninstall. Take a look at the AssemblyInstaller class for details.

How to make gradle.properties machine independent

I'm working on 2 different machines (home vs. work) and transfer the code via GitHub, which works nice, but I just ran into a machine dependency when I added this code to the gradle.properties file to fix a vexing OAuth issue for google sheets:
org.gradle.java.home=C:\Program Files\Java\jdk1.8.0_131
org.gradle.java.home=C:\Program Files\Java\jdk1.8.0_77
Now I have to toggle between the 2 lines to get Gradle to compile. Need to check if I still need it (since I got the keystore files etc. sorted out), but I also wonder whether there is an easy solution to make this work (e.g. something like ifdef).
Obviously, I could just change the directory name in one of the machines I guess, but still curious how to solve this within Studio.
Lets start with a quote from the Gradle docs:
org.gradle.java.home
Specifies the Java home for the Gradle build process. The value can be set to either a jdk or jre location, however, depending on what your build does, jdk is safer. A reasonable default is used if the setting is unspecified.
So, by default, you should not need this project property (thats what they are called in Gradle).
However, there can be reasons, that you need to specify the Java directory. For this specific project property, you can follow Ray Tayeks advice and use the JAVA_HOME environment variable (on both systems). But there is also another approach, which can be used for any project property (and also for so-called system properties):
gradle.properties files can be located at different locations of the file system. Your files are located in the project directory and, therefor, they are included in your VCS. You can use them / it for project-related properties. An additional location is in the Gradle user home directory, which is by default the .gradle folder in your personal folder. This folder is not under version control, so simply define the property there.
try removing the line from the properties file. if that fails, try setting JAVA_HOME on each machine.
there are a lot of related questions.
you might try asking on the gradle forums.

Inno Setup - Stop windows asking permission to run my application

I have a 'simple' .exe (helper.exe), which is part of a software licensing package. My understanding of this file is that initializes a license file; it is run during install at elevated privileges.
I would like this file to be included with my install. I created an installer using the Wizard with default settings but every time I try to run my .exe UAC pops up and asks permission. How can I stop that from happening?
The first part of the answer was given by TLama:
You will have to modify your application's manifest to not set the
requestedExecutionLevel node to level="requireAdministrator. It has
nothing to do with the setup itself.
Later I realised I was using the file incorrectly...
I have edited the question so remainder of the answer is: helper.exe is used to initialize a license file and is supposed to be run once (I thought helper was used to check the license file and thus was supposed to be run for each check). For the record the software seems really good (I'm currently evaluating).
Cheers,

Removing extra files after uninstalling a clickonce application

I have a project that uses clickonce to generate the setup.exe. During the run time my program create some extra files like "Log" and "Attachments" inside the User Folder. However, those folders are not removed when I perform an uninstall of the clickonce application from the ARP. These remaining files are interfering the next install.
I know that click once does not support for adding custom action to install or uninstall. I am wondering if is there is a way that I can remove those extra file programmingly after performing uninstall?
One way I have tried was to create a cleanup script and added it as a bootstrapper package to pre-requisite of the click once project. That worked in a way that every time before a new product was installed, the previous dirty data had been removed. However, this messed up the upgrade case.
Any ideas on how to remove the extra files that left by clickonce uninstallation?
Thank you
JS
There is no way to do anything when uninstalling a ClickOnce application other than uninstall the ClickOnce application.
Have you considered putting the files in the ApplicationDeployment.CurrentDeployment.DataDirectory ? Then they will be removed when the application is unisntalled.
If the files are part of the project, you can set the type to Data in the Application Files dialog, and it will automatically place them in the data directory when deploying.
This solution works on multiple re-installations (clean), however it doesn't remove the data on last uninstall or until the next installation takes place.
Stil there is no custom action place on uninstall to remove the files beyond clickonce scope.
Leave a file in to ApplicationDeployment.CurrentDeployment.DataDirectory.
On startup, see if the file exists on conditions network deployed, firstrun (which resets on upgarde too).. success case, it is a first installation or upgrade. Failure case, the application is been uninstalled and installing again .. now you have a chance to clean up the application data.
If the data is sensitive, you may want to use other solution to remove files on uninstall ( as of now I don't see that Microsoft is given us an option)

Getting the Windows CE uninstaller to work properly

On some of the devices that I am working on, the \Windows directory is not on permanent storage. That is, once the device is rebooted, whatever was written to \Windows is lost. This is particularly problematic for uninstalling programs since wceload.exe (the Windows CE CAB installer program) generates a .unload file and places it in \Windows. The application can be uninstalled before the device is rebooted, but afterward it can't (the "Remove Programs" tool in the control panel comes back with an error about not being able to open the unload file). So how can I get the .unload file to persist across reboots? Is there any way to control where the uninstaller (I believe it is called unload.exe) looks for the .unload file?
I haven't been able to find any good info on this still. It looks like the path to the unload file is hardcoded so the best I can do is make a backup of the unload file. If the user wishes to uninstall they will have to manually copy the file to the \windows directory and then use the uninstall tool in the control panel. Here is more info:
http://www.generation-nt.com/us/answer/wince5-force-wceload-install-unload-into-nonvolatile-memory-help-87676002.html
You can probably keep the .unload file across reboots by copying it to a persistent directory after installing. This directory may vary per device, e.g. \Hard Disk\ramroot\Windows or \Backup\Windows. It will then automatically be copied to the \Windows on reboot. (Although I am not sure whether such a directory and behavior exist for every device.)
To copy this file you need to execute a copy-statement from a custom setup-dll after the install completes. This codeproject-site has a very comprehensive explanation, with screenshots and code.
Simply re-Install application and then un-install from remove programs in control panel.

Resources