It seems the SCCM 2012 client will no longer install BITS 2.5 automatically. I’ve put this vbscript together to allow you to force BITS 2.5 onto Windows Server 2003 x86 or x64 without requiring multiple reboots/logons. If you don’t have an existing deployment infrastructure this eliminates a lot of extra work.
You will need to place this script in a folder, the client files in a source subfolder, and the BITS 2.5 hotfixes and a copy of pskill.exe in the bits25 subfolder. Modify the ccmsetup line of the script to suit your infrastructure.
This was written as a quick and dirty solution. It isn’t elegant but it works.
The script performs the following actions:
1. Install the correct BITS 2.5 patch depending on the platform.
2. Launch the BITS service if it isn’t running.
3. Use tasklist /svc output to identify the PID of the netsvc.exe instance BITS is running under.
4. Kill that instance of netsvc.exe. I had to use pskill because WMI wasn’t cutting it.
5. Update the required .dll files.
6. Restart BITS. SCCM will now recognize BITS 2.5 as being installed.
7. Execute ccmsetup.exe to complete the SCCM 2012 client installation.
August 8, 2012 at 1:20 pm |
to whom it may concern,
i know absolutely nothing about scripting….and am a little confused around how this process would work….would you be so kind as to provide me with a step by step on using your script and where certain files and folders should be placed?
September 24, 2012 at 6:36 am |
This solution will kill the “Server” (lanmanserver) service, and this service can not be restarted manually. So then using this be aware that your server will not be able to share any files or printers until restarted.
Unless I am missing something… ?
lanmanserver is in the name netsvc.exe process as BITS.
October 30, 2012 at 6:33 pm |
Great script. But I did notice that when you kill the BITS service it also takes out the Server and Workstation services, which is highly undesirable. I have appended net start commands to restart both services as well, otherwise this saves us a reboot.
November 1, 2012 at 5:54 pm |
Good point. I actually have a newer version of the script that automatically records all the services running under the BITS’ netsvc.exe context that gets terminated and then restarts all those as well. I will post ASAP once I get a chance to clean it up.
November 1, 2012 at 6:21 pm
You cannot start the “Server” (lanmanserver) with net start or manually in services.msc.
Access denied in both cases.
I have tried both in the context of an account in local administrators and in the context of local system (psexec -s net start lanmanserver).
Access denied in all cases.
I do not think you can start the “Server” service in any way once it has been killed.
Tried to work out a solution to this for days.
Let me know if some of you have some other insight.
November 2, 2012 at 7:07 pm |
IIRC lanmanserver is dependent on another service. The new version handles dependency nesting up to 3 levels deep so it is able to start it properly.
November 2, 2012 at 7:13 pm |
The new version that properly restarts the services is now available.
November 2, 2012 at 8:24 pm |
Tried the new script on a couple of servers. It still leaves “Server” (lanmanserver) and “Computer Browser” (browser) services in stopped state. And I am still unable to start these manually.
The /forcereboot switch on ccmsetup ofcause rebooted the system, and then everything worked. But we still had to reboot so this was not really any different than just running ccmsetup followed by BITS installation and then reboot. 😦
Still stuck with 250+ servers needing to be rebotted because they are missing bits 2.5. Now I have the choice of installing client and leaving them with Server service stopped. Or installing bits with /noreboot option and then installing client and waiting for servers to be restarted so client install will complete. 😦
December 30, 2012 at 3:54 am |
I might be stupid, but I can’t figure out how to auto deploy this script without an existing deployment infrastructure. I can connect to a machine and run it manually, but that doesn’t help me get BITS deployed automatically.
March 15, 2013 at 7:12 pm |
There’s actually a number of viable options here that I don’t have the time to go into. psexec is one we used extensively, but you could also use GPOs, a legacy systems management infrastructure, etc.
January 15, 2013 at 6:31 am |
Just curious if you’ve tried using psexec to push bits and then stop/start the bits service to prevent needing a reboot
March 15, 2013 at 7:13 pm |
Yes, we would typically do large batches of servers w/ psexec, monitor what became active in the console, and then remediate the inevitable small % of servers that had issues preventing one or more prereqs or the client to install.
March 12, 2013 at 6:34 pm |
You never define “ScriptDir” or “TempFolder and such. These are not keywords in vbscript, they mean nothing.
March 15, 2013 at 7:10 pm |
ScriptCoder, they are indeed defined as functions towards the bottom of the script.
March 15, 2013 at 8:37 pm |
You can actually use ConfigMgr 2012 to install the 2012 client using the /skippreq switch to not install BITS, then deploy BITS with ConfigMgr to the clients (they will use SMB for this first package) and then have BITS from then on.
May 29, 2013 at 9:43 pm |
Have you verified that the /skipreq switch works for BITs 2.5? I was under the impression that this switch was only for prereq’s that were in stalled by the client installation itself, so something like BITs 2.5 that is required prior to even initiatiing the client install would seem to not be applicable to the /skippreq switch. I’m hoping I am wrong, because this would be ideal for me. Any help in verifying this would be appreciated.
July 1, 2013 at 11:05 am |
The syntax of the command line switch is /skipprereq:bits
You can set this in the SCCM 2012 SP1 Console in “Administration\Sites\Client Installation Settings\Client Push Installation\Installation Properties”
July 24, 2013 at 5:09 pm |
Just have to post that /skippreq switch does not exist and will not allow the client to deploy without BITS installed. Also, use caution when using the script on DC’s. The script worked in a few instances, and even on a few DC’s, on others, the Server service didn’t restart and therefore required a reboot of the DC.
February 10, 2014 at 6:23 pm |
[…] SCCM client and used this for the BITS installation. You can find the original blog post here at Ruhle’s Blog. You’ll want to remove lines 135-151 to remove the SCCM client install. This script […]
February 26, 2014 at 10:36 am |
Thanks,great job!!!
Only….
Need to edit script in line 254:
BAD – If strVersion < 6.7 Then
WRIGHT – If strVersion < "6.7" Then