How to make .exe in silent mode using Installed shiled 10.5 - installation

i need to make .exe in silent mode. No need to display any dialogs(Including progress bar dialog also). Just click the exe and all the files should be installed without displaying any dialog.

it depends if your project is MSI or InstallScript.
http://unattended.sourceforge.net/installers.php
if MSI then:
When launching the MSI package from the command line you can use multiple "msiexec.exe" parameters which affect the user interface:
full UI: /qf (this is the default parameter used by the package)
reduced UI: /qr (the user interface does not show any wizard dialogs)
basic UI: /qb, /passive (only a progress bar will be showed during the installation)
no UI: /qn, /quiet (no UI will be showed during the installation)
else if InstallScript then:
The Silent Install options for InstallShield installer
/s Silent mode. For an InstallScript project, the command Setup.exe /s runs the installation in silent mode, by default based on the responses contained in a response file called Setup.iss in the same directory.
/r Record mode. In order to run an InstallScript project installation program in silent mode, you must first run Setup.exe with the /r option to generate a response file, which stores information about the data entered and options selected by the user at run time. Running an InstallScript installation program with the command Setup.exe /r displays all the run-time dialogs, and stores the data in a file called Setup.iss, created inside the system’s Windows folder. response file name and location, use the /f1 option, described below.
/f1 Specify alternative response file name and path Using the /f1 option enables you to specify where the response file is (or where it should be created) and what its name is, as in Setup.exe /s /f1"C:\Temp\Setup.iss". Specify an absolute path; using a relative path gives unpredictable results. The /f1 option is available both when creating a response file (with the /r option) and when using a response file (with the /s option)
/f2 Specify alternative log file name and path When running an InstallScript installation in silent mode (using the /s option), the log file Setup.log is by default created in the same directory and with the same name (except for the extension) as the response file. The /f2 option enables you to specify an alternative log file location and file name, as in Setup.exe /s /f2"C:\Setup.log". Specify an absolute path; using a relative path gives unpredictable results.

Related

Silent installation of git through use of .bat file on Windows

I am currently working on a Windows batch file that will allow me to silently install git (the executable for which will be placed in the folder that the .bat file will be running from) in a pre-specified location on the file system.
I've found this article which seems to provide some suitable advice:
https://github.com/msysgit/msysgit/wiki/Silent-or-Unattended-Installation
However, I'm not entirely sure what parameters I would need to mention in my LOADINF file. I would like to pre-define the options that the user would manually select throughout the various stages of installation, so that it can run through from start to finish without prompting anything from the user.
Can anyone help or point me to a place where I can find these parameters and their available values?
Create a file, for eg. my-config.cnf (or my-config.ini) with the following content:
[Setup]
Lang=default
Dir=C:\Program Files (x86)\Git
Group=Git
NoIcons=0
SetupType=default
...
<other options as shown in the msysgit wiki>
Now, in the batch file, when you execute the installation file (say msysgit-install.exe), use /LOADINF as follows:
msysgit-install.exe /SILENT /LOADINF="my-config.cnf"

Where is the location on the extracted .msi file?

I have a setup exe, and I want its .msi file for administrative installation (see https://superuser.com/questions/307678/how-to-extract-files-from-msi-package)
But, although I see at the beginning the extraction of .msi, I can't find it.
Where is the location of this file?
Usually MSI file(s) might be extracted in different temp locations depends from who was launched (User\System\etc) and how configured setup.exe. Sometimes you can extract it with help of different command-line switches for setup.exe.
The simple way to check - launch it under user account, go to %temp% folder, most likely there should be created folder with {GUID_view_name}. Inside this folder you will find MSI file.
User's %temp% folder has different location in different Windows versions:
Windows XP\2000\2003:
"C:\Documents and settings\{user name}\Local settings\Temp" or "%userprofile%\local settings\temp"
Windows Vista\7\8\2008\2012
"C:\Users\{user name}\AppData\Local\Temp" or "%userprofile%\appdata\local\temp"
P.S. Also you can check this SO question-answer.
Snapshot a clean VM and use a program such as Install Watcher or InCntrl to record the current state of the file system. Run the setup.exe until you are on the first dialog of the MSI and take another recording. Diff and look for where the MSI and related support files appear.
I found a much better solution, Igor, gave me the idea.
I used ProcessMonitor and filtered with Process is "msiexec.exe" and Path ends with ".msi".
I found the msi in:
C:\ProgramData\Downloaded Installations\{41A70E83-DA5D-4CA6-9779-73C9330E3D13}\IQProtector64.msi

Windows 7: Running application using App Paths vs Batch File

I have an (PowerBuilder) application (let's call it MyApp.exe) in a folder with a sub-directory that has all the required dlls. I am able to run this application, by adding the application path and associated path variable to Windows App Paths registry key.
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\App Paths\MyApp.EXE]
"Path"="C:\\Prog32\\MyAPP;C:\\Prog32\\MyAPP\\DLL\\;"
#="C:\\Prog32\\MyApp\\MyApp.EXE"
The above runs file. I didn't even have to register DLLs.
If possible, I would like to run it using a batch file though, as users may install multiple versions of the same application in separate folders. When I tried to do the same thing in a batch file, it cannot find the DLLs.
#SETLOCAL
SET CURDIR=%~dp0
CD %CURDIR%
PUSHD %CURDIR%
SET PATH=%CURDIR%;%CURDIR%\dll;%PATH%
start "" %CURDIR%\myApp.exe
POPD
ENDLOCAL
I created this batch in the same directory as the executable, MyApp.exe. I was expecting it would find the DLLs, same way App Paths PATH setting did. The Batch file errors out not being able to find the DLLs. Do we need to register DLLs in this case? Why is it treated differently?
Notes:
If I copied all the required DLLs to the same directory as the executable (without a DLL sub-directory), it runs fine without needing to worry about PATH or registering dlls.
We used to use installShield to install before, but admins have automated scripts to copy files, they shied away from InstallShield programs after the first install. I am trying to refine the process, so what they copy will be simplified.
Thanks in advance for all your valuable comments and suggestions.-Sam
Why is it treated differently?
Because Windows is a mess when searching for libraries. See http://msdn.microsoft.com/en-us/library/windows/desktop/ms682586.aspx#search_order_for_desktop_applications
There are many elements to how the search order is determined, but in general it is like this
Check for the library...
already loaded in memory
on the KnownDLL list
in the application's directory
in the System directory
in the 16-bit System directory
in the Windows directory
in the current working directory
in the directories listed in the PATH environment variable
Overall I would agree with what MSDN states on their DLL Redirection page
It is good practice to install application DLLs in the same directory that contains the application
However, if using sub-folders is how you want to organize your application,
you might take a look into using Application Manifests. Something else to try would be to set the library directory as the working directory
#ECHO off
SETLOCAL
SET "CURDIR=%~dp0"
PUSHD "%CURDIR%\dll"
start "" /D "%CURDIR%\dll" "%CURDIR%\myApp.exe"
POPD
ENDLOCAL

Customize install-log location in Visual studio setup projects

The SetUp projects from Visual Studio will have their installation logs under temp folder with the name format like " %temp%\ .log "
Can I have some customization done here, so that these installation logs will go to a specific folder ?
You can change the location that MSI logs are written to by invoking MSIEXEC with the /L <logfilepath> argument. If you cannot change the command line arguments (such as if the MSI is invoked by a setup executable), edit the registry to change the default log location.

How to run QuickTime-associated file from NSIS installer?

We require users to have a copy of QTJava.zip in their jre/lib/ext folder so that we can play QuickTime files without adding to the classpath. QuickTime provides an installation process for this here: http://commons.oreilly.com/wiki/index.php/QuickTime_for_Java:_A_Developer%27s_Notebook/Getting_Up_and_Running_with_QuickTime_for_Java (see the section labeled Preflighting a QTJ Installation) So basically we need to run a QT-associated file from within the installer - since QT will already be installed, it will just launch the movie player when the ".mov" file is run.
We have a selection dialog where the user selects his JRE, and we'd like to prompt the user to run this installer immediately after this step (assuming QTJava isn't there already; we do check for this). Assuming the ".mov" file resides in the base installer folder, what steps are involved in "running" this file? Nothing so far has worked, and listing each method we've tried would take up pages, so a fresh perspective would be helpful.
Running non .exe/.cmd/.bat files requires ExecShell. ExecShell is as close to "double-click in explorer" you are going to get.
But there is a problem here, .mov is a common extension and you don't know what the end user has set to open .mov files, it could be MPC, VLC, mplayer etc so just using ExecShell could fail.
It is probably better to try to locate QT and execute it directly:
ReadRegStr $0 HKLM "SOFTWARE\Apple Computer, Inc.\Quicktime" "InstallDir"
ExecShell "" '"$0\QuicktimePlayer.exe"' '"$Instdir\MyFile.mov"'

Resources