Script to uninstall/reboot/install Software
hi all,
completely new to KBOX, so help is much appreciated...
I am trying to create a script to remove all McAfee software installed on a client machine, i.e., VSE8.5 or VSE8.7 or VSE8.8 + McAfee agent (4.5 in our case). Then reboot the client machine and clean install again the McAfee agent (4.5) and VSE8.8. For this I've created 2 batch files.
If I run the batch files manually the work as designed; however I am struggling to set this on K1000 - Scripting - Scripts. I don't know how to add a reboot task and make sure that the install carries on after it.
To sum up what I want to achieve:
Task 1: remove all Mcafee SW installed;
Task 2: reboot machine *
Task 3: Clean install McAfee agent + VSE8.8
* Task 2 could be supressed by adding a shutdown -r at the end of task 1
Any comments/help are much appreciated.
completely new to KBOX, so help is much appreciated...
I am trying to create a script to remove all McAfee software installed on a client machine, i.e., VSE8.5 or VSE8.7 or VSE8.8 + McAfee agent (4.5 in our case). Then reboot the client machine and clean install again the McAfee agent (4.5) and VSE8.8. For this I've created 2 batch files.
If I run the batch files manually the work as designed; however I am struggling to set this on K1000 - Scripting - Scripts. I don't know how to add a reboot task and make sure that the install carries on after it.
To sum up what I want to achieve:
Task 1: remove all Mcafee SW installed;
Task 2: reboot machine *
Task 3: Clean install McAfee agent + VSE8.8
* Task 2 could be supressed by adding a shutdown -r at the end of task 1
Any comments/help are much appreciated.
0 Comments
[ + ] Show comments
Answers (3)
Please log in to answer
Posted by:
ddevore
12 years ago
I can think of a few ways you could accomplish this one. The easiest would be through the EPO management with McAfee if you have it.
An alternate would be to setup to run a batch file to remove the old ones, add a run once key, add a auto logon for one login then reboot. Here is a snippet from one I used to can McAfee all together on about 6500 XP machines. I set it up over a year ago and have not used it in forever so be sure to test well. I stole the auto logon part from the KACE article to join an AD domain (gotta give credit).
REM - Removes Virusscan 8.6
msiexec.exe /qn /x{35C03C04-3F1F-42C2-A989-A757EE691F65}
REM - Removes Virusscan 8.7
msiexec /qn /x{147BCE03-C0F1-4C9F-8157-6A89B6D2D973}
REM - Run Once to install McAfee on reboot *** DONT FORGET TO UPDATE PATH TO INSTALLER
reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce" /v InstallMcAfee /t REG_SZ /d "CMD /C \"\\PATH TO YOUR INSTALLER"" /f
REM - Auto Admin Login one time *** UPDATE PASSWORD
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v AutoAdminLogon /t REG_SZ /d 1 /f
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v DefaultUserName /t REG_SZ /d administrator /f
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v DefaultPassword /t REG_SZ /d YourPASSWORD /f
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v DefaultDomainName /t REG_SZ /d localhost /f
REM - Reboot
Shutdown -r -t 15
Dennis
An alternate would be to setup to run a batch file to remove the old ones, add a run once key, add a auto logon for one login then reboot. Here is a snippet from one I used to can McAfee all together on about 6500 XP machines. I set it up over a year ago and have not used it in forever so be sure to test well. I stole the auto logon part from the KACE article to join an AD domain (gotta give credit).
REM - Removes Virusscan 8.6
msiexec.exe /qn /x{35C03C04-3F1F-42C2-A989-A757EE691F65}
REM - Removes Virusscan 8.7
msiexec /qn /x{147BCE03-C0F1-4C9F-8157-6A89B6D2D973}
REM - Run Once to install McAfee on reboot *** DONT FORGET TO UPDATE PATH TO INSTALLER
reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce" /v InstallMcAfee /t REG_SZ /d "CMD /C \"\\PATH TO YOUR INSTALLER"" /f
REM - Auto Admin Login one time *** UPDATE PASSWORD
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v AutoAdminLogon /t REG_SZ /d 1 /f
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v DefaultUserName /t REG_SZ /d administrator /f
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v DefaultPassword /t REG_SZ /d YourPASSWORD /f
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v DefaultDomainName /t REG_SZ /d localhost /f
REM - Reboot
Shutdown -r -t 15
Dennis
Posted by:
dchristian
12 years ago
Posted by:
rgreg
12 years ago
Dennis: I believe there is some sort of corruption with the McAfee agent and/or VSE installed on some machines, hence ePO not working to force uninstall/install tasks....
David: I might have a look at your suggestion as it seems to be simple to implement.
Big problem is that KBOX is completely new to me.
Thanks for your help/suggestions so far
David: I might have a look at your suggestion as it seems to be simple to implement.
Big problem is that KBOX is completely new to me.
Thanks for your help/suggestions so far
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
so that the conversation will remain readable.