This should apparently enable verbose PXE logging – but doesn’t work for me!
Change this registry to 0 :
This should apparently enable verbose PXE logging – but doesn’t work for me!
Change this registry to 0 :
Sometimes when you need to deploy an application, you may need to add additional files to get installed onto the target machine, they could be configuration or license files etc… The first thing you need to do is create a CAB file with the additional files you want to install / deploy with the MSI. A CAB file is a Microsoft compressed archive from before Zip files were widely adopted. Every version of Windows since 2000, has shipped with a tool built in to create CAB files called “makecab”.
Make CAB file with desired additional files
For this example I only needed to add one additional file, so the commandline was easy – if you need to add multiple files you may need to explore the /F switch and directive files. Or the features built into InstEd! to help with this (see their online help page).
makecab filename.xml LicenseFile.cab
Where filename.xml is the name of the license file and LicenseFile.cab is the name of the destination CAB file to be created.
InstEd! is a great little tool for editing MSI files. Its very similar in functionality to Orca if you have ever used that – but it is more user friendly and offers more functionality. The instructions provided assume you are using InstEd! There are two main methods you can use, edit the existing MSI – OR – create a transform file and reference it during the install. I will be creating a transform file, as I think if you edit an already signed MSI you will need to sign it again using certificates etc…
Create New Transform File
Open the MSI file in InstEd! and select Transform -> New Transform. Choose a filename for the new MST file. I called mine “LicenseFile.mst”
Add Component to component table
Go to the “Component” Table, right click in the rows pane on the right hand side and select “Add Row” – complete the details as follows :
|Component||LicenseFile (What you want the Component to be called)|
|ComponentId||(Use button to generate new GUID)|
|Directory||license_Dir (Use Directory Table to find name of desired target directory)|
|Attributes||0x0000 (Default value)|
I used an already existing entry in the Directory Table “license_Dir” – you may need to add a row to the directory table for your requirements.
The new row should now be visible and highlighted in green. The reason its green, is to show you which rows have been updated, added or deleted from the original MSI file by the transform file.
Associate the created component with a feature
Now we need to tell the MSI to install this new component when it installs the main application in my case this feature is called “MainFeature”.
|Feature||MainFeature (Choose appropriate feature from dropdown)|
|Component_||LicenseFile (Choose the component you created)|
Add the file entry in file table
Next we will add an entry in the file table for the actual file we want to add to the installation, in my case this is a license file which is getting installed to a subdirectory of the main program files folder. Luckily the developer of the application had anticipated people would want to install their license file during deployment so the MSI already had a directory entry for “license_Dir”. If this didnt exist we would need to create an entry in the Directory table as well.
Sort the “File” table by the field “Sequence” scroll to the bottom to find the highest sequence number and make a note of it (in my example the last Sequence number is 773, so my file will be 774). Add a row with the following values :
|File||filename.xml (The filename as stored in the CAB file)|
|Component||LicenseFile (Choose the component you created earlier)|
|FileName||filename.xml (The destination filename)|
Add the media entry in media table
The last table we need to edit in the MSI is the media table. This table tells the MSI where the files are to install, you will need the file sequence number from the previous step (774). I think the reason for this, is that when installers still came on disks this is the method by which the installer knew to ask for the next disk.
|DiskId||2 (My example already had a disk with id 1)|
|LastSequence||774 (LastSequence number of first disk + 1)|
Save and Test!
Once you have finished adding rows etc… you need to save the transform file. Just underneath the File and Edit menu should be a small box with the name of the mst file and a little asterix to indicate changes have been made. Right click this box and select save. Now you have saved the transform you can test the installation to see if it works. Put the *.mst and *.cab files in the same folder as the *.msi file and run the following commandline from an elevated (run as admin) command prompt.
msiexec /i filename.msi /qn /l*v %TEMP%\TransformTest.log TRANSFORMS=filename.mst
Note you do not need to reference the cab file in the commandline.
If all went well, the application plus the additional file should have installed succesfully – and a verbose msi install log will have been created in %TEMP% folder. Use this to troubleshoot any issues you encounter.
Strange issue’s are my favourite!
I wanted to delete a user profile on W10 1511 today. But when I went into User Profiles through control panel – only the current user i was logged in was displayed.
To see all user profiles, I had to go to Computer Properties -> “Advanced system settings” -> User Profiles Group -> Settings.
I’m not sure what causes this issue – it could be that UAC is disabled and if was enabled when I went in through Control Panel i would have been prompted to accept the UAC prompt then it would display more than current user.
Today i needed to troubleshoot a ConfigMgr deployment which was failing when run by SCCM but worked when an administrator ran the same command. I wanted to rule out, running as System as the cause of the issue.
This is possible using psexec :
psexec -i -s cmd.exe
psexec \\hostname systeminfo | find "Time:"
PsExec is a really useful tool and is part of a really useful toolkit called SysInternals Suite : https://technet.microsoft.com/en-us/sysinternals/pxexec.aspx
The logs for System Center Configuration Manager (SCCM) are full of error codes – well they are in the environment I look after! Making sense of them can be difficult. It took me a while to realise that these error codes are not specific to SCCM but are generic Windows error codes.
To make sense of the error code, we can pass it to a command line application and get a string / message which explains things a bit more.
The syntax is :
net helpmsg x
Where x is a decimal integer error code.
But all the error codes I see are in the format “0x8007565”. If we pass this error code into the helpmsg command it doesnt return the message. We first need to convert it from a hex value to a decimal value, the easiest way to do this is using the built in calculator.
I have found that searching the internet for these error codes and messages, can waste a lot of time. They are generic and all sorts of windows components return them. The best way to troubleshoot is to find out which SCCM component logged the message and what was it doing at the time, use this information and the error message to try and deduce what is wrong. Sometimes google isn’t the answer!
Today i encountered a strange issue with a new distribution point in SCCM v1511.
I had prestaged most content to the DP and this worked fine, status messages were getting back to the MP and so the pie chart in DP Configuration Status section of the console was getting greener and greener. Great!
My prestage script finished sometime over the bank holiday weekend, so I took the DP out of prestaged mode and expected to see content flooding to it. But it didn’t. I started getting errors like this in the content status view. (Ignore the site code and DP name, I have redacted them – they were correct and sane!)
30/08/2016 14:48:00 Distributing content Distribution Manager failed to find or create the defined share or folder () on distribution point "["DISPLAY=\\DPNAME.COM\"]MSWNET:["SMS_SITE=XXX"]\\DPNAME.COM\" for distributing package "XXX00174". Possible cause: Windows NT distribution points might not have at least one available NTFS drive. Solution: Verify that there is at least one NTFS drive with enough free disk space to store the package. Then, verify that the distribution point directory exists, has the proper permissions, and is accessible. Retry Interval is 15 minutes, number of retries left is 5. Error XXX00174
So i checked the status messages and found I was getting a status message id 2324 from the problem Distribution Point.
30/08/2016 06:00:00 Failed to create virtual directory Failed to create virtual directory on the defined share or volume on distribution point "["DISPLAY=\\DPNAME.COM\"]MSWNET:["SMS_SITE=XXX"]\\DPNAME.GLOBAL.ARUP.COM\". Possible cause: Distribution Manager requires that IIS base components be installed on the local Configuration Manager Site Server in order to create the virtual directory. Distribution Manager also requires that IIS Web Services be installed on the Distribution Point Server that needs to support Background Intelligent Transfer Service (BITS). Solution: Verify that IIS base components are installed on the local Configuration Manager Site Server, and IIS Web Services are installed on the Distribution Point Server. Error
I didnt think there would be an issue with the BITS feature, because I had used the Pre-reqs Installer script on this DP – every time I have used it before its been perfect. Besides if the BITS role was missing SCCM would have failed to add the DP role to this server last week. I checked and BITS was still enabled.
The first error was more accurate – “Possible cause: Windows NT distribution points might not have at least one available NTFS drive”. What had happened was that the permissions on the share SMSPKGD$ had become corrupt. However, if i checked the permission they seemed fine. I found a forum post somewhere which suggested just deleting the share and letting SCCM recreate it.
So I stopped the share from Server Manager then rebooted the DP. It took maybe 5 -> 10 minutes for the share to be recreated. But once it was, all distribution issues were resolved!