Buenas días amigos.
Tengo una duda con respecto a la desinstalación de un programa desde un archivo Batch
La única forma en que puedo ejecutar la desinstalación del programa es mediante esta linea que extraje del UninstallString del editor de registro.
rundll32.exe dfshim.dll,ShArpMaintain ComponentesHarware.application, Culture=neutral, PublicKeyToken=b3fd472d4be1fc0f, processorArchitecture=msil
Pero no encuentro una manera de hacer que la desinstalación sea sin intervención del usuario, ya que al ejecutar la linea muestra la ventana de desinstalación pero pide la confirmación (aceptar).
Use el parámetro /S pero me da error, diciendo que el programa no se ha podido desinstalar.
Hay alguna forma de lograr que se realice la desinstalación sin que pida darle a aceptar ?
De antemano muchísimas gracias por el apoyo.
Question about unattended or silent uninstallation
Moderator: DosItHelp
-
- Posts: 43
- Joined: 12 Dec 2021 06:45
Question about unattended or silent uninstallation
Last edited by MauricioDeAbreu on 11 Nov 2024 12:50, edited 1 time in total.
Re: Duda con desinstalación desatendida o silenciosa
We do ask that all posts are in English on the forum. If you need language specific support I would suggest you post on StackOverFlow which has dedicated sites for several languages.
-
- Posts: 43
- Joined: 12 Dec 2021 06:45
Re: Duda con desinstalación desatendida o silenciosa
Sorry, the browser translates automatically, so I thought I was in Spanish.
Good morning friends
I have a question regarding the uninstallation of a program from a Batch file
The only way I can execute the uninstallation of the program is through this line that extrajects from the uninstallstring of the registration editor.
rundll32.exe dfshim.dll,ShArpMaintain ComponentesHarware.application, Culture=neutral, PublicKeyToken=b3fd472d4be1fc0f, processorArchitecture=msil
But I can not find a way to make the uninstallation it is without user intervention, since when executing the line it shows the uninstall window but asks for confirmation.
Use the / s parameter but it gives me error, saying that the program has not been uninstalled.
Is there any way to get the uninstallation without asking to accept?
Thank you very much for the support.
Good morning friends
I have a question regarding the uninstallation of a program from a Batch file
The only way I can execute the uninstallation of the program is through this line that extrajects from the uninstallstring of the registration editor.
rundll32.exe dfshim.dll,ShArpMaintain ComponentesHarware.application, Culture=neutral, PublicKeyToken=b3fd472d4be1fc0f, processorArchitecture=msil
But I can not find a way to make the uninstallation it is without user intervention, since when executing the line it shows the uninstall window but asks for confirmation.
Use the / s parameter but it gives me error, saying that the program has not been uninstalled.
Is there any way to get the uninstallation without asking to accept?
Thank you very much for the support.
Re: Duda con desinstalación desatendida o silenciosa
You have not indicated the way to provide the confirmation... If it is just the Enter key, try:
If it is a "S" key, try:
If this don't works there are still other options...
Antonio
Code: Select all
echo/| rundll32.exe dfshim.dll,ShArpMaintain ComponentesHarware.application, Culture=neutral, PublicKeyToken=b3fd472d4be1fc0f, processorArchitecture=msil
Code: Select all
echo S| rundll32.exe dfshim.dll,ShArpMaintain ComponentesHarware.application, Culture=neutral, PublicKeyToken=b3fd472d4be1fc0f, processorArchitecture=msil
Antonio
-
- Posts: 43
- Joined: 12 Dec 2021 06:45
Re: Duda con desinstalación desatendida o silenciosa
Thanks for replying.
It is accepted with the ENTER key.
and no, unfortunately it didn't work...
Thank you in advance for any other suggestion.
It is accepted with the ENTER key.
and no, unfortunately it didn't work...
Thank you in advance for any other suggestion.
Re: Question about unattended or silent uninstallation
Try this:
Further details at this answer
Code: Select all
@if (@CodeSection == @Batch) @then
@echo off
rem Use %SendKeys% to send keys to the keyboard buffer
set SendKeys=CScript //nologo //E:JScript "%~F0"
rem Start the other program in the same Window
start "" /B rundll32.exe dfshim.dll,ShArpMaintain ComponentesHarware.application, Culture=neutral, PublicKeyToken=b3fd472d4be1fc0f, processorArchitecture=msil
rem Enable next line if there are synchro problems
REM ping -n 4 localhost > NUL
rem Send the ENTER key
%SendKeys% "{ENTER}"
goto :EOF
@end
// JScript section
var WshShell = WScript.CreateObject("WScript.Shell");
WshShell.SendKeys(WScript.Arguments(0));