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.
Related
I have an app for Windows. I build the installer for this application using InstallForge.
Task: transfer metadata from the installer file (1 specific parameter) to the folder with the installed application.
For example: InstallerMyApp.exe contains in its metadata the parameter "Modification date" with value "01.02.2023". During the installation I specify the path C:\Program Files\my app.
As a result, I want the installer to create in the folder C:\Program Files\my app the file "Modification date.txt" which will have the value "01.02.2023".
To paraphrase, I need to automatically save the installer metadata in the folder where the application is installed.
How is it possible to do this?
I would be grateful for even the slightest hint.
Frankly, I have no idea what to do.Perhaps I should give up InstallForge.
Visual Studio creates a hidden folder in the solution root of web projects named .vs. Inside there is a config sub-folder with an applicationhost.config file. If the .vs folder is missing Visual Studio will create it again either when I open the solution or maybe when I start the debugger.
I assume that this applicationhost.config file is being copied from some default location. I wish to find the source file and make some changes so that my preferred settings will be in effect by default.
I am currently using Visual Studio 2019 16.3.7.
Where does Visual Studio copy this file from?
I found applicationhost.config in these locations on my PC:
C:\Program Files (x86)\IIS Express\config\templates\PersonalWebServer
C:\Program Files\IIS Express\config\templates\PersonalWebServer
C:\Users\%USERNAME%\Documents\IISExpress\config
I altered each systematically and found that in my case Visual Studio 2019 is copying the file from path 1.
The applicationhost.config is copied from
%windir%\system32\inetsrv\config
You can get %windir% from the set command in a command window. (usually C:\windows)
From Microsoft Forum User lextm...aka Lex Li
You are encouraged to modify this file via appcmd.
http://learn.iis.net/page.aspx/114/getting-started-with-appcmdexe/ Run
this command at an elevated command prompt is enough. To edit the file
directly, you need to elevate Notepad.exe and then open it. This is
not recommended unless you are quite familiar with the syntax. The
history folder contains the old copies of the config files, and
editing them does not make changes to current IIS settings.
The help documents iisexpress /? /config help states:
The full path to the applicationhost.config file. The default value is the IISExpress\config\applicationhost.config file that is located in the user's Documents folder.
Of course you can change the path to whatever using the argument as well.
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
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.
I'm trying to run a commands using Tf Command-Line Utility I'm getting errors when trying to connect to TFS server. I'm not sure what tf tool is expecting as far as parameters.
It tells me to connect to workspaces by running tf /collection:TeamProjectCollectionUrl'
To get the TeamProjectCollectionUrl I went into Visual Studio Team Explorer, looked at properties of a project and copied URL property. The url starts with vstfs://
You want to use the standard HTTP or HTTPS URL to specify your project collection. (This is the same URL that's shown in the connection dialog in Visual Studio.) For example:
http://tfs.contoso.com:8080/tfs/DefaultCollection
TFS installs on port 8080 by default, and (beginning in TFS 2010), the name of your project collection is the suffix.
Alternately, you shouldn't need to specify the project collection - if you run the tf resolve command from one of your working folders, it will determine the server information automatically. That is, if you have the workspace mapping:
$/Project/Source -> C:\Work\Source
If your current working directory is C:\Work\Source and run the tf command line client, it should locate your TFS workspace automatically.
1- Add "C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE" path into Environment variable path.
2 - Create a batch file (simply copy and modify the below commands and save into file with ext .bat)
CLS
tf get $/Project/Source /recursive /force
Pause
exit
3- Copy .bat file and place into your local Mapped folder and run.