Tuesday, 4 February 2020

Microsoft Office 2013 Language Pack Application creation

This post is ment to help to set up Office 2013 language packages. In the example I used the German language pack.

First of all you have to set up the xml file with the setup configuration. This is the one I used:

Configuration Product=OMUI.de-de

    Display Level=none CompletionNotice=no SuppressModal=yes AcceptEula=yes 
    !-- Logging Type=standard Path=%temp% Template=Microsoft Office German Language Pack Setup().txt  --

    !-- USERNAME Value=Customer  --
    !-- COMPANYNAME Value=MyCompany  --
    !-- INSTALLLOCATION Value=%programfiles%Microsoft Office  --
    !-- LIS CACHEACTION=CacheOnly  --
    !-- LIS SOURCELIST=server1shareOffice;server2shareOffice  --
    !-- DistributionPoint Location=servershareOffice  --
    !-- OptionState Id=OptionID State=absent Children=force  --
    !-- Setting Id=SETUP_REBOOT Value=IfNeeded  --
    !-- Command Path=%windir%system32msiexec.exe Args=i serversharemy.msi QuietArg=q ChainPosition=after Execute=install  --


Then you have to set up the .cmd that will run the setup from SCCM application:

setup.exe /config config.xml

Install ConfigMgr 2012 SP2 and R2 SP1 Cumulative Update 1

The latest cumulative update for ConfigMgr 2012 SP2 and R2 SP1 CU1 was released on 04.08.15. Here’s the tutorial to install the hotfix.( here you have more info: 

Download the hotfix from here https://support.microsoft.com/en-us/kb/3074857
Unzip the .zip file and execute the CM12_SP2R2SP1CU1-KB3074857-X64-ENU.exe.
Click Next.

Accept the licence terms and click Next.
Address anything in the pre-req check.
Update the console
Update the site database
Create the deployment packages.
Click Next
Click Next
Click Next
Click Install
The update process will commence.
Looking good! Click Next.
Click Finish to complete the installation.
You will now be running version 5.0.8289.1203 console and client versions.

That's it.

Computers with 30 days old hardware information

Yeah, I have the blog as well. Ok I guess it's time to refresh the content with some updated scripts for SCCM 2016. I'll try to add some more deployment content as well down the road.

SMS_R_SYSTEM.Name, SMS_R_SYSTEM.SMSUniqueIdentifier,
SMS_R_SYSTEM.Client from SMS_R_System
inner join SMS_G_System_COMPUTER_SYSTEM on SMS_G_System_COMPUTER_SYSTEM.ResourceID = SMS_R_System.ResourceId
where SMS_G_System_COMPUTER_SYSTEM.Name  not in (select SMS_R_System.Name
from SMS_R_System inner join SMS_G_System_WORKSTATION_STATUS on SMS_G_System_WORKSTATION_STATUS.ResourceID = SMS_R_System.ResourceId
where SMS_G_System_WORKSTATION_STATUS.LastHardwareScan >=  DateAdd(dd,-30,GetDate()))

Tuesday, 8 August 2017

OS architecture detection script

The following script can be used to determine the System architecture

(Use it carefully at your own risk!!)

    msiexec /qn /i 7zip_x86.msi
) ELSE (
    msiexec /qn /i 7zip_x86.msi
Option Explicit 
Dim ObjWMI, ColSettings, ObjProcessor 
Dim StrComputer, ObjNetwork 
Set ObjNetwork = WScript.CreateObject("WScript.Network") 
StrComputer = Trim(ObjNetwork.ComputerName) 
Set ObjNetwork = Nothing 
WScript.Echo VbCrLf & "Computer Name: " & StrComputer 
WScript.Echo vbNullString 
Set ObjWMI = GetObject("WINMGMTS:" & "{ImpersonationLevel=Impersonate,AuthenticationLevel=Pkt}!\\" & StrComputer & "\Root\CIMV2") 
Set ColSettings = ObjWMI.ExecQuery ("SELECT * FROM Win32_Processor") 
For Each ObjProcessor In ColSettings 
Select Case ObjProcessor.Architecture 
    Case 0 
        WScript.Echo "Processor Architecture Used by the Platform: x86" 
    Case 6 
        WScript.Echo "Processor Architecture Used by the Platform: Itanium-Based System" 
    Case 9 
        WScript.Echo "Processor Architecture Used by the Platform: x64" 
End Select 
Select Case ObjProcessor.ProcessorType 
    Case 1 
        WScript.Echo "Processor Type: Other. Not in the Known List"     
    Case 2 
        WScript.Echo "Processor Type: Unknown Type" 
    Case 3 
        WScript.Echo "Processor Type: Central Processor (CPU)" 
    Case 4 
        WScript.Echo "Processor Type: Math Processor" 
    Case 5 
        WScript.Echo "Processor Type: DSP Processor" 
    Case 6 
        WScript.Echo "Processor Type: Video Processor" 
End Select 
WScript.Echo "Processor: " & ObjProcessor.DataWidth & "-Bit" 
WScript.Echo "Operating System: " & ObjProcessor.AddressWidth & "-Bit" 
WScript.Echo vbNullString     
If ObjProcessor.Architecture = 0 AND ObjProcessor.AddressWidth = 32 Then 
    WScript.Echo "This Machine has 32 Bit Processor and Running 32 Bit OS" 
End If 
If (ObjProcessor.Architecture = 6 OR ObjProcessor.Architecture = 9) AND ObjProcessor.DataWidth = 64 AND ObjProcessor.AddressWidth = 32 Then 
    WScript.Echo "This Machine has 64-Bit Processor and Running 32-Bit OS" 
End If 
If (ObjProcessor.Architecture = 6 OR ObjProcessor.Architecture = 9) AND ObjProcessor.DataWidth = 64 AND ObjProcessor.AddressWidth = 64 Then 
    WScript.Echo "This Machine has 64-Bit Processor and Running 64-Bit OS" 
End If 
Set ObjProcessor = Nothing:    Set ColSettings = Nothing:    Set ObjWMI = Nothing:    StrComputer = vbNullstring 

Wednesday, 31 May 2017

Disable Java Update Batch file.

This simple .bat file can be used to disable Java automatic updates:

@echo off

rem disable java update by policy
reg add "HKLM\SOFTWARE\JavaSoft\Java Update\Policy" /V EnableJavaUpdate /T REG_DWORD /D 0 /F
if defined programfiles(x86) reg add "HKLM\SOFTWARE\Wow6432Node\JavaSoft\Java Update\Policy" /V EnableJavaUpdate /T REG_DWORD /D 0 /F

REM Remove java update scheduler
reg delete "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run" /v "SunJavaUpdateSched" /f
if defined programfiles(x86) reg delete "HKLM\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Run" /v "SunJavaUpdateSched" /f

REM kill java updater if started
taskkill /IM jucheck.exe /F
taskkill /IM juscheck.exe /F

exit 0

Monday, 1 May 2017

Powershell Script to Get remote computer system and hardware information

Uses PowerShell with the WMI cmdlets to report the following details of a list of devices on your network. 
Serial Number
HDD Capacity/Free space
OS incl. Service Pack
Logged in user
Last reboot
Make sure you change the list of computer names in the HOSTNAME array to match your devices (Line 5)
Results are displayed in the console window but could be easily modified to push it into a CSV file

# Remote System Information
# Shows hardware and OS details from a list of PCs
# Thom McKiernan 22/08/2014

$ArrComputers =  ".", "HOSTNAME"
#Specify the list of PC names in the line above. "." means local system

foreach ($Computer in $ArrComputers) 
    $computerSystem = get-wmiobject Win32_ComputerSystem -Computer $Computer
    $computerBIOS = get-wmiobject Win32_BIOS -Computer $Computer
    $computerOS = get-wmiobject Win32_OperatingSystem -Computer $Computer
    $computerCPU = get-wmiobject Win32_Processor -Computer $Computer
    $computerHDD = Get-WmiObject Win32_LogicalDisk -ComputerName $Computer -Filter drivetype=3
        write-host "System Information for: " $computerSystem.Name -BackgroundColor DarkCyan
        "Manufacturer: " + $computerSystem.Manufacturer
        "Model: " + $computerSystem.Model
        "Serial Number: " + $computerBIOS.SerialNumber
        "CPU: " + $computerCPU.Name
        "HDD Capacity: "  + "{0:N2}" -f ($computerHDD.Size/1GB) + "GB"
        "HDD Space: " + "{0:P2}" -f ($computerHDD.FreeSpace/$computerHDD.Size) + " Free (" + "{0:N2}" -f ($computerHDD.FreeSpace/1GB) + "GB)"
        "RAM: " + "{0:N2}" -f ($computerSystem.TotalPhysicalMemory/1GB) + "GB"
        "Operating System: " + $computerOS.caption + ", Service Pack: " + $computerOS.ServicePackMajorVersion
        "User logged In: " + $computerSystem.UserName
        "Last Reboot: " + $computerOS.ConvertToDateTime($computerOS.LastBootUpTime)