deskcenter

  • Font Installation with Powershell

    Mit diesem Script kopiere ich von einer Netzwerkfreigabe, die Font Dateien in ein lokales Temp Verzeichniss.

    Anschließend werden diese installiert, und danach aus dem Temp Verzeichniss gelöscht. Ich verwende das Script mit Deskcenter, es ist allerdings auch möglich das ganze in eine GPO zu verpacken, und dann bei jedem Start auszuführen.

     

    Powershell Script um Fonts zu installieren.

     

     

    #Font Locations
        #Network Location
        $NetworkPath = "\\srv01\freigabe01\Verteiler\Fonts" 
        #Local Location (temp place to store fonts)
        $LocalPath= "C:\Temp\Fonts\"
    
    $FONTS = 0x14
    $objShell = New-Object -ComObject Shell.Application
    $objFolder = $objShell.Namespace($FONTS)
    
    New-Item $LocalPath -type directory -Force
    Copy-Item "$NetworkPath\*" $LocalPath
    
    $Fontdir = dir $LocalPath
    foreach($File in $Fontdir) 
    {
      if ((Test-Path "C:\Windows\Fonts\$File") -eq $False)
        {
        $objFolder.CopyHere($File.fullname,0x10)
        }
    }
    remove-item $LocalPath -recurse
    

     

  • Powershell regsvr32 ausführen

    Da wird als PDM Software Smarteam einsetzen und auch einige Anpassungen vornehmen, müssen wir an den Clientsystemen auch regelmäßig neue DLL`s registrieren. Dazu habe ich mir ein Powershell Script erstellt, das die Datei von einer Server Freigabe lokal kopiert, und danach diese DLL registriert. Das ganze mache ich über unsere Deskcenter Software Verteilung.

    Powershell:

    $targetdirectory = "C:\Smarteam\STCDll"
    $sourcedirectory = "\\serv01\freigabe02"   
    
    if (!(Test-Path -path $targetdirectory)) {New-Item $targetdirectory -Type Directory}
    Copy-Item -Path $sourcedirectory\ST328.dll -Destination $targetdirectory
     
    start-process regsvr32 -ArgumentList "/s" "c:\smarteam\stcdll\st328.dll" -wait
    
             
                                                                                            

     

     

  • Windows 7 Unattended installation

     

    Zum Ausschalten der Firewall bei Windows 7 während einer unattended Installation. Damit ist die Firewall erstmals deaktiviert, und man kann die nötige Software installieren ohne Probleme zu bekommen. Sollte nach Abschluß bzw Auslieferung an den Mitarbeiter/Kunden wieder eingeschaltet werden bzw per GPO geregelt sein.

     

    <component name="Networking-MPSSVC-Svc" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> 
                <DomainProfile_EnableFirewall>false</DomainProfile_EnableFirewall> 
                <PrivateProfile_EnableFirewall>false</PrivateProfile_EnableFirewall> 
                <PublicProfile_EnableFirewall>false</PublicProfile_EnableFirewall> 
               </component>