Uninstall and Install Application batch file

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
Today2013
Posts: 3
Joined: 18 Sep 2013 09:28

Uninstall and Install Application batch file

#1 Post by Today2013 » 18 Sep 2013 09:50

Hello DosTips,

I created a batch script file for uninstall and install application.

See the batch script below:

Code: Select all


@ECHO OFF

Rem TITLE Uninstalling BRAVA READER. . .

ECHO Uninstalling BRAVA READER! previous version(s)...

wmic /node:"Worktation2" product where name="Brava! Reader 7.2" call uninstall

@echo off

ECHO Now...Installing a new version of BRAVA READER! ... Please wait!...

wmic /node:"\\MAT-Silver-l2m\FILES$ E:\internet\Brava Reader 7.2\BravaReader.exe" product where name="BravaReader.exe" call install

ECHO BRAVA READER! version 7.2 has been installed in your machine.

goto END
:END
pause
exit



the script line for the uninstall the application is working well, but the line to install the new version of the Brava Reader is not working...
The process of installation of Brava Reader is located another machine where the application is stored.

What I am missing in the line of call install.

Your help is much appreciated. Thanks.

foxidrive
Expert
Posts: 6031
Joined: 10 Feb 2012 02:20

Re: Uninstall and Install Application batch file

#2 Post by foxidrive » 18 Sep 2013 22:59

What error do you get? It looks like the space in the path could cause an issue.

Today2013
Posts: 3
Joined: 18 Sep 2013 09:28

Re: Uninstall and Install Application batch file

#3 Post by Today2013 » 19 Sep 2013 12:08

Thanks FoxDrive for replying my post.

After execution successfully from uninstall the BravaReader application, I got the following error when trying to install the new version of Brava Reader from another computer machine...

= Error description is : Invalid parameter...

Dos_Probie
Posts: 233
Joined: 21 Nov 2010 08:07
Location: At My Computer

Re: Uninstall and Install Application batch file

#4 Post by Dos_Probie » 19 Sep 2013 20:18

Try this, I revised your path with a colon after your .exe and now get a RPC server Alias not found message now..DP 8)

Code: Select all

wmic /node:"\\MAT-Silver-l2m\FILES$ E:\internet\Brava Reader 7.2\BravaReader.exe":product where name="BravaReader.exe" call install 

Today2013
Posts: 3
Joined: 18 Sep 2013 09:28

Re: Uninstall and Install Application batch file

#5 Post by Today2013 » 20 Sep 2013 08:28

I tried and add a colon after .exe and got an error "where - alias not found.

Post Reply