Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

remove eset silently and remotely and install system center endpoint silently and remotely

Posted on 2014-01-24
9
Medium Priority
?
5,368 Views
Last Modified: 2014-02-07
i have a bunch of windows xp machines that i need to uninstall eset on remotely and then install system center endpoint protection.

is this even possible? i'm hoping to do something along these lines
@echo off
setlocal
for /f "usebackq" %%a in ("pc1.txt") do (
	net use \\%%a\IPC$ "password" /user:Administrator
	for %%f in (%FileList%) do (
		<insert code here to remove eset silently>
                                    display console message stating removal is done
                                   <insert code to install system center endpoint silently>
	)
	net use \\%%a\IPC$ /delete
) 

Open in new window


my first thought was to check the localmachine registry for an uninstall string but i do not see one.  
Some help on this would be greatly appreciated.
Thanks!
0
Comment
Question by:bbimis
  • 5
  • 3
9 Comments
 

Accepted Solution

by:
bbimis earned 0 total points
ID: 39806722
i figured out how to uninstall eset silently and remotely
use the following:

cmd.exe /c psexec \\ipaddress -u username -p password msiexec nameofeset.msi /uninstall /quiet /norestart
only question now is how do you install system center endpoint protection silently?
thanks!

i'm thinking something along these lines but i'm not sure if this is correct
@echo off
setlocal
for /f "usebackq" %%a in ("pc.txt") do (

	REM Code to silently uninstall eset
                     cmd.exe /c psexec %%a -u administrator -p censoredpassword -c msiexec eset.msi /quiet /norestart
	echo "eset uinstalled"
                     
                    REM Code to silent install system center endpoint protection
                    cmd.exe /c psexec %%a -u administrator -p censoredpassword -c endpoint.exe /s /q
) 

Open in new window

0
 
LVL 83

Assisted Solution

by:leakim971
leakim971 earned 400 total points
ID: 39808229
why don't you install it on the remote computers using the management console?
0
 
LVL 31

Expert Comment

by:serialband
ID: 39816263
FYI.  You can also remove MSI installs with MsiExec.exe

NOD32 version 3.0.695.0
MsiExec.exe /qn /x{C10D6AB8-05BB-422D-AAE3-36D6E0381487}

ESET Smart Security 4.2.35
MsiExec.exe /qn /x{751CCF7A-CFF6-4A4B-9119-D4448D87B025}

ESET Endpoint Security 5
MsiExec.exe /qn /x{950B1859-7F95-4CCF-8674-0F843B58CCAB}

ESET Remote Administrator Console
MsiExec.exe /qn /x{6E5A47E7-4E1F-4507-95D0-59F9E8BC05BD}

/q mean quiet.
/n means norestart
/x means uninstall

You can find those class strings in the Registry when you search for the product.  The uninstaller section should have a link to the class string.  This method works if you no longer have the installer available.

You would run them with psexec -s as the system account.

You generally don't want to enter any passwords on the command line or in a script.  You should change your password very frequently if you do that.  If you use a Domain Admin Account with the local Administrators group access, psexec will use your logged in, cached credentials.  You won't need to enter your username or password when running psexec.

If your systems aren't in a Domain, you should set your local Administrator password to be the same on every system and put them in the same workgroup.  Since the Local Administrator account always has the same SID, the credentials passed by psexec will be the same.  If the local user needs admin access, put them in the group and reserve the Administrator account for the System Administrator to do work and write scripts.  

Only run psexec on a local trusted network.  Change your password frequently.
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Closing Comment

by:bbimis
ID: 39826094
i figured it out but thanks for the help the consol works most of the time but not all the time
0
 

Author Comment

by:bbimis
ID: 39839822
serialband:
what would be wrong with this code then? it basically just sets there and never uninstalls
I know the registry key is correct cause i took it directly from the registry to make sure as a test

@echo off
set code={D01521C5-ECC6-4A9E-A3E4-1B981D7B7504}

for /f "usebackq" %%a in ("clist.txt") do (
                   
                     echo " ">> newinstalllog.txt
                     echo "Computer information for " %%a >> newinstalllog.txt

                     REM CODE TO INSTALL PATCH IF WINDOWS XP SP2
                     cmd.exe /c psexec \\%%a -s c:\tony\patch.exe /quiet /norestart  >> newinstalllog.txt
                     
                     REM REMOVE ESET
                     echo key is %code% 
                    
                     REM cmd.exe /c psexec \\%%a -s "c:\Program Files\ESET\ESET NOD32 Antivirus\callmsi.exe" /x %code% /qn /norestart Password=eset  
                     cmd.exe /c psexec -s  \\%%a  MsiExec.exe /qn /x%code% Password=eset
                    
                     REM CODE TO INSTALL NEW VIRUS SOFTWARE
	
                      cmd.exe /c psexec \\%%a -s c:\tony\scepinstall1.exe /s /q 

Open in new window

0
 
LVL 31

Expert Comment

by:serialband
ID: 39840893
I'm not sure why you've added cmd.exe /c to your code.  I've always run psexec directly.  It's one less layer of code to run.
0
 

Author Comment

by:bbimis
ID: 39841881
cmd.exe /c allows you to use system commands like ipconfig and all unless i'm just adding the extra layer for no reason
0
 
LVL 31

Expert Comment

by:serialband
ID: 39842226
You can run those with psexec on the other system.

psexec -s \\computer ipconfig
psexec -s \\computer MsiExec.exe /qn /x{C10D6AB8-05BB-422D-AAE3-36D6E0381487}

If you have a local executable that isn't on your remote system, you can have psexec copy it over to a tempory directory.
psexec -c \\computer LOCAL_Exec_File
0
 

Author Comment

by:bbimis
ID: 39842286
okay but here is where my issue is.
i notice you have /qn /x{registry key here}
where does it get the password variable?  not for administrator but for the eset itself
we have eset configured to use a password. if i manually uninstall eset i have to type in a password for it to remove.

I think thats why i keep getting the error 1603.
Thanks!
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Local Printing Using Remote Desktop Windows 7 sometimes has issues with printing to a local printer using a Remote Desktop Connection (RDC). The 1st step is to verify that printers are checked on the Local Resources tab of the Remote Desktop C…
Working from home is a dream for many people who aren’t happy about getting up early, going to the office, and spending long hours at work. There are lots of benefits of remote work for employees.
Learn the basics of if, else, and elif statements in Python 2.7. Use "if" statements to test a specified condition.: The structure of an if statement is as follows: (CODE) Use "else" statements to allow the execution of an alternative, if the …
How to install and configure Citrix XenApp 6.5 - Part 1. In this video tutorial we have explained step by step installation of Citrix XenApp 6.5 Server on Windows Server 2008 R2 is explained in this video. We have explained the difference between…
Suggested Courses

580 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question