Silent Install MS Visio Viewer is working but not the Silent Uninstall using command line - command-line

I Tried to do the the silent install of MS Visio Viewer in my Sandbox and it Work
here is the code
visioviewer_4339-1001_x64_en-us.exe /quiet /norestart
and it work via command line.
However, when I tried the silent uninstall in the command line, the code wont work and the MS Visio wont be uninstalled.
Here is the code I Use.
MsiExec.exe /x visioviewer_4339-1001_x64_en-us.exe /qn
I hope someone could help me.
Thank you

I have found this:
MsiExec.exe /x {95160000-0052-0409-0000-0000000FF1CE} /qn
Obvious.

try using this command:
start /wait msiexec.exe /x{95140000-0052-0409-0000-0000000FF1CE} /qn /noreboot
I hope this will help you

Related

Is there a way to open a CMD window with a running command through Powershell?

I know it is possible to use a batch file, but due to a suggestion I switched a lot of my script over to PowerShell. The problem I ran into is that PowerShell is still missing some commands from CMD and has lower permissions when run as an Admin. Below is the current line I have been using.
powershell -Command "Start-Process 'cmd' -Verb RunAs -ArgumentList 'del /s "C:\Users\*.mp3"'"
I ran it in both 5.1 and 7.
It works with a simple command like opening the calculator or sending a ping, but I can't get the del command to work. The goal is to open a CMD window which will then delete all mp3 files. I know there are probably better ways to do this, but I more so want to know if it's possible than efficient. Thank you for your time!
This works somewhat
Start-Process cmd "/c del /S C:\Users\*.mp3"

Install VMware Player with License using PowerShell

I want to install VMWare Player using PowerShell. I also want to license it. This works fine when you install VMware Workstation:
Start-Process -FilePath PATH_TO_INSTALLER -ArgumentList "/s /v /qn EULAS_AGREED=1 SERIALNUMBER=LICENSE_KEY"
The tried the same using the Player but as long as I set the SERIALNUMBER options, the Player is not installed. Here is the documentation of VMware showing that it should work:
https://docs.vmware.com/en/Horizon-FLEX/1.12/com.vmware.horizon.flex.admin.doc/GUID-255844AB-0C3C-4C3D-9BE1-73182B66404D.html
I tried the following command to install the player (from the docs):
VMware-player-full-x.x.x-xxxxxx.exe /s /v "/qn REBOOT=ReallySuppress EULAS_AGREED=1 SERIALNUMBER=xxxxx-xxxxx-xxxxx-xxxxx-xxxxx"
Do anyone had this issue too or know a way to solve this?

How to install MS ODBC driver using PowerShell

I've written a script that downloads the MS ODBC driver, installs it, then checks the new driver .dll exists. However, I'm stuck on the "installs it" part.
The best version of the install command I have right now is: Start-Process -Filepath "msiexec.exe" -ArgumentList "/i msodbcsql.msi", "/qb", "IACCEPTMSODBCSQLLICENSETERMS=YES"
When I run this on its own (to troubleshoot it), however, the installer launches and immediately displays the error:
The required IACCEPTMSODBCSQLLICENSETERMS=YES command-line parameter is missing.
If I run Start-Process -Filepath msiexec -ArgumentList /i, "msodbcsql.msi" the regular GUI installer starts up which presumably means the "/qb", "IACCEPTMSODBCSQLLICENSETERMS=YES" part of the command is the problem.
I'm having no luck with this in spite of adapting every example I can find on the web. I'd be grateful for help!
The problem: I wasn't running PowerShell in Administrator mode 😖

Install Multiple msi files consecutively

I have just recently started using (and learning how to) script. I am using Powershell ISE and am trying to create a script that can be run on a new computer to install multiple/various programs. I have the programs in both .exe and .msi and want the programs to install silently, and consecutively. Again I am a beginner, but have put together the script below to get this done. I am trying to find out what variable/command will ensure that the programs install one by one.
msiexec.exe /q /i '\\Server\Folder\Applications\msi files\file.msi'
msiexec.exe /q /i '\\Server\Folder\Applications\msi files\file.msi'
msiexec.exe /q /i '\\Server\Folder\Applications\msi files\file.msi'
msiexec.exe /q /i '\\Server\Folder\Applications\msi files\file.msi'
msiexec.exe /q /i '\\Server\Folder\Applications\msi files\file.msi'
msiexec.exe /q /i '\\Server\Folder\Applications\msi files\file.msi'
I originally started this as a .bat file, and can run it to install the .exe files just fine, however they all run at the same time. Therefore, I figured creating a script (rather than a .bat file) would be my best bet. Any and all input and or help is greatly appreciated!
You cannot run multiple .msi files all at once if that's what you're wanting. If you want to run them consecutively it would look like this in Powershell:
If it's an msi:
Start-Process msiexec.exe -Wait -ArgumentList '/I ProgramName.msi /quiet'
If it's an exe:
Start-Process programname.exe -Wait -ArgumentList '/I /quiet'
And basically the -Wait parameter will wait until the windows installer closes until it proceeds to the next line of code. Some msi's do have different ways of classifying args depending on the developer. Sometimes it's /q, /qn or /quiet.
Windows Installer: the msiexec.exe engine should wait for your installation to complete before it exits. I suspect your command lines are wrong and that is why it looks like they all run and exit simultaneously.
Sample Command Line: Maybe try this command line (maybe put in MyTest.cmd and run):
msiexec.exe /i MySetup.msi /L*V C:\MyLog.log /qn ADDLOCAL=ALL REBOOT=ReallySuppress ALLUSERS=1
Repeat command line for each MSI you need to install.
Logging:The log files should have unique names, obviously. You can enable logging for all MSI installations (section 'Globally for all setups on a machine'). Then you will find a new MSI-log file with a random name in the system's %TEMP% folder after each MSI operation. Sort by change date to find the latest one. To find errors in MSI logs, try searching for "value 3".
More information available on request. Please do NOT add your own answer, edit your original question instead. Just add more info, delete or whatever you need. We have versioning so we can find what you delete as well if need be.

WUSA.exe not working while installing update?

i am using powershell to install windows update on a machine. I am using below command line to achieve so.
wusa.exe "file_path" \norestart \quiet
The update is not getting installed and throwing an error:
Windows update could not be installed because of error 2147942487 "The parameter is incorrect." (Command line: ""C:\windows\system32\wusa.exe" d:\riteshthakur\abc.msu \quiet \norestart")
AM i doing something wrong here ?
You need to use a forward slash for your parameters in Windows, typically:
wusa.exe "file_path" /norestart /quiet
Additionally, if you're having problems, try using the log parameter to see what's going on:
wusa.exe "file_path" /norestart /quiet /log:C:\wusa.log