Installing any exe without having manual intervention using powershell - powershell

How could i install any ".exe" without having any user action, means wherever the user interaction needed it should continue with the default selection (eg: license agreement) using powershell
any reference or links will help
[Discussed Below: Mostly wanted to install visual studio and visual studio related update]

If you are talking about Visual studio, and Microsoft product in general, you should look for unattended installation for example : How to: Create and Run an Unattended Installation of Visual Studio.

For Visual Studio below command works:
Start-Process -FilePath "C:\Installs\VS2013\vspremium.exe" -ArgumentList "/adminfile C:\Installs\VS2013\AdminDeployment.xml /passive /norestart" -Wait -NoNewWindow -PassThru
Also in the AdminDeployment.xml file you can make NoWeb="yes", it works otherwise as well.
<BundleCustomizations TargetDir="default" NoWeb="yes"/>

Related

How i can install crystal report silent mode using InstallShield?

I create a Setup with Installshield 2010. my setup has a prerequisites for reporting viewer so i want to install CR_Runtime13.0.12.msi silently. for this situation we want a command to start the cr_runtime setup silent, after many searches on the net i found this command.
msiexec /i "ISSetupPrerequisites\CRRuntime_64bit_13_0_12\CRRuntime_64bit_13_0_12.msi" /qb /norestart
when i use this command on Cmd it works well and setup is begins silently with progress bar but when i use this command on installshield, it show me an error and a help every time.
please help me to create a command for installshield to install cr_runtime13.0.12 silently.
at the end i Attached installshield command page and my help to this Question.
There are solutions in the StackOverFlow it does not Clear.
Thanks
You only need to add the msi to the Files To Include. Installshield does the rest.
Try to change the command line only to
/qb /norestart
PS:
I think the command is "/qn /norestart" and not qb.
Remove everything else.
Try it

Can I detect in Powershell that I am running in VS Code's integrated terminal?

I would like to modify the standard PowerShell profile in Windows if the Powershell opens inside VS Code integrated terminal (when you are editing e.g. python scripts in VS Code, rather than PS scripts, which opens the ISE profile in any case).
Is there some environmental variable that gets set by the integrated PowerShell? Or is there some way of opening Powershell with a particular profile, instead of the default?
Thanks
VS Code creates an environment variable named TERM_PROGRAM. You can check it for a value of vscode, something like this:
if($env:TERM_PROGRAM -eq 'vscode') {
# do some stuff...
}
If you want to check if you're running within PowerShell Integrated Console (ships with PowerShell extension) under vscode and not just any powershell console running under vscode, you can:
if ($Host.Name -eq 'Visual Studio Code Host') {
Write-Output 'PowerShell Integrated Console'
}
This is meaningful to detect because it is the only powershell console host that provided full debugger support (eg. break on exception experience) and debugger integration with vscode.
You said you're into modifying profile when running within vscode, then you should check (again with PowerShell integrated console which ships with PoweShell extension):
PS> $PROFILE.CurrentUserCurrentHost
C:\Users\username\Documents\PowerShell\Microsoft.VSCode_profile.ps1
PS> $PROFILE.AllUsersCurrentHost
C:\Program Files\PowerShell\7\Microsoft.VSCode_profile.ps1
If people are working on PowerShell code within Visual Studio Code, then why they would NOT install PowerShell extension which ships with a specific console that fully integrates with Visual Studio code and on the top of that, provides you a profile file specifically geared towards Visual Studio code?

Having issues scripting .msi custom setup

I'm currently trying to install an .msi silently, but can't get past the custom setup part.
I've tried the code below, but it keeps popping up with the Windows Installer help guide.
$AppSetup = msiexec --% /i '\deploy\PostImageInstall\Logger Pro 3.msi' INSTALLDATASHARE="INSTALL" /qn /L*v %TEMP%\LoggerPro3_msilog.txt
The code is supposed to silently install the .msi with the custom setup option.

Silent Installation of FortiClient.msi VPN Only

I am trying to do a silent installation of FortiClient.msi, and here is what I have so far:
Start-Process "[Insert MSI Path]" /qn -Wait
I would like to make sure that the VPN is the only part that is installed. Is there a parameter that tells the msi to only install VPN, or will the installer automatically install VPN only?
You can open the msi file with ORCA and check the possible Properties. For example there is a property DISABLEFEATURE which could do your wanted stuff.

Install4j - How can I install the MSVC++ Redistributable Binary if needed?

I'm wondering if there's some way to use my install4j utility to handle installing the MSVC++ redistributable libraries if they are not already on the client machine?
Is there anyone who has an example of how they did that to save me from re-inventing the wheel?
You can use the "Run executable or batch file" action to run an external installer.
Most installers have an "unattended" mode that does not require user interaction. Activating unattended mode for the MSVC++ redistributable package varies from version to version, for 2010/2012 and 2013 the required arguments are
/passive /norestart
For 2015, the arguments are
/install /passive /norestart
In the editor of the "Arguments" property, make sure to put each argument on a new line.