How to redirect packagemaker log file output - macos

While an installer (built via packagemaker) is running ... from the menu, we can select Window > Installer Log and then choose to Save it ... but this is not something that can be asked of all those who run the installer.
The installation itself is supposed to be a hands-off simple process. But in case something goes wrong and we need to go back and dig through logs, it would be great to configure packagemaker or the installer it produces ... to spit out the log file everytime it runs.
How can this be accomplished?

/var/log/install.log is written by Installer, and contains information about the packages being installed, pre-install / post-install scripts being executed, and any errors that occur along the way.

Related

Visual Studio Setup Project: Failed to execute script after installing app and opening it

So I finished an app, made an .exe, and the original .exe works, but when I try to install the app, the .exe and shortcuts to the .exe don't work. I get this error message: Failed to execute script (app name)
Is there a solution to this or should I make the installer another way or on another computer? In the meantime, I'll try to look into other options.
So I switched to Inno Setup and the first time I built the installer it worked. But after building again, the same error occurred. I eventually tried running the app as admin and it worked, so to fix the issue, I added something in the registry to make the app run as admin by default. This is how you do that.

Trouble uninstalling program through normal means

Once I access add or remove programs I was not able to locate my desired program to uninstall. After this, I decided to to try and use IObit uninstaller to try and find it, but that couldn't either. The program can still be found in my Program File directory and it acknowledges that I have it installed when I try to reinstall it. A system restore was no help either. Netbeans is the program.
The below is a custom installer / uninstaller approach for NetBeans - a package in a proprietary format (non-MSI). For normal uninstall of Windows Installer packages see this "reference answer" instead: Uninstalling an MSI file from the command line without using msiexec.
I see NetBeans in the Add / Remove applet just fine - just right-click and select "Uninstall".
I suppose the entry could be missing on your system. If this is the case you can try this:
Go to the NetBeans installation folder and double click Uninstall.exe.
On my system the installation path is: C:\Program Files\NetBeans 8.2.
You should get an uninstall dialog with a couple of options, set options as appropriate and click Uninstall.
I'll throw in the uninstall dialog so people can see the options - I suppose it could be helpful for someone at some point. I didn't run the actual uninstall, please update this answer with any extra steps necessary once you do run it:

Windows deletes make executable file upon running. Why?

I am trying to get some code running which uses make. I've downloaded and installed both MinGW (standard 32 bit) and TDM-GCCs flavor of MinGW on my 64-bit Windows 7 machine.
When I run make (i.e. mingw32-make.exe) in Administrator mode, I get the following error message:
Windows cannot access the specified path, or file. You may not have the appropriate permissions to access the item.
The weird/scary part is that, upon running, it immediately deletes the exe file.
I ran a checksum SHA1 as recommended in the comments using the Microsoft (R) File Checksum Integrity Verifier V2.05:
C:\path\to\folder>fciv.exe -sha1 mingw32-make.exe
//
// File Checksum Integrity Verifier version 2.05.
//
c8ae5c780ab7bed652883d6443b5bfe5e23d30c9 mingw32-make.exe
I don't understand what this output means, but maybe it's helpful to someone.
Notes:
This happens regardless of where the file is located on my pc.
This behavior is specific to the make program (others such as gfortran and gcc appear to be working fine)
Renaming the file makes no difference.
I am an administrator on the pc
Same behavior when I run the program from the explorer or command line.
My anti-virus program (Avast) does not detect any problems with the file when I scan it.
I got the MinGW setup file from this SourceForge page.
I got the TDM-GCC web installer from this page.
The file size is 219,662 bytes (from both the main MinGW and TDM-GCC packages)
I have run make from the command line where I have started the command prompt by way of selecting Run as Administrator in the context menu.
I have also tried to run make by selecting Run as Administrator when I have it selected.
I run the command mingw32-make when this behavior occurs. I have also tried renaming it to things like make and foo with the same result.
The first time this happened with both MinGW it deleted the original file and I re-installed it using the mingw-get application. From thereon after I started making copies of the original mingw32-make for testing.
For the make executable, I have all permissions (including Read & execute) except the special permissions field.
After using the process manager I found out it was indeed Avast that was the problem :S A couple of lines revealed avast actually deleted the file before windows got around to executing it, which was the reason for the windows message. I put Avast on 'Silent Mode' a while back; I thought the only purpose of this mode was to suppress notifications about minor updates, but apparently it also gave Avast permission to deal with 'threats' silently as well.
After figuring that out the solution was straightforward. I just went into the settings and created an exception for the mingw32-make.exe file. It now runs without issue.
Thanks very much for your help everyone!
User account has administrator privilege but when user started to work , not all privilege are taken in account , just start your application for compiling with run with administrator mode try this : https://technet.microsoft.com/en-in/library/cc781763(v=ws.10).aspx

How to run multiple DMG files in one installer using Iceberg or Package Maker?

I am trying to create a Mac Installer to streamline the process for my end users.
The idea is that they could just run one installer that would take them through the process of installing 5 different pieces of software.
Another complicating factor is that I would like to run different types of installers within this one meta-installer in a particular order
1) Install a bunch of files (including the DMG files)
2) Run one DMG file and install it
3) Run another DMG file and install it
4) Run a .sh python script that would execute through the terminal
5) Install some more files
My questions are:
Is this possible?
Any idea how to do this with either Iceberg or Package Maker?
Thanks in advance!
Well, it is definitely possible.
Seems like your requirement is that you have 5 different installers and you want to install them one by one from a single main installer.
In this case, lets assume you have all these installers inside a dmg file with one main installer (All those installers can be hidden so that user sees only the main installer when he mounts the dmg).
Now, inside the postinstall script of this main installer (assuming you use packagemaker), you can write the logic to get the current path and start installing your sub-installers. You will have to do some error-handling as well to know if any of the installation failed.
What I provided is a high level idea of how to achieve what you want to do. I am sure there are a lot of improvements you can think of when you are writing the main postinstall file that contains all the business logic.
Command to install a packagemaker installer from the script:
installer -pkg "path_to_pkg" -target /
See man page of installer for more options.

Nuget.exe crashes when invoked from cmd.exe

I'm trying to automatically download Nuget.exe from a Rakefile, in order to minimize the amount of initial setup needed to run my samples on GitHub.
I've understand how to download a file (I'm using HTTParty) and how to save a binary file (using the b flag on File.new) but now I've got problem running Nuget.exe. In particular:
if I launch it directly or from PowerShell, the executable runs fine;
if I launch it from cmd or from a Rakefile (which in turn runs cmd), Windows tells me that the program "stopped working".
I reproduced the same behavior with the Nuget bootstrapper, so I thought that the cause was some configuration in my computer.
It then occured to me that I installed ansicom, a library to handle ANSI sequences. I disabled it and then Nuget started without any problem.

Resources