Click on Pictures to View

To view a larger version of an image within a post, just click on the picture you want to view :)
Showing posts with label SCCM 2012 Task Sequence. Show all posts
Showing posts with label SCCM 2012 Task Sequence. Show all posts

Wednesday, July 25, 2018

SCCM SMSTS.log and CMTrace Tool

Often times when experiencing difficulties with OS deployment using SCCM, it is helpful to know where to find the SMSTS.log file, and use the cmtrace.exe tool to view it.  This can greatly aid your troubleshooting process to find the reason for failure or error codes seen.

According to Prajwal Desai (www.prajwaldesai.com) the smsts.log file changes its location depending on the point in the process of the operating system's installation.

First, open cmtrace.exe to enable log file viewing during the Windows PE phase, open a command prompt.window by pressing the F8 key during the OSD (cmtrace.exe is included in Windows PE).

Navigate to X:\sms\bin\x64 file location and launch cmtrace.exe

Example commands:

              Step 1 - type & press enter:     cd X:\sms\bin\x64

              Step 2 - type & press enter:    cmtrace.exe


Next, in cmtrace.exe tool window, choose File --> Open.

Then navigate to the appropriate location based on where your operating system deployment is at in the install process and open the smsts.log file - below are some locations to look:

These two file locations are for the smsts.log file while during OSD

                  Before the hard drive is formatted and partitioned, look here:

      • X:\Windows\Temp\SMSTSLog\smsts.log

                  After hard drive formatting, look here:

      • X:\SMSTSLOG\smsts.log
                                           
                  Or if copied to C:\
                        
      • C:\_SMSTaskSequence\Logs\SMSTSLog\smsts.log


After OSD and OS is installed, you will want to look in these locations:
       
                 Before SCCM agent is installed, look here:
     
      • C:\_SMSTaskSequence\Logs\SMSTSLog\smsts.log

                 If the Windows OS that was installed is 32-bit, after SCCM agent is installed, look here:
  
      • C:\Windows\System32\CCM\Logs\SMSTSLog\smsts.log

                 If the Windows OS that was installed is 32-bit, after SCCM agent is installed, look here:

      • C:\Windows\SysWOW64\ccm\Logs\SMTSLog\smsts.log


Look in these locations after the task sequence has finished running:

              If Windows OS is 32-bit:
                     
      • C:\Windows\System32\ccm\Logs\smsts.log

               If Windows OS is 64-bit:

      • C:\Windows\SysWOW64\ccm\Logs\smsts.log


Note - your file/folder locations may vary slightly, this is just a general guide of possible locations where the log is frequently found.



SOURCES:

Location of SMSTS Log During SCCM OSD

Trace32/CMTrace.exe Hidden Features

Location of CMTrace.exe during installation of Configuration Manager 2012

How to Open CMTrace During OSD:

How to Open CMTrace in WinPE Like a Boss

Add "CMTrace" During OSD

Copy CMTrace.exe into the Full Windows OS in a task sequence

Friday, September 11, 2015

Customize Windows 7 Profile for OS Deployment

Here is how I customized the Windows 7 profile for mass deployment using an SCCM 2012 Task Sequence.

After some research, I wrote a .cmd script to modify the parts of the user profile I wanted customized.

The script does the following:

1) Renames old Windows 7 default user account picture filename
  • Ren "C:\ProgramData\Microsoft\User Account Pictures\user.bmp" user.bmp.bak

2) Copies the custom picture from the distribution point to the computer (sets the default account pic)
  • Copy "%~dp0user.bmp" "C:\ProgramData\Microsoft\User Account Pictures" /Y

3) Takes ownership of old Windows 7 default background filename as Administrators Group
  • Takeown /f C:\Windows\Web\Wallpaper\Windows\img0.jpg /A

4) Grant SYSTEM full control of the old default background filename
  • Echo Y | icacls "C:\Windows\Web\Wallpaper\Windows\img0.jpg" /grant "SYSTEM":F

5) Copies the custom picture from the distribution point to the computer (sets the default background)
  • Copy "%~dp0img0.jpg" "C:\Windows\Web\Wallpaper\Windows" /Y

6) Deletes the games folder from the startup menu for all users
  • Rd /s /q "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Games"



I put all of those in a notepad text file with REMARK lines between them so I remember what each line does, then saved it as a .cmd file. (The below script also calls a second command script at the bottom)



I then copied all the relevant files that were needed (custom pictures, .cmd scripts, etc) to my distribution point(s).

After verifying that the script would run okay locally, I created a PACKAGE containing the .cmd file in SCCM 2012, and then added an "Install Package" line within my task sequence.

Package:

Task Sequence :


*Don't forget to tick the box that says "Allow this program to be installed from the Install Package task sequence without being deployed" option on the Advanced tab of the package program properties dialog box.

After running the task sequence, the computer had a new custom default profile picture for all local and domain users, a custom default background wallpaper for all local and domain users, and removed games folder from start menu.  The second script also sets the Control Panel view to "Classic" for all users, sets specific Windows icons on the desktop for all users, and sets the specified theme as well (actually, I removed the theme part from the second script because ours is managed via GPO so I don't know how well that part works with the changed background to custom image, or if it overwrites it, to be honest).

With this method of deploying the user profile picture and background, the end user can still opt to further customize their pictures themselves as well.





For further information on the second .cmd script, called in the script I wrote, see this article:

https://www.itsupportguides.com/windows-7/windows-7-default-profile-with-configmgr/


Sources:

https://social.msdn.microsoft.com/Forums/windowsdesktop/en-US/1703c3f4-a2ea-4c4a-a73f-a93e6d51b2bb/windows-7-user-profile-creation-overwrites-custom-wallpaper

http://www.askvg.com/simple-trick-to-replace-default-built-in-flower-profile-picture-for-all-user-accounts-in-windows-7/

https://community.spiceworks.com/how_to/22362-how-to-set-a-default-user-logon-picture-windows-7

http://www.bonusbits.com/wiki/HowTo:Change_the_Default_Background_and_User_Image_on_Windows_7e