packagemaker partial install if folder exists - macos

I have created a PackageMaker (OSX) Installer that successfully installs two items, a main file, and a folder of files (with root), within '/Applications/[specific Application folder]/' path. Now I want to make sure the installer doesn't install the folder if it already exists (but I do want to overwrite the main file). Pretty basic, I'm sure ... but how is this best done?

Standard procedure:
You will have to create two component packages- one for the main file and the other for the folder of files.
Now in your Distribution script, you can disable the installation of second package based on the existence of the folder on the system.
Workaround:
Use your preinstall script to rename the existing folder on the system, let the new folder get installed, and then from the postinstall script, delete the newly installed folder and rename the older package back to the original name.

Related

Windows store APPX package install file in different location

So I have recently developed an app for the windows store, I packaged it into an APPX package. The problem is that windows auto installs it into a non-accessible folder meaning I cannot reference .exe and .pdf files.
Is there a way to make it always install 2 files in the same place, for example the two files which need to be edited install on desktop and the rest of the app in the usual install location?
Can I do this using two separate .APPX files?
No, all APPX/MSIX packages are installed/extracted under the ProgramFiles/WindowsApps folder.
This folder is read-only, only the OS can write in there (when it's installing the app).
The solution is to copy the files you want from the install folder, the first time a user launches your application.

Package nwjs app into a single exe

I have created an installer program for my application using NWJS. I need to package the NWJS app into a single exe. I was going to use windows iexpress becasue that would provide exactly the function I need, however I can't use that because it does not support directorys inside the archive and even with the app html files packaged into package.nw NWJS still requires the locales directory to run and also iexpress has some security flaws.
Basically I need something like this:
1: it is a single portable executable file which contains some sort of archive with the nwjs files in it.
2: when the exe is run it extracts the archive to a temporary directory and runs nwjs.
3: when nwjs exits it deletes the temp directory.
So far I have not found any way of doing this.
I did some more research and solved it myself by using Enigma Virtual Box.
http://enigmaprotector.com/en/downloads.html

Creating a installer which will run a specific batch file

I need a help from you. Here is my total scenario:
I have created a batch file which will install some digital certificate. Now I need to make a one click installer(.exe) which will extract all the files (my provided digital certificates and bat file in the .exe file) to the temp folder and run the bat file to install them. After finishing, it delete the extracted files from temp folder. I made the bat file and it is working well but can't make the one click installer.
Can anyone suggest me how to create that one click installer (.exe)?
Windows comes with an integrated installer creator. IExpress.
I prefer 7z for mine. See link in MikeG's comment for additional details.
https://superuser.com/questions/42788/is-it-possible-to-execute-a-file-after-extraction-from-a-7-zip-self-extracting-a

How to autolaunch installer from dmg

I want to deploy my program on Macintosh and I have a working installer but the installer and the files are packed into a zip file. I would like to make a DMG file and place them into it. This is easy to do but I would like the installer to start automatically when the user opens the DMG file. Is there any way to do that?
No, you cannot do this. What you need to do is convert your installer package to a flat package (these are now the default anyway). A flat package installer is a single file, so there's no need to bundle it into a zip or DMG.

Advanced Installer Mystery File/Folders

Using Advanced Installer. When I build and run my install project, after the install there is a folder called MyCompany (equivalent to [Manufacturer]) located within the ApplicationData folder (which resolves to C:\Users\Joey\AppData\Roaming\ on my system).
Within that particular folder is another folder called MyProgram 1.0.0 (equivalent to [ProductName] [ProductVersion].
And within that folder is another folder called install. And within that folder is a file called setup.msi with a size of 1.17MB
I have no understanding of why this file and these folders are being created. Further, after I uninstall my app, they get left behind on the system, which means my app is creating garbage.
Can someone please explain why this is happening? And also...if I can't cause this to not be present in the file system while my app is installed, how can I avoid leaving it behind on the file system after I uninstall?
Thanks.
When you are building an EXE setup file, that is the default extraction folder for the EXE, where you can find all the resources during the installation. You can change it from Media page, "Extraction folder".
It is not deleted after uninstall due a bug in Advanced Installer, you can find more details and a workaround on the forums.

Resources