Link to home
Start Free TrialLog in
Avatar of bbimis
bbimis

asked on

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

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!
ASKER CERTIFIED SOLUTION
Avatar of bbimis
bbimis

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Avatar of leakim971
leakim971
Flag of Guadeloupe image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
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.
Avatar of bbimis
bbimis

ASKER

i figured it out but thanks for the help the consol works most of the time but not all the time
Avatar of bbimis

ASKER

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

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.
Avatar of bbimis

ASKER

cmd.exe /c allows you to use system commands like ipconfig and all unless i'm just adding the extra layer for no reason
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
Avatar of bbimis

ASKER

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!