All posts in Windows 8

Hallo zusammen,

in dem heutigen Howto zeige ich euch ein kleines Skript, wie Ihr eure Powershell Umgebung auf allen Computern/Server gleich setzen könnt.

Powershell_Konsole

 

 

 

 

 

Powershell_Konsole_2

 

 

 

 

 

Bitte vor der Skript Ausführung eure ExecutionPolicy setzen

Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Force

Damit Powershell immer ein Startverzeichnis hat, bitte die passende Variable im Skript setzen

$StartFolder="C:\ oder D:\DeinVerzeichnis"

Und hier das Skript

#######################################################################################
## Skript:  Powershell Profil Datei anlegen
## Name:    Helmut Thurnhofer
## Datum:   03.01.2016
## Version: 1.0
##
## Powershell Konsolen Anpassung
## https://tobivnext.wordpress.com/2012/03/07/powershell-konsoleneigenschaften-anpassen/
##
## Bitte vor Skriptausführung ExecutionPolicy setzen
## Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Force
##
## Bitte auch einen passenden Startverzeichnis für Powershell setzen 
## $StartFolder="C:\ oder D:\DeinVerzeichnis"
#######################################################################################
 
## Skript Variablen definieren ########################################################
$DateTime = (Get-Date -Format g)
$ProfileFile = $PROFILE.CurrentUserAllHosts
$SplitProfileFile = Split-Path -Path $ProfileFile -Leaf -Resolve
$SplitProfilePath = Split-Path -Path $ProfileFile -Parent -Resolve
$BackupProfileFile = $SplitProfilePath + "\" + "profile.bak"
$CheckProfileFile = Test-Path -PathType Leaf $ProfileFile
$StartFolder="D:\PowershellScripte"
#######################################################################################
 
## Startverzeichnis anlegen wenn noch nicht vorhanden #################################
If (!(Test-Path -Path $StartFolder)){
 
     New-Item -Type Directory -Path $StartFolder
     Write-Host "Der Ordner $StartFolder wurde angelegt" -ForegroundColor Green
} Else {
    Write-Host "Der Ordner $StartFolder existiert bereits." -ForegroundColor Yellow
}
#######################################################################################
 
 
## Überprüfe ob alte profil.ps1 Datei vorhanden ist, wenn ja, wird diese umbenannt und neu angelegt.
If($CheckProfileFile -eq $true) {
    Rename-Item -Path $ProfileFile -NewName $BackupProfileFile
    Write-Host "Powershell Profil Datei (`"$BackupProfileFile`") wurde umbenannt!`n" -ForegroundColor Yellow
 
    New-Item -ItemType File -Force $ProfileFile
    Write-Host "Powershell Profil Datei (`"$ProfileFile`") wurde neu angelegt!`n" -ForegroundColor Green
} Else {
    New-Item -ItemType File -Force $ProfileFile
    Write-Host "Powershell Profil Datei (`"$ProfileFile`") wurde neu angelegt!`n" -ForegroundColor Green
}
#######################################################################################


## Schreibe Inhalt in die profile.ps1 Datei
Add-Content $ProfileFile -Value "#####################################################################################"
Add-Content $ProfileFile -Value "## Name: Windows PowerShell Profil"
Add-Content $ProfileFile -Value "## Ersteller: $env:USERNAME"
Add-Content $ProfileFile -Value "## Erstellungsdatum: $DateTime"
Add-Content $ProfileFile -Value "## Version: 1.0"
Add-Content $ProfileFile -Value "#####################################################################################"
Add-Content $ProfileFile -Value ""
Add-Content $ProfileFile -Value "## Skript von http://www.zerrouki.com/powershell-profile-example"
Add-Content $ProfileFile -Value "`$IPAddress=@(Get-WmiObject Win32_NetworkAdapterConfiguration | Where-Object {`$_.DefaultIpGateway})[0].IPAddress[0]"
Add-Content $ProfileFile -Value "`$PSVersion=(`$PSVersionTable.PSVersion).ToString()"
Add-Content $ProfileFile -Value "Clear-Host"
Add-Content $ProfileFile -Value ""
Add-Content $ProfileFile -Value "Write-Host `"``r``n:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::`" -ForegroundColor Yellow"
Add-Content $ProfileFile -Value "Write-Host `"::`" -ForegroundColor Yellow -nonewline; Write-Host `"  ComputerName: `$(`$env:COMPUTERNAME)`";"
Add-Content $ProfileFile -Value "Write-Host `"::`" -ForegroundColor Yellow -nonewline; Write-Host `"  IP-Adresse:   `$IPAddress`";"
Add-Content $ProfileFile -Value "Write-Host `"::`" -ForegroundColor Yellow -nonewline; Write-Host `"  UserName:     `$env:UserDomain\`$env:UserName`";"
Add-Content $ProfileFile -Value "Write-Host `"::`" -ForegroundColor Yellow -nonewline; Write-Host `"  Powershell:   `$PSVersion`" -NoNewline;"
Add-Content $ProfileFile -Value "Write-Host `"``r``n:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::`" -ForegroundColor Yellow"
Add-Content $ProfileFile -Value ""
Add-Content $ProfileFile -Value "`$AllDisk = @()"
Add-Content $ProfileFile -Value "Get-WmiObject Win32_LogicalDisk -filter `"DriveType='3'`" | ForEach-Object {"
Add-Content $ProfileFile -Value "   `$AllDisk += @(`$_ | Select @{n=`"Name`";e={`$_.Caption}},"
Add-Content $ProfileFile -Value "   @{n=`"Bezeichnung`";e={`$_.VolumeName}},"
Add-Content $ProfileFile -Value "   @{n=`"Groesse (GB)`";e={`"{0:N2}`" -f (`$_.Size/1GB)}},"
Add-Content $ProfileFile -Value "   @{n=`"Belegt (GB)`";e={`"{0:N2}`" -f ((`$_.Size/1GB) - (`$_.FreeSpace/1GB))}},"
Add-Content $ProfileFile -Value "   @{n=`"Frei (GB)`";e={`"{0:N2}`" -f (`$_.FreeSpace/1GB)}},"
Add-Content $ProfileFile -Value "   @{n=`"Frei (%)`";e={if(`$_.Size) {`"{0:N2}`" -f ((`$_.FreeSpace/1GB) / (`$_.Size/1GB) * 100 )} else {`"NAN`"} }})"
Add-Content $ProfileFile -Value "}"
Add-Content $ProfileFile -Value "`$AllDisk | Format-Table -AutoSize | Out-String"
Add-Content $ProfileFile -Value ""
Add-Content $ProfileFile -Value "## Globale Standardvariablen setzen"
Add-Content $ProfileFile -Value "`$ErrorActionPreference = `"Continue`""
Add-Content $ProfileFile -Value ""
Add-Content $ProfileFile -Value "## Setzen das Startverzeichnis"
Add-Content $ProfileFile -Value "Set-Location -Path $StartFolder"
Add-Content $ProfileFile -Value ""
Add-Content $ProfileFile -Value "## Angepasster Powershell Titel"
Add-Content $ProfileFile -Value "`$a = (Get-Host).UI.RawUI"
Add-Content $ProfileFile -Value "`$a.WindowTitle = `"HTDOM - Powershell`""
Add-Content $ProfileFile -Value ""
Add-Content $ProfileFile -Value "## Angepasster PowerShell Prompt"
Add-Content $ProfileFile -Value "function prompt {"
Add-Content $ProfileFile -Value "`$msg = `"HTDOM `$(`$ExecutionContext.SessionState.Path.CurrentLocation)`$(`'>`' * (`$NestedPromptLevel + 1))`""
Add-Content $ProfileFile -Value "Write-Host -ForegroundColor Yellow -NoNewLine `$msg; `" `""
Add-Content $ProfileFile -Value "`}"
Add-Content $ProfileFile -Value ""
Add-Content $ProfileFile -Value "## Setzt bestimmte Alias und Funktionen"
Add-Content $ProfileFile -Value "function pss{Set-Location -Path $StartFolder}"
Add-Content $ProfileFile -Value "function c{Set-Location -Path C:\}"
Add-Content $ProfileFile -Value "function d{Set-Location -Path D:\}"
Add-Content $ProfileFile -Value ""
Add-Content $ProfileFile -Value "function ..{cd ..}"
Add-Content $ProfileFile -Value "function ...{cd ..\..}"
Add-Content $ProfileFile -Value "function ....{cd ..\..\..}"
Add-Content $ProfileFile -Value "function .....{cd ..\..\..\..}"
Add-Content $ProfileFile -Value ""
Add-Content $ProfileFile -Value "function ws{Set-Location -Path C:\Windows\System32}"
Add-Content $ProfileFile -Value "function npp{notepad `$PROFILE.CurrentUserAllHosts}"
Add-Content $ProfileFile -Value "function np{Start-Process -FilePath `"C:\Program Files (x86)\Notepad++\notepad++.exe`" -Verb RunAs}"
Add-Content $ProfileFile -Value "function ise{Start-Process -FilePath `"C:\Windows\System32\WindowsPowerShell\v1.0\powershell_ise.exe`" -Verb RunAs}"
Add-Content $ProfileFile -Value ""
Add-Content $ProfileFile -Value "function kb(`$id){Start-Process -FilePath `"http://support.microsoft.com/kb/`$id`"}"
Add-Content $ProfileFile -Value "function mwst(`$betrag, `$satz = 19) {`$betrag / 100 * `$satz}"
Add-Content $ProfileFile -Value ""
Add-Content $ProfileFile -Value "function applog{Get-EventLog -LogName Application -Newest 50}"
Add-Content $ProfileFile -Value "function syslog {Get-EventLog -LogName System -Newest 50}"
Add-Content $ProfileFile -Value ""
Add-Content $ProfileFile -Value "function gco(`$Cmdlet){Get-Command `$Cmdlet -CommandType Cmdlet}"
Add-Content $ProfileFile -Value "function about{Get-Help about_* | Select name, synopsis | Format-Table -AutoSize}"
Add-Content $ProfileFile -Value "function module{Get-Module -ListAvailable | Where-Object {`$_.Path -like `"`$PSHOME*`"}}"
#######################################################################################

## Profil in der aktuellen Sitzung laden
. $PROFILE.CurrentUserAllHosts
#######################################################################################

## Erstelle Regkeys für HKEY_CURRENT_USER\Console
$RegPath1="HKCU:\Console"
Set-Location -Path $RegPath1

## Konsolenfarben setzen
New-ItemProperty . ColorTable00 -type DWORD -value 0x00222827 -Force
New-ItemProperty . ColorTable03 -type DWORD -value 0x00141817 -Force
New-ItemProperty . ColorTable07 -type DWORD -value 0x00f2f8f8 -Force
New-ItemProperty . ColorTable09 -type DWORD -value 0x00efd966 -Force
New-ItemProperty . ColorTable10 -type DWORD -value 0x002ee2a6 -Force
New-ItemProperty . ColorTable12 -type DWORD -value 0x007226f9 -Force
New-ItemProperty . ColorTable14 -type DWORD -value 0x0074dbe6 -Force

## Schriftart und zusätzlich Optionen setzen
New-ItemProperty . CurrentPage -type DWORD -value 0x00000003 -Force
New-ItemProperty . CursorSize -type DWORD -value 0x00000019 -Force
New-ItemProperty . EnableColorSelection -type DWORD -value 0x00000000 -Force
New-ItemProperty . ExtendedEditKey -type DWORD -value 0x00000000 -Force
New-ItemProperty . ExtendedEditKeyCustom -type DWORD -value 0x00000000 -Force
New-ItemProperty . FaceName -type STRING -value "Consolas" -Force
New-ItemProperty . FontFamily -type DWORD -value 0x00000036 -Force
New-ItemProperty . FontSize -type DWORD -value 0x000e0000 -Force
New-ItemProperty . FontWeight -type DWORD -value 0x00000190 -Force
New-ItemProperty . FullScreen -type DWORD -value 0x00000000 -Force
New-ItemProperty . HistoryBufferSize -type DWORD -value 0x00000032 -Force
New-ItemProperty . HistoryNoDup -type DWORD -value 0x00000000 -Force
New-ItemProperty . InsertMode -type DWORD -value 0x00000001 -Force
New-ItemProperty . LoadConIme -type DWORD -value 0x00000001 -Force
New-ItemProperty . NumberOfHistoryBuffers -type DWORD -value 0x00000004 -Force
New-ItemProperty . PopupColors -type DWORD -value 0x000000f5 -Force
New-ItemProperty . QuickEdit -type DWORD -value 0x00000001 -Force
New-ItemProperty . ScreenBufferSize -type DWORD -value 0x270f00c8 -Force
New-ItemProperty . ScreenColors -type DWORD -value 0x0000000f -Force
New-ItemProperty . TrimLeadingZeros -type DWORD -value 0x00000000 -Force
New-ItemProperty . WindowSize -type DWORD -value 0x003600c8 -Force
New-ItemProperty . WordDelimiters -type DWORD -value 0x00000000 -Force
New-ItemProperty . WindowPosition -type DWORD -value 0x003c00dc -Force
#######################################################################################

## Erstelle Regkeys für HKEY_CURRENT_USER\Console\%SystemRoot%_System32_WindowsPowerShell_v1.0_powershell.exe
$RegPath2="HKCU:\Console\%SystemRoot%_system32_WindowsPowerShell_v1.0_powershell.exe"
$CheckRegKey2 = Test-Path -Path $RegPath2

if ($CheckRegKey2 -eq $true) {
    Clear-Host
    Remove-Item -Path $RegPath2 -Recurse -Force
    Write-Host "`nRegistrieschlüssel ist vorhanden und wird gelöscht!`n" -ForegroundColor Yellow
    New-Item -Path "HKCU:\Console" -Name "%SystemRoot%_system32_WindowsPowerShell_v1.0_powershell.exe" -Force
    Write-Host "`nRegistrieschlüssel ist nicht vorhanden und wird angelegt.`n" -ForegroundColor Green
} else {
    Clear-Host
    New-Item -Path "HKCU:\Console" -Name "%SystemRoot%_system32_WindowsPowerShell_v1.0_powershell.exe" -Force
    Write-Host "`nRegistrieschlüssel ist nicht vorhanden und wird angelegt.`n" -ForegroundColor Green
}

Set-Location -Path $RegPath2

## Konsolenfarben setzen
New-ItemProperty . ColorTable00 -type DWORD -value 0x00222827 -Force
New-ItemProperty . ColorTable03 -type DWORD -value 0x00141817 -Force
New-ItemProperty . ColorTable07 -type DWORD -value 0x00f2f8f8 -Force
New-ItemProperty . ColorTable09 -type DWORD -value 0x00efd966 -Force
New-ItemProperty . ColorTable10 -type DWORD -value 0x002ee2a6 -Force
New-ItemProperty . ColorTable12 -type DWORD -value 0x007226f9 -Force
New-ItemProperty . ColorTable14 -type DWORD -value 0x0074dbe6 -Force

## Schriftart und zusätzlich Optionen setzen
New-ItemProperty . CurrentPage -type DWORD -value 0x00000003 -Force
New-ItemProperty . CursorSize -type DWORD -value 0x00000019 -Force
New-ItemProperty . EnableColorSelection -type DWORD -value 0x00000000 -Force
New-ItemProperty . ExtendedEditKey -type DWORD -value 0x00000000 -Force
New-ItemProperty . ExtendedEditKeyCustom -type DWORD -value 0x00000000 -Force
New-ItemProperty . FaceName -type STRING -value "Consolas" -Force
New-ItemProperty . FontFamily -type DWORD -value 0x00000036 -Force
New-ItemProperty . FontSize -type DWORD -value 0x000e0000 -Force
New-ItemProperty . FontWeight -type DWORD -value 0x00000190 -Force
New-ItemProperty . FullScreen -type DWORD -value 0x00000000 -Force
New-ItemProperty . HistoryBufferSize -type DWORD -value 0x00000032 -Force
New-ItemProperty . HistoryNoDup -type DWORD -value 0x00000000 -Force
New-ItemProperty . InsertMode -type DWORD -value 0x00000001 -Force
New-ItemProperty . LoadConIme -type DWORD -value 0x00000001 -Force
New-ItemProperty . NumberOfHistoryBuffers -type DWORD -value 0x00000004 -Force
New-ItemProperty . PopupColors -type DWORD -value 0x000000f5 -Force
New-ItemProperty . QuickEdit -type DWORD -value 0x00000001 -Force
New-ItemProperty . ScreenBufferSize -type DWORD -value 0x270f00c8 -Force
New-ItemProperty . ScreenColors -type DWORD -value 0x0000000f -Force
New-ItemProperty . TrimLeadingZeros -type DWORD -value 0x00000000 -Force
New-ItemProperty . WindowSize -type DWORD -value 0x003600c8 -Force
New-ItemProperty . WordDelimiters -type DWORD -value 0x00000000 -Force
New-ItemProperty . WindowPosition -type DWORD -value 0x003c00dc -Force
#######################################################################################

## Kopiere Regkeys für HKEY_CURRENT_USER\Console\Windows PowerShell
$RegPath3="HKCU:\Console\Windows PowerShell"
$CheckRegKey3 = Test-Path -Path $RegPath3

if ($CheckRegKey3 -eq $true) {
    Clear-Host
    Remove-Item -Path $RegPath3 -Recurse -Force
    Write-Host "`nRegistrieschlüssel ist vorhanden und wird gelöscht!`n" -ForegroundColor Yellow
    New-Item -Path "HKCU:\Console" -Name "Windows PowerShell" -Force
    Write-Host "`nRegistrieschlüssel ist nicht vorhanden und wird angelegt.`n" -ForegroundColor Green
} else {
    Clear-Host
    New-Item -Path "HKCU:\Console" -Name "Windows PowerShell" -Force
    Write-Host "`nRegistrieschlüssel ist nicht vorhanden und wird angelegt.`n" -ForegroundColor Green
}

Set-Location -Path $RegPath3

## Konsolenfarben setzen
New-ItemProperty . ColorTable00 -type DWORD -value 0x00222827 -Force
New-ItemProperty . ColorTable03 -type DWORD -value 0x00141817 -Force
New-ItemProperty . ColorTable07 -type DWORD -value 0x00f2f8f8 -Force
New-ItemProperty . ColorTable09 -type DWORD -value 0x00efd966 -Force
New-ItemProperty . ColorTable10 -type DWORD -value 0x002ee2a6 -Force
New-ItemProperty . ColorTable12 -type DWORD -value 0x007226f9 -Force
New-ItemProperty . ColorTable14 -type DWORD -value 0x0074dbe6 -Force

## Schriftart und zusätzlich Optionen setzen
New-ItemProperty . CurrentPage -type DWORD -value 0x00000003 -Force
New-ItemProperty . CursorSize -type DWORD -value 0x00000019 -Force
New-ItemProperty . EnableColorSelection -type DWORD -value 0x00000000 -Force
New-ItemProperty . ExtendedEditKey -type DWORD -value 0x00000000 -Force
New-ItemProperty . ExtendedEditKeyCustom -type DWORD -value 0x00000000 -Force
New-ItemProperty . FaceName -type STRING -value "Consolas" -Force
New-ItemProperty . FontFamily -type DWORD -value 0x00000036 -Force
New-ItemProperty . FontSize -type DWORD -value 0x000e0000 -Force
New-ItemProperty . FontWeight -type DWORD -value 0x00000190 -Force
New-ItemProperty . FullScreen -type DWORD -value 0x00000000 -Force
New-ItemProperty . HistoryBufferSize -type DWORD -value 0x00000032 -Force
New-ItemProperty . HistoryNoDup -type DWORD -value 0x00000000 -Force
New-ItemProperty . InsertMode -type DWORD -value 0x00000001 -Force
New-ItemProperty . LoadConIme -type DWORD -value 0x00000001 -Force
New-ItemProperty . NumberOfHistoryBuffers -type DWORD -value 0x00000004 -Force
New-ItemProperty . PopupColors -type DWORD -value 0x000000f5 -Force
New-ItemProperty . QuickEdit -type DWORD -value 0x00000001 -Force
New-ItemProperty . ScreenBufferSize -type DWORD -value 0x270f00c8 -Force
New-ItemProperty . ScreenColors -type DWORD -value 0x0000000f -Force
New-ItemProperty . TrimLeadingZeros -type DWORD -value 0x00000000 -Force
New-ItemProperty . WindowSize -type DWORD -value 0x003600c8 -Force
New-ItemProperty . WordDelimiters -type DWORD -value 0x00000000 -Force
New-ItemProperty . WindowPosition -type DWORD -value 0x003c00dc -Force
#######################################################################################

## Powershell Verknüpfung erstellen
$ComObj = New-Object -ComObject Wscript.Shell
$Shortcut = $ComObj.CreateShortcut("$env:USERPROFILE\Desktop\Powershell.lnk")
$ShortCut.TargetPath = "$PSHOME\powershell.exe"
$ShortCut.Hotkey = "CTRL+ALT+P"
$ShortCut.Save()
####################################################################################### 

Wie immer freue ich mich über Kommentare und Anregungen.

Viele Grüße
Helmut

MDT2013_WDS2012_Logo

 

 

 

 

 

 

In diesem Howto möchte ich euch zeigen, wie man das Windows 8.1 Master Image vorbereitet, um es im späteren Verlauf über das Netzwerk zu verteilen. Dieser Schritt ist mitunter der schwierigste und zugleich auch der wichtigste im Deployment Prozess.

Howto Serie wird folgende Punkte abdecken:

 

Howto Download –> Windows 8.1 Master Image Erstellung und Verteilung mit Microsoft Deployment Toolkit 2013 – Teil 2

 

Viel Spaß damit

Gruß
Helmut Thurnhofer

Hallo zusammen,

in dem heutigen Howto zeige ich euch, wie Ihr euer Windows 8.1 Standard Image mit allen Microsoft Security Updates patchen könnt.

Um an alle Security Patches von Microsoft ranzukommen, gibt es zwei Möglichkeiten. Entweder man nutzt das Tool WSUS Offline Update –> http://download.wsusoffline.net/wsusoffline931.zip

wsusoffline

 

 

 

 

 

oder lädt sich von der Webseite http://winfuture.de/UpdatePack das passende UpdatePack herunter und extrahiert dieses in einen Ordner seiner Wahl.

winfuture

 

 

 

 

 

Bei den WSUS Offline Updates hat man immer den aktuellsten Stand. Bei WinFuture werden die Updates nur nach jedem Microsoft PatchDay (2. Dienstag im Monat) aktualisiert.
Was im Großen und Ganzen aber nicht wirklich eine Rolle spielt. Der Unterschied besteht maximal in zwei bis drei Updates, die bei WinFuture fehlen.

Auf meinem Windows 8.1 Test Rechner lege ich mir eine Ordnerstruktur an, die ungefähr so aussieht:

Windows_8_ISO
– Windows_8_Images (entweder ISO entpacken oder von Windows 8.1 DVD kopieren)
– Mount (Mountpoint für das Windows 8.1 Standard Image)
– Updates (alle extrahierten *.msu (WinFuture) oder *.msu/*.cab (WSUS Offline) Dateien kopieren)

OrdnerStruktur

 

 

 

 

 

Nun startet man eine CMD Konsole als Administrator und mounted das Windows 8.1 Standard Image in den Ordner „…\Mount“

dism /Mount-Image /ImageFile:"…\Setup\source\install.wim" /index:1 /MountDir:"…\Mount"

ImageMount

 

 

 

 

 

Im nächsten Schritt fügen wir alle Updates dem Windows 8.1 Standard Offline Image hinzu

dism /Image:"…\Mount" /Add-Package /PackagePath:"…\Updates"

ImageUpdate

 

 

 

 

 

Bei den WSUS Offline Updates hatte ich bei der Integration ein paar Fehler, diese traten bei WinFuture nicht auf.
Nach erfolgreichen Updates, speichern wir das Windows 8.1 Standard Offline Image

dism /Unmount-Wim /MountDir:”…\Mount” /commit

Mit dem Schalter /commit werden alle Änderungen im Image gespeichert
Mit dem Schalter /discard werden alle Änderungen für das Image verworfen

ImageSave

 

 

 

 

 

Wenn man das Ganze wieder auf eine DVD brennen möchte, muss eine neue ISO Datei erstellt werden.

Dazu gibt es wieder zwei Möglichkeiten, obwohl ich Möglichkeit Zwei nicht getestet habe.

Erste Möglichkeit ist das Tool „oscdimg.exe“, welches im Windows ADK zu finden ist.

Windows Assessment and Deployment Kit (ADK) für Windows 8 –> http://www.microsoft.com/de-de/download/details.aspx?id=30652

oscdimg -lWindows8_Ent_x64 -m -u2 -b"D:\Windows_8_ISO\Image\boot\etfsboot.com" "D:\Windows_8_ISO\Image" "D:\Windows8_Ent_x64.iso"

Oder folgender Artikel im Internet „Bootfähige Windows (7)8 ISO erzeugen“ –> http://huebauer4.bplaced.net/

Nachdem die ISO Datei erstellt wurde und wir einen PC damit neu installiert haben, kann man folgenden Unterschied feststellen.

Diese Anleitung funktioniert mit Windows 7/8/8.1 Images wie auch mit den Serverbetriebssystemen Windows Server 2008/2008 R2/2012/2012 R2 Images.

UpdatesVorher

 

 

 

 

 

UpdatesNachher

 

 

 

 

 

Viel Spaß damit

Gruß Helmut

Hallo zusammen,

hier in diesen Blog Eintrag möchte ich euch zeigen wie Ihr Wireshark 1.10.6 & WinPcap 4.1.3 Silent Installieren könnt.
Das Paket WinPcap hat leider keine Silent Parameter, daher muss man hier einen keinen Umweg gehen.

Jetzt gibt es zwei möglichkeiten WinPcap Silent zu installieren.

1. Möglichkeit ist, ihr benutzt AutoIT und könnt somit die Buttons der Installation bedienen oder
2. Möglichkeit ist, ihr installiert auf einer Sauberen Maschine WinPcap 4.1.3 per Hand und kopiert euch die passenden Dateien weg.

Dazu könnt ihr folgende Tools benutzen, diese helfen euch wo welches Programm wo etwas hin installieren.

InstallWatch Pro
WhatChanged

WinPcap installiert jetzt folgende Dateien in folgende Verzeichnisse

%ProgramFiles(x86)%\WinPcap
- install.log
- rpcapd.exe
- Uninstall.exe

%SystemRoot%\System32
- Packet.dll
- wpcap.dll

%SystemRoot%\System32\drivers
- npf.sys

%SystemRoot%\SysWOW64
- Packet.dll
- pthreadVC.dll
- wpcap.dll

%SystemRoot%\SysWOW64\drivers
- npf.sys

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\WinPcap]
@="C:\\Program Files (x86)\\WinPcap"

[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\WinPcapInst]
"DisplayName"="WinPcap 4.1.3"
"UninstallString"="C:\\Program Files (x86)\\WinPcap\\uninstall.exe"
"Publisher"="Riverbed Technology, Inc."
"URLInfoAbout"="http://www.riverbed.com/"
"URLUpdateInfo"="http://www.winpcap.org"
"VersionMajor"="4"
"VersionMinor"="1"
"DisplayVersion"="4.1.0.2980"
"DisplayIcon"="C:\\Program Files (x86)\\WinPcap\\uninstall.exe"

Und zu guter letzt installiert WinPcap eine Service mit den Namen npf – NetGroup Packet Filter Driver
Sollte der Dienst nicht gestartet sein, gibt es eine Warnhinweis beim öffnen von Wireshark.

npf_error

 

 

 

 

 

Mit diesen Informationen und Dateien, kann ich mir nun eine Silent Installation der beiden Programme zusammenbauen.

Hier das passende Batchskript, die Art und weise der Installation kann man nun, in jede Softwareverteilung übernehmen.

@ECHO OFF
CLS

REM ------------------------------------------------------------
REM Name:  Wireshark 1.10.6 & WinPcap 4.1.3 Silent Installation
REM Autor: Helmut Thurnhofer
REM Datum: 16. April 2014
REM ------------------------------------------------------------

:: Wireshark 1.10.x Software Check
REG QUERY "HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\Wireshark"
cls

IF %errorlevel% EQU 0 ( GOTO :UNINSTALL 
) ELSE (
IF %errorlevel% GTR 0 GOTO :INSTALL
)

:UNINSTALL
ECHO ----------------------------------------------------
ECHO Wireshark 1.10.x Deinstallation
ECHO ----------------------------------------------------

IF EXIST "%ProgramFiles(x86)%\Wireshark\uninstall.exe" (
   "%ProgramFiles(x86)%\Wireshark\uninstall.exe" /S
) ELSE (
   "%ProgramFiles%\Wireshark\uninstall.exe" /S
)

ECHO ----------------------------------------------------
ECHO WinPcap Dienst Deinstallation
ECHO ----------------------------------------------------

sc query npf

IF %errorlevel% EQU 0 ( 
sc stop npf
PING -t localhost -n 10>nul
sc delete npf 
)
IF %errorlevel% EQU 1060 (
ECHO Service ist bereits deinstalliert 
)

IF EXIST "%ProgramFiles(x86)%\WinPcap" RMDIR /S /Q "%ProgramFiles(x86)%\WinPcap"

IF EXIST "%SystemRoot%\System32\Packet.dll" DEL /F "%SystemRoot%\System32\Packet.dll"
IF EXIST "%SystemRoot%\System32\wpcap.dll" DEL /F "%SystemRoot%\System32\wpcap.dll"
IF EXIST "%SystemRoot%\System32\drivers\npf.sys" DEL /F "%SystemRoot%\System32\drivers\npf.sys"

IF EXIST "%SystemRoot%\SysWOW64\Packet.dll" DEL /F "%SystemRoot%\SysWOW64\Packet.dll"
IF EXIST "%SystemRoot%\SysWOW64\wpcap.dll" DEL /F "%SystemRoot%\SysWOW64\wpcap.dll"
IF EXIST "%SystemRoot%\SysWOW64\pthreadVC.dll" DEL /F "%SystemRoot%\SysWOW64\pthreadVC.dll"
IF EXIST "%SystemRoot%\SysWOW64\drivers\npf.sys" DEL /F "%SystemRoot%\SysWOW64\drivers\npf.sys"

REG DELETE "HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\WinPcap" /f
REG DELETE "HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\WinPcapInst" /f


:INSTALL
ECHO ----------------------------------------------------
ECHO Wireshark 1.10.6 Installation
ECHO ----------------------------------------------------

Wireshark-win64-1.10.6.exe /NCRC /S /desktopicon=yes /quicklaunchicon=no

ECHO ----------------------------------------------------
ECHO WinPcap 4.1.3 Installation
ECHO ----------------------------------------------------

IF NOT EXIST "%ProgramFiles(x86)%\WinPcap" MKDIR "%ProgramFiles(x86)%\WinPcap"
COPY /Y "WinPcap\Program_Files\WinPcap\*.*" "%ProgramFiles(x86)%\WinPcap\"

COPY /Y "WinPcap\System32\Packet.dll" "%SystemRoot%\System32\"
COPY /Y "WinPcap\System32\wpcap.dll" "%SystemRoot%\System32\"
COPY /Y "WinPcap\System32\drivers\npf.sys" "%SystemRoot%\System32\drivers\"

COPY /Y "WinPcap\SysWOW64\Packet.dll" "%SystemRoot%\SysWOW64\"
COPY /Y "WinPcap\SysWOW64\wpcap.dll" "%SystemRoot%\SysWOW64\"
COPY /Y "WinPcap\SysWOW64\pthreadVC.dll" "%SystemRoot%\SysWOW64\"
COPY /Y "WinPcap\SysWOW64\drivers\npf.sys" "%SystemRoot%\SysWOW64\drivers\"

ECHO ----------------------------------------------------
ECHO WinPcap Dienst Installation
ECHO ----------------------------------------------------

sc query npf

IF %errorlevel% EQU 0 ( 
ECHO Service ist bereits installiert 
)
IF %errorlevel% EQU 1060 (
sc create npf type= kernel start= auto error= normal binPath= System32\drivers\npf.sys tag= no DisplayName= "NetGroup Packet Filter Driver"
PING -t localhost -n 10>nul
sc start npf
)

REGEDIT /s "WinPcap.reg"
REGEDIT /s "WinPcapInst.reg"

:: Installtionsdatei schreiben
SET datetime=%date:~0,2%.%date:~3,2%.%date:~-4% - %time:~0,2%:%time:~3,2%:%time:~6,2%

IF NOT EXIST "%SystemDrive%\Logs" MKDIR "%SystemDrive%\Logs"
ECHO Wireshark 1.10.6 und WinPcap 4.1.3 wurde am %datetime% sauber installiert  >> "%SystemDrive%\Logs\Wireshark_WinPcap_Install.txt"

:END

In diesen Sinne viel Spaß damit
Gruß Helmut

windows8-pe-logo

Letzte Woche bekam ich eine Anforderung auf den Tisch, wie man schnell baugleiche Hardware mit Windows Boardmittel installieren kann.
Es ist eigentlich nicht meine Art so Software zu verteilen, aber man kann es für kleiner Unternehmen tatsächlich verwenden, gerade wenn keine Softwareverteilung im Einsatz ist und jedes System per Hand installiert werden muss.

Der Große Nachteil an solch einer Image Technologie ist der Updateprozess bzw. das aktuell halten der Images. Hier muss man in Regelmäßigen Abständen den Prozess wiederholen um Up to Date zu bleiben.

Hier kommt ihr zum Howto –> Windows 8 mit WinPE 4.0 und imagex clonen

Viel Spaß beim nachmachen.

Gruß Helmut