Archive for category sccm

SCCM Task Sequence Remove Video Drivers

During my project to upgrade all our Windows 7 Enterprise SP1 (64bit) devices to Windows 10 Enterprise 1809 (64bit), I ran into a compatibility issue during the task sequence. Windows 7 video drivers were detected as incompatible during the in-place upgrade to Windows 10, so I had to find a way to remove the drivers during the SCCM task sequence.

This is the batch file code I used to disable, then remove video drivers from the task sequence.

@ECHO OFF

REM Driver is disabled
devcon disable =display

REM Driver is removed here
devcon remove =display

REM reg add command replaces whatever value is in the SearchOrderConfig with the appropriate value to tell the system NOT to go to windows update for driver updates
REG ADD HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\DriverSearching /t REG_DWORD /v SearchOrderConfig /d 0x0 /f

REM Driver package is removed here
FOR /F “tokens=4 delims= ” %%A IN (‘devcon driverfiles ^=display ^| FINDSTR “Driver installed from”‘) DO devcon.exe dp_delete -f %%A

EXIT 0

The following shows where in the task sequence I add the video driver removal step. Also, note that I have a step to copy devcon.exe utility which is not on Windows 7 by default.

SccmTsRemoveDrivers.png

I’ve extensively tested this on my DELL devices and it works perfectly.

, , , , , , , , , , ,

2 Comments

SCCM Task Sequence Error Code 0x80004005

While attempting to perform an in-place upgrade from Windows 7 Enterprise to Windows 10 Enterprise I came across Error Code 0x80004005.

Looking at C:\WINDOWS\CCM\Logs\smsts.log gave me the clues on the error message.

SCCM Error 1

There are many posts on how to fix this particular error message; it seems that this error code is pretty generic and it shows up on several instances in many SCCM operations – this document particularly deals with a task sequence for an in-place operating system upgrade.

Since this was an in-place Windows upgrade, I needed to find out more detailed information and I was able to get it from C:\$WINDOWS-BT\Sources\Panther this folder contains a list of .XML files that collect compatibility data that is collected during the upgrade process.

Win10UpgErrorLogLocation.png

I opened the last XML file and this gave me the actual clue as to what was failing during the upgrade process – video drivers were the culprit!

Win10UpgErrorLog.png

Now I know what’s going on during the task sequence and I can attempt to fix this issue.

I’ll blog about how to fix this issue in a new post, stay tuned!

, , , , , , ,

Leave a comment

Uninstalling Applications in SCCM not Working

I had quite the experience when several of my applications refused to uninstall. I spent several days troubleshooting this issue and going through logs to the point that I ended up opening a case with Microsoft.

It appears that if any of application that you’re trying to uninstall has an installation deployment job set to ‘available’ or ‘required’ – no uninstall task will work. You have to delete all your installation deployment jobs as it appears that installation jobs have a higher precedence.

Here are some notes from Microsoft.

Here are the details.

The uninstall deployment wasn’t get enforced as per the logs. Here is what we see in the logs.

CIAgentJob({FFF396C4-40D1-481D-AC35-196D80F45D90}): EnforceCIs CIAgent 12/14/2018 11:18:42 AM 2972 (0x0B9C)

Initiating Enforce tasks. CIAgent 12/14/2018 11:18:42 AM 2972 (0x0B9C)

Skipping non compliant policy CI ScopeId_935E5529-E59C-4F44-9332-DBAF15F5C166/ProhibitedApplication_d0830875-5b6a-422b-bfee-142777b8361e:3.         CIAgent 12/14/2018 11:18:42 AM 2972 (0x0B9C)

No mandatory Enforce tasks. No actions will be performed. CIAgent 12/14/2018 11:18:42 AM  2972 (0x0B9C)

  • I could reproduce the same thing in my lab as well. So it seems like since we have an Install deployment active, the uninstall required deployment didn’t get triggered.
  • Performed some testing by removing the active “available” installdeployment from the machine. Now as suspected it triggered the required uninstall deployment and the app got removed.
  • Did some code review and internal checks
  • I could confirm that the install deployment always wins. I.e. even there is an uninstall deployment (required) the install action always WIN.

 

Leave a comment

DELL OptiPlex 7060 & SCCM OS Deployment

Recently we started buying DELL OptiPlex 7060 desktops and I ran into a situation where WinPE wouldn’t work properly as there was no IP address assignment and no C drive showing in the environment.

Fixing the missing NIC hardware was easy enough; however, the environment was still lacking a hard drive. These 7060 models come with SATA SSD drives and an Intel Rapid Storage Technology F6 controller.

Installing Intel drivers or DELL drivers didn’t work.

After many hours of trying different things, here’s the solution I found. In the BIOS, change the storage settings from RAID ON (DELL’s default setting) to AHCI…just that simple.

There are many interesting documents comparing AHCI and Raid On, I suggest you read them, but AHCI is newer technology and we decided to stick with this setting on our desktop devices.

1 Comment

Install Hyper-V Role to Windows Server 2012 R2 During OS Deployment

There are plenty of blogs about this subject, however, many of these blogs are outdated and some of their tips do not work properly for Windows Server 2012 R2. Also, in my case, I’m not using MSDT to install features and roles, but instead I’m using a captured WIM image.

To install Hyper-V role, just add a “Run Command Line” task, towards the end of the task sequence, Install Operating System task.

I’m using the following PowerShell command:

Powershell.exe -Command "& {&'Install-WindowsFeature' –Name Hyper-V -IncludeManagementTools -Restart}"

2016-10-28_1124

Also, here’s an interesting link that discusses this particular issue.

Leave a comment

Deploying Oracle JAVA

As of JAVA 8 Update 73, this is the easiest way I’ve found to deploy JAVA on a corporate environment.

  1. Download JAVA from here
    1. You’re going to select the Windows Offline download option
  2. Take a look at the many installation options now available for the JAVA EXEcutable file, those options can be found here
  3. From an elevated command line, you’re going to run the JRE executable file with the options you select from step 2
    1. Here’s just a sample command line (all in one line):
    2. jre-8u73-windows-i586.exe EULA=Disable INSTALL_SILENT=Enable AUTO_UPDATE=Disable REBOOT=Disable REMOVEOUTOFDATEJRES=1
    3. You should be able to find the meaning of each installation option by reading the document in step 2. In essence, I’m installing JAVA and accepting the EULA, a silent install with JAVA auto update disabled as well as removing any outdated installations of JAVA and finally rebooting is disabled.

JAVA Instal

Note: Here’s a great JAVA 8 deployment blog in case you need other means of installing it

 

For those using System Center Configuration Manager 2012 (SCCM 20120), one of the ways to create an application deployment would be to use ‘manual’ deployment type and use a script to install JAVA. In the script I used, I was able to use START /WAIT command to execute the JRE file.

Leave a comment

Pin & Unpin Icons To The Windows 7 Taskbar

During the deployment of Windows 7, I was given the task to find out a way to pin and unpin icons to the taskbar.


Well, the process is rather easy, but it takes two steps.
  1. Find out the verbs associated with the application you want to pin/unpin to the taskbar.
  2. Execute the proper verb that will pin or unpin the application.
Note: This code isn’t mine, I modified it a bit to suit my needs

1. Let’s find the verbs

Here’s the VB code that handles that:

Const CSIDL_COMMON_PROGRAMS = &H17 
Const CSIDL_PROGRAMS = &H2 
Set objShell = CreateObject(“Shell.Application”) 
Set objScript = CreateObject( “WScript.Shell” )

REM The original code had the following line as part of it
REM Set objFolder = objShell.Namespace(“C:\Program Files\Internet Explorer”)

REM In my case, I’m pointing directly to the user path where all taskbar shortcut files are located
Set objFolder = objShell.Namespace(“C:\Users\” & objScript.ExpandEnvironmentStrings ( “%USERNAME%” ) & “\AppData\Roaming\Microsoft\Internet Explorer\Quick Launch\User Pinned\TaskBar”)

REM I want to see a list of verbs pertaining to IE link file
Set objFolderItem = objFolder.ParseName(“Internet Explorer.lnk”) 
Set colVerbs = objFolderItem.Verbs 

For Each objVerb in colVerbs 
    Wscript.Echo objVerb 
Next
You can get verbs from .exe or .lnk files.
Here’s the output for that code (the output will change based on your computer):
cscript /nologo GetVerbs.vbs
&Open
Open file locat&ion
&Enable/Disable Digital Signature Icons
Run as &administrator
Edit with &Notepad++
Scan with System Center 2012 Endpoint Protection…
Unpin from Tas&kbar
Pin to Start Men&u
Restore previous &versions

Cu&t
&Copy
Create &shortcut
&Delete
Rena&me
P&roperties
2. Let’s pin, or unpin, to the taskbar
The code that handles pinning or unpinning to the taskbar is here:
Const CSIDL_COMMON_PROGRAMS = &H17 
Const CSIDL_PROGRAMS = &H2 
Set objShell = CreateObject(“Shell.Application”) 
Set objScriptShell = CreateObject( “WScript.Shell” )

REM Unpin Internet Explorer 64-bit from the taskbar
Set objFolder = objShell.Namespace(“C:\Users\” & objScriptShell.ExpandEnvironmentStrings ( “%USERNAME%” ) & “\AppData\Roaming\Microsoft\Internet Explorer\Quick Launch\User Pinned\TaskBar”)

Set objFolderItem = objFolder.ParseName(“Internet Explorer (64-bit).lnk”) 
Set colVerbs = objFolderItem.Verbs

For Each objVerb in colVerbs 
    If Replace(objVerb.name, “&”, “”) = “Unpin from Taskbar” Then objVerb.DoIt 
Next

REM Pin Internet Explorer to the taskbar
Set objFolder = objShell.Namespace(“C:\Program Files (x86)\Internet Explorer”)

Set objFolderItem = objFolder.ParseName(“iexplore.exe”) 
Set colVerbs = objFolderItem.Verbs

For Each objVerb in colVerbs 
    If Replace(objVerb.name, “&”, “”) = “Pin to Taskbar” Then objVerb.DoIt 
Next
As soon as the script finishes the results are shown in the taskbar.

Leave a comment