/build/static/layout/Breadcrumb_cap_w.png

Can install printer driver but cannot uninstall silently :-(

I have a Lexmark MX310 printer and I made a silent install installation with their package builder.
We end up with 2 files:

LexmarkPkgInstall.cab
LexmarkPkgInstall.exe

We launch the exe and it gets installed silently. Perfect
What we cannot do is uninstall it with the command from the registry: "C:\Program Files\Lexmark MX310 Series\Install\x64\LMADVinstallgui.exe" /u OEMProductName="Lexmark MX310 Series"

It launches a gui to uninstall some or all components:

3LcH4P.jpeg

I cannot find switches for it. I already tried /s /silent /quiet /uninstall

0 Comments   [ + ] Show comments

Answers (3)

Posted by: anonymous_9363 6 years ago
Red Belt
0
Applications are just a bunch of files and/or registry data. Build yourself a script to remove the relevant files and/or registry data, remembering that printer connections are made per-user.

Alternatively, you may want to use AppDeploy's Repackager (if you don't already have an MSI authoring tool) to create an MSI from the legacy (i.e. non-MSI) installer that Lexmark creates. You can then use standard Windows Installer command lines to install/uninstall. The caveat about connections still applies, though.
Posted by: kingskawn 6 years ago
Senior Purple Belt
0
I asked because I managed to get the silent install working and I thought the uninstall would be simple as well
Posted by: Martureo 2 years ago
White Belt
0

Get DPINST it works great for adding and removing drivers. We tend to extract the driver files and never install the software with it unless it is absolutely required.  Typical methods I know of are:

1. Use an extraction utility

2. Vendor media provides an extract switch (eg: setup.exe -e"<path you want it to extract to>"

3. Execute the media and do all prompts until you get to the one that indicates its about to install the media now. Then goto the default temp location for your system, where the media extracted to, and obtain the extracted installation media from there. Note: you may want to clear out the temp folder before hand as it is easier to find.


To get the install and uninstall command lines, you will need to identify your installer type.  The most common installer types used by vendors are, INNO, WISE, INSTALLSHIELD, MICROSOFT INSTALLER, JAVA, ORACLE, etc. Each one has their own standard installer switches. Even the uninstallers can be different switches than their installer switches, be aware.  Again, typically a good vendor will provide help switches with their installers via admin support documentation or run their installer against the help switch (make sure you use the installers help switch) ... for the most part, there are very few who do not use the standard -help or -? but everyone else does.


Another method is used for silent deployments, when developers refuse to provide switches to their clients, and is the last thing you will want to try before needing to record-repackage the installation via a snapshot utility like InstallShield, etc.  Typically, you can record your setup using the command line setup.exe -r -f1"C:\Temp\setup-install.iss", and it will create a response file you will use at install time. Note: you can ommit the -F1 and find the recorded setup.iss file located in C:\Windows).  To install using your new response file (setup.iss file), simply use (C:\Package\setup.exe -s -f1"C:\Package\setup-install.iss") you can ommit the -f1 as long as the iss file is in the same directory as your installer.


NOTE: you can also obtain uninstall command lines from the registry - whenever a program installs it is recorded and tracked in one of 2 locations in the registry, among others. Look at the GUID\UninstallString property - sometimes you will see QuietUninstallString located under one of the following registry hives:

x64 bit hive is : HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall

x86 bit hive is : HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall


Also, don't forget to use the proper syntax and case sensitivity when querying with WMI for your Printer Driver info.  I Used the following powershell script to get names of all Drivers already installed on a system, and then query for the new Drivers info after installed - i use the 'Name' property to identify the driver  in this example.(wish they all stuck to a standard and included Manufacturer at this level of WMI to, anyhoo..)


1. Query for Driver Names installed, and log the list; typically needed to compare list before and after driver install.


# Don't forget to use the proper syntax and case sensitivity when querying with WMI.

CLS

Get-WMIObject -Query "SELECT * FROM Win32_PrinterDriver" | Select-Object 'Name'


2. Install your new driver

3. Again, Query for Driver Names installed, and log the list; typically needed to compare list before and after driver install.


# Don't forget to use the proper syntax and case sensitivity when querying with WMI.

CLS

Get-WMIObject -Query "SELECT * FROM Win32_PrinterDriver" | Select-Object 'Name'


4. Compare List and ensure you have identified your drivers installed vs new drivers installed.

5. Query the new drivers info


# Don't forget to use the proper syntax and case sensitivity when querying with WMI.

CLS

$WMI_Query_Result =""

$WMI_Query_Result = Get-WmiObject -Class Win32_PrinterDriver -Filter "Name = 'Microsoft Print To PDF,4,Winodws x64'" | Select-Object -Property 'Name', 'Version', 'Scope', 'Path', 'DriverPath', 'DependantFiles', 'ClassPath', 'DeviceID, 'PNPDeviceID', 'Manufacturer', 'Description'

$WMI_Query_Result


Again, its just a simple first start approach for some - you will definitely need to look into more PS WMI scripting options if needing to do more.


Cheers and Good luck!

 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ