Jump to content

Recommended Posts

Posted

I've recently started a new job and out of the team I am the most knowledgeable when it comes to SCCM. I used it in my previous job but I pretty much had to teach everything about it myself but I know how to create packages and how to deploy them etc. The problem I have is that the task sequence only seems to be doing half the jobs and then stopping. I've got a test machine I'm using to get the task sequence working and I imaged it around 3pm yesterday and I've just came in this morning to only see a handful of software installed on it. I know it won't do it all instantly based on my knowledge of SCCM but surely overnight should be long enough?

 

The person I replaced was a big fan of Powershell scripts whereas my background is more batch files so I've replaced all his install scripts so that I can troubleshoot easier. If I run the batch files manually the software installs as expected so I know it's not a problem with my code. The only major difference to the network in my time here has been replacing PfSense with Smoothwall but that shouldn't stop packages installing should it? I've edited a previously working task sequence to get to this stage. The only changes I've made however are to add some new package deployments and get rid of any PfSense entries (certificate installs, define proxy settings etc). The task sequence is split into sections, based on what task sequences are needed. There's an "Install Software" where the packages are deployed and after that there is "Post Deployment Tasks" amongst others which is for things like activating Windows & Office afterwards. Activating Windows & Office is one of the task sequences that fails and it is quite an important task sequence. It's linked to a batch file I wrote that sets the proxy and installs the Windows and Office 2013 keys and then activates them both. Again if I run this batch file manually both activate fine. Other important task sequences that fail are Windows Movie Maker which is required for lessons and TightVNC which we use to remotely connect to computers for remote IT Support etc. It doesn't seem to stop at a particular point either as Google SketchUp has deployed where as Adobe Photoshop CS2 which appears in the list before SketchUp, hasn't installed. Java has installed but software like Audacity, and Techsoft 2D design hasn't.

 

The batch files themselves create a log file when the software has installed and they are nowhere to be seen so it's as if the task sequence isn't even running. Is there a log file linked to SCCM that I can look at to see what's going on? Before we moved to Smoothwall we'd get an email when the task sequence had finished, this no longer happens either but this may be a separate issue.

 

Any help will be greatly appreciated as this is causing big problems at the moment as we're wanting to image multiple ICT suites and at the moment we're going to need to install most of the software manually in one way or another.

Posted

My first question is what is the purpose of installing software via PS or batch files?

 

Perhaps I am misunderstanding what you are doing but the software can just be installed via the "install Application" TS step during imaging or the native application deployment within SCCM after imaging.

 

I can't see why you would need to use anything extra?

Posted
My first question is what is the purpose of installing software via PS or batch files?

 

Perhaps I am misunderstanding what you are doing but the software can just be installed via the "install Application" TS step during imaging or the native application deployment within SCCM after imaging.

 

I can't see why you would need to use anything extra?

 

When I first started learning SCCM, any guides I found recommended using PS or batch files to install software so I've stuck with it. Seemingly the person I replaced did it the same way too.

 

I don't know what you mean by TS step during imaging. I PXE boot the computer, and go into SCCM. The only configuration I get asked before the imaging starts is to pick the image (Win 7 32 bit, Win 7 64bit etc) and what to name the computer after it has imaged. The computer than starts to image. Nothing else. I don't see anyway of installing applications at this step.

 

When you say native deployment do you mean deploying the application to collections? I could do but ideally I'd like it done as part of the image process using task sequence.

Posted
When I first started learning SCCM, any guides I found recommended using PS or batch files to install software so I've stuck with it. Seemingly the person I replaced did it the same way too.

Hmm that's interesting, SCCM has always had tools to deploy software to help you move away from scripted deployments.

I don't know what you mean by TS step during imaging.

Sorry what I meant was during a Task Sequence to deploy an OS you can add a step to deploy all the software you want. Here is the step from our Windows 10 OSD Task Sequence.

win 10 TS.PNG

 

I PXE boot the computer, and go into SCCM. The only configuration I get asked before the imaging starts is to pick the image (Win 7 32 bit, Win 7 64bit etc) and what to name the computer after it has imaged. The computer than starts to image. Nothing else. I don't see anyway of installing applications at this step.

Yes, you don't choose at this point, it has to be added to the Task Sequence as in my example.

Posted (edited)

Happy to change the way I deploy software in SCCM if there is an easier way. Way I've always done it is create a new package which then points to the .bat file to install the software.

 

This is the Task Sequence I'm working with:

 

SCCM.JPG

 

One thing I've noticed is that you're installing the software as applications rather than packages. Could this be an issue? If I go to "Install Software" section and go to Add -> Software -> Install Application it creates a new entry which I can then specify which applications I want. Problem being we don't have any applications. All the entries in the Install Software group are packages linked to .bat files.

Edited by protocol
Posted

Personally I would move away from the batch file method to using SCCM's own deployment tools. At least you'll get some meaningful feedback in the logs about any deployment errors.

 

Its probably worth reading the following guide on creating applications from the Windows Noob site: https://www.windows-noob.com/forums/topic/6629-using-system-center-2012-configuration-manager-part-8-deploying-applications/

However rather than deploying your applications to a device collection, you want to create Task Sequence step as mentioned above and add your applications in there.

  • Thanks 1
Posted
Personally I would move away from the batch file method to using SCCM's own deployment tools. At least you'll get some meaningful feedback in the logs about any deployment errors.

 

Its probably worth reading the following guide on creating applications from the Windows Noob site: https://www.windows-noob.com/forums/topic/6629-using-system-center-2012-configuration-manager-part-8-deploying-applications/

However rather than deploying your applications to a device collection, you want to create Task Sequence step as mentioned above and add your applications in there.

 

Thanks. Taken a look at that guide and have setup Chrome as an application as a test. One stumbling block I can see though is that I have some software that needs config files bundled with it when the software is installed. With scripts it was fairly straight forward but with the application method I can't find any option to do this unless I'm looking in the wrong places.

Posted
Thanks. Taken a look at that guide and have setup Chrome as an application as a test. One stumbling block I can see though is that I have some software that needs config files bundled with it when the software is installed. With scripts it was fairly straight forward but with the application method I can't find any option to do this unless I'm looking in the wrong places.

What I usually do this that circumstance is to create an msi with Advanced Installer (free version) that just places the files in the right place. Takes a couple of mins to create. I then use that msi to make an application in SCCM so that after the software is installed the msi runs to place the config in the right place.

 

Although I guess if you are happy scripting those installs then that works, you just won't get the kind of logging you get with msi deployed from sccm.

Posted
What I usually do this that circumstance is to create an msi with Advanced Installer (free version) that just places the files in the right place. Takes a couple of mins to create. I then use that msi to make an application in SCCM so that after the software is installed the msi runs to place the config in the right place.

 

Although I guess if you are happy scripting those installs then that works, you just won't get the kind of logging you get with msi deployed from sccm.

 

Will check out Advanced Installer thanks. I'll try to do most of them as applications as far as I can but I think some will need to remain scripts as Movie Maker has a reg file that needs activated for example, rather than just copied to somewhere. Just wish I knew why my packages aren't working as a task sequence. Some of them still haven't deployed to my test machine as I type this.

Posted

Another bit on applications, you can setup the install as an application and point it to the script if needed. This will sort of give you the benefit of both methods.

Most applications I use the native installer and call the appropriate switches. However there have been a few apps that need a bit more tweaking, so I point it at an install script.

  • Thanks 1
Posted
Another bit on applications, you can setup the install as an application and point it to the script if needed. This will sort of give you the benefit of both methods.

Most applications I use the native installer and call the appropriate switches. However there have been a few apps that need a bit more tweaking, so I point it at an install script.

 

Thanks for that. I've just created some applications that point to my previously created scripts.

 

Since setting up these applications and adding them to the task sequence I now get this error:

 

Failed to run Task sequence. The task sequence cannot be run because the program files for ******** cannot be located on a distribution point. For more Information, contact your System Administrator or Helpdesk Operator.
Posted
Set up your application. Right click on it and select distribute content. Select a distribution point and allow the files to be distributed. You need to do this to both applications and packages, so this might be why your packages aren't deploying.
  • Thanks 1
Posted
Set up your application. Right click on it and select distribute content. Select a distribution point and allow the files to be distributed. You need to do this to both applications and packages, so this might be why your packages aren't deploying.

 

Thanks sorted. It was what you said. I forgot to distribute one of the applications I'd created. Fingers crossed everything deploys as planned now.

Posted
Test computer imaged again and no further forward. Maybe I'm just being impatient but it finished imaging an hour ago and there still hasn't been any software deployed to it other than the software built into the image itself. Software Centre shows nothing waiting to be installed either. At a complete loss now. Anywhere I can check to see what's going on?
Posted

Do you have the install applications step configured to continue on error? you should have got some sort of on screen error of the failure otherwise.

Do the applications deploy outside of a TS? Create a user collection with just yourself, deploy an application as available and run it from software center.

 

Another difference between applications and packages is you need to configure the application with success conditions. Look for this product code, file or reg key etc.

If you don't have that set the application will always report as failed even if it does install.

Posted (edited)
Hi Protocol, which version of SCCM are you running?

 

2012 (R2)

 

Check the smsts.log file in the logs file on the pc itself

 

Will check the log file thanks.

 

Do you have the install applications step configured to continue on error? you should have got some sort of on screen error of the failure otherwise.

Do the applications deploy outside of a TS? Create a user collection with just yourself, deploy an application as available and run it from software center.

 

Another difference between applications and packages is you need to configure the application with success conditions. Look for this product code, file or reg key etc.

If you don't have that set the application will always report as failed even if it does install.

 

On the screen where I configure what applications to install on the task sequence step, I have ticked the "If an application installation fails, continue installing other applications in the list" if that's what you mean. Since my last post on this thread it has installed some software but out of the 9 applications in the list I created, 5 haven't installed. I also have some packages that haven't installed. What I'd also done before leaving work yesterday what simulate a deployment of the failed applications to the test machine and I've came in this morning to find them all sat at 100% compliance. I set each application to find an .exe linked to the install as it wouldn't let me skip that step. For example Audacity is one of the applications I can't get to install and I've set the application to check if the Audacity.exe file exists or not. Unless I've done something wrong that is.

 

I noticed on sparkeh's screenshot they have Scope ID as a column on the list of applications in the task sequence, I don't have that but not sure if that matters or not.

 

Edit: Had a quick look through the smsts.log file but there was a load of stuff in there and wasn't sure what I was looking for. Did a search for Audacity as an example and it couldn't find anything.

Edited by protocol
  • 7 months later...
Posted (edited)

Sorry to bump this thread of mine but this is still an on-going issue that I can't seem to get to the bottom of. Task sequences seem to fail on both our Windows 7 and Windows 10 images and I don't know why. The most recent re-image I did was on the 15th but with our Windows 10 image.

 

I've edited an existing Windows 10 task sequence and this is what I'm trying to achieve after SCCM has initially installed the OS:

 

k8U9ZYj.jpg

 

Out of all the software install steps enabled, none have installed. If I do a manual deploy to the machine afterwards, all the missing software deploys fine so I know it's not a problem with the task sequence themselves. Why does the software install fine outside of the task sequence process but not during? I've tried with both applications and packages.

 

I've checked the smsts.log in C:\Windows\CCM\Logs but can't find anything obvious. If I try and search the log file for all the missing software, 0 results are returned.

 

I've hosted the log file on the cloud as it is quite a big file:

https://drive.google.com/file/d/1Kk2xo1q2udEADBKIeLwSfMc1BM6zRDqO/view?usp=sharing

 

If anyone more knowledgeable with SCCM than me could take a look at it and see if there's anything obvious I would really appreciate it.

Edited by protocol
Posted

So I can see from the log that Photoshop (first app to install) fails to install and as the step is not set to continue on error, the whole step bombs out and nothing is installed.

 

Can you check appenforce.log for more info.

Posted
So I can see from the log that Photoshop (first app to install) fails to install and as the step is not set to continue on error, the whole step bombs out and nothing is installed.

 

Can you check appenforce.log for more info.

 

Well that could explain a lot if that is the case. Is that "not continue on error" a setting on the task sequence step? I've noticed "If an application installation fails, continue installing other applications in the list" is unticked. Be good to know why it fails though.

 

cJafqvt.jpg

3fic1sG.jpg

 

Appenforce.log:

 




Context: Machine
Command line: "Installv2.bat"
Allow user interaction: No
UI mode: 0
User token: null
Session Id: 4294967295
Content path: C:\Windows\ccmcache\13
Working directory: ]LOG]!>









 

Thanks for your help.

Posted

You're installing photoshop via a bat file? Exit code 16 for a bat file is "the directory cannot be removed" - what's in the bat?

 

If you tick the "Continue on error" box on the Options tab in the TS, you'll be able to see if everything else works.

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 account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...