scottpowers82 Posted May 25, 2012 Posted May 25, 2012 Hey Everyone, Wasn't sure if I should put this here or in the scripting section since I'm not sure if my problem is with my script or possibly some group policy setting. Anyway, here is the problem. Our license agreement with Sophos is ending within the next month and I have been tasked with setting up a SCCM server (our districts first...finally!!) and using Microsoft Endpoint Protection to replace Sophos since it is a much better deal than what we spend with Sophos. So, I wanted to use a script that would uninstall Sophos and then go ahead and install our SCCM client and point it to our site server. (If you know of a better/easier way, let me know as I am just now starting to get up to speed with SCCM). Now for the weird part. I am able to run the script both from the local desktop of the machine and from the network by double-clicking it and running it as Administrator (I'm talking mostly Win7Pro 32bit here) and it successfully uninstalls Sophos and installs the SCCM client (which then in part installs Endpoint Protection). However, when I set it up as a start up script, I can see that it uninstalls Sophos, but it does NOT install the SCCM client. I have provided the script below in case that is the problem (I'm not the best coder, but it seemed right to me) or if someone else finds it useful. Or if the problems is perhaps some weird group policy setting let me what you think as I am a little under the gun here to get this rolling before school lets out and our license for Sophos ends. Thanks in advance for any help REM --- Created by: Scott Powers REM --- Purpose: Remove Sophos and Install SCCM 2012 Client REM --- Date: 5/25/2012 REM --- Version: 1 @echo OFF REM Add detection script to see if its installed REM --- Check for an existing installation of Sophos AutoUpdate if exist "C:\Program Files\Sophos\Sophos Anti-Virus\SavMain.exe" goto RemoveSophos if exist "C:\Program Files (x86)\Sophos\Anti-Virus\SavMain.exe" goto RemoveSophos goto InstallSCCMClient :RemoveSophos REM Remove Sophos AutoUpdate start /wait MsiExec.exe /X{15C418EB-7675-42BE-B2B3-281952DA014D} REBOOT=SUPPRESS /qn REM Remove Sophos Remote Management System start /wait MsiExec.exe /X{FED1005D-CBC8-45D5-A288-FFC7BB304121} REBOOT=SUPPRESS /qn REM Remove Sophos Anti-Virus start /wait MsiExec.exe /X{9ACB414D-9347-40B6-A453-5EFB2DB59DFA} REBOOT=SUPPRESS /qn :End REM Install SCCM Client and Assign to SC1 Site :InstallSCCMClient \\SCCM\SMS_SC1\Client\CCMSetup.exe /logon SMSSiteCode=SC1 :End REM --- End of the script
ChrisH Posted May 25, 2012 Posted May 25, 2012 It might be timing out on the startup script there is a time limit to how long a script can run and I have noticed the SCCM client can take a long time to install especially the .net 4 bits if you don't already have them on.
scottpowers82 Posted May 25, 2012 Author Posted May 25, 2012 I was thinking maybe the same thing, however, I do have a couple Group Policy settings in place that (I thought) were supposed to help alleviate that. The ones I have in place are: Computer Configuration > Administrative Templates > System > Group Policy > Startup Policy Processing Wait Time: Set to 60 Computer Configuration > Administrative Templates > System > Logon > Always wait for the network at computer startup and logon: Enabled Should there be another policy that I should be setting that would help make this script work? I seem to recall something about there being a limit on scripts only being able to run for up to 10 minutes before they officially time out. Also, does my script look correct to everyone? Been a while since I made a batch file and wanted to be sure that it at least seemed like it would work. Thanks for the quick response too
synaesthesia Posted May 25, 2012 Posted May 25, 2012 This is going to sound perhaps a little simplistic, but by default, the installation of forefront removes existing AV software unless you tell it otherwise. Is there something I'm missing (i.e it only works for certain products) or are you overcomplicating it?
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now