Jump to content


Peter33

Established Members
  • Posts

    755
  • Joined

  • Last visited

  • Days Won

    30

Posts posted by Peter33

  1. Well, i guess the target directory just does not exist right after the installation of the program, because the program was not executed yet in the user context.

    Just create it before you copy the file.

     

    md "%AppData%\LocalLow\Apple Computer\Quicktime"

    xcopy "%~dp0quicktime.qtp" "%AppData%\LocalLow\Apple Computer\Quicktime" /Y

  2. $ErrorActionPreference = "Stop"
    $lpath = $env:LOCALAPPDATA + "\Microsoft\Office\15.0\Lync"
    if(Test-Path $lpath){
        $result = gci $lpath -Recurse  -filter  "GalContacts.db" 
        $mdate = $result.LastWriteTime.ToString("yyyMMdd")
    }
    if($mdate -ge "20140822" ){return $true}
    

    This will compare the last modified value with your defined value ( >= 08-22-2014 ).

    The script is for a detection rule (custom script -> powershell)

     

    If you want to fill collection based on the result, you need to modify the script by an additional line "else {return $false}" at the end. Then you can create a compliance rule (boolean).

  3. Rather go for the product code of the msi in the installer database. Gambling with folders is not very clean, because of pending renames.

    $ErrorActionPreference = "Stop"
    if(!(gwmi -Namespace root\cimv2\sms -Class sms_installedsoftware -Filter "softwarecode = '{A8C8C39C-3CAB-4FB9-8A20-E70DABE84C91}' or softwarecode = '{A8C8C39C-3CAB-4FB9-8A20-E70DABE84C92}'")){return $true}
    

    

     

    What you really should do, is defining your script as uninstall command in the deployment type of your application, instead as install command. This way you can use the product codes of your msi files as detection method, without scripted detection.

  4. You should check the ciagent.log, cidownloader.lod and cistore.log on your client while it is in this state. Enable F8 command line support as mentioned and deploy cmtrace.exe as normal package as one of your first steps after the "setup config manager" step in your task sequnce, to have a proper log file viewer.

    The client is most likely busy with sorting out the policies for your applications. The 3 log files will tell you if that's the case.

    You also might want to cleanup the revision history of your applications, to reduce the number of policies that have to be processed. Policy processing is a massive overhead regarding the application model.

  5. Make sure that your application is not requesting a reboot and that the restart behavior is set to "no specific Action" in the user experience tab. Also make sure that the application is not recofiguring your network card, like the Citrix plugin for example is doing. If it does, do not install it during OSD.

    Also check your appenforce .og for more Information and if possible force the Installation to write a detailed log.

  6. Here is the script i am using.

    cls
    
    $WMIPkgList = Get-WmiObject -Namespace Root\SCCMDP -Class SMS_PackagesInContLib | Select -ExpandProperty PackageID | Sort-Object
    $ContentLib = (Get-ItemProperty HKLM:SOFTWARE\Microsoft\SMS\DP).ContentLibraryPath
    $PkgLibPath = ($ContentLib) + "\PkgLib"
    $PkgLibList = (Get-ChildItem $PkgLibPath | Select -ExpandProperty Name | Sort-Object)
    $PkgLibList = ($PKgLibList | ForEach-Object {$_.replace(".INI","")})
    $PksinWMIButNotContentLib = Compare-Object -ReferenceObject $WMIPkgList -DifferenceObject $PKgLibList -PassThru 
    
    ##### section 1 #######################
    Write-Host Items in WMI but not the Content Library
    Write-Host ========================================
    $PksinWMIButNotContentLib
    Foreach ($Pkg in $PksinWMIButNotContentLib){
        Get-WmiObject -Namespace Root\SCCMDP -Class SMS_PackagesInContLib -Filter "PackageID = '$Pkg'" | Remove-WmiObject -Confirm
    }
    ###### end section 1 ##################
    
    ##### section 2 #######################
    #Write-Host Items in Content Library but not WMI
    #Write-Host ====================================
    #$PksinContentLibButNotWMI
    #Foreach ($Pkg in $PksinContentLibButNotWMI){
    #   Remove-Item -Path "$PkgLibPath\$Pkg.INI" -Confirm
    #}
    ##### end section 2 ###################
    
     
    

    After running both scripts, you have to run the content validation on your distribution point, to get rid of errors and warnings.

  7. You can still add a lot more to your customsettings.ini, like timezones, display- and keyboard languages, application or package lists, and so on ...

    Right away, for the only purpose of naming your machine, the above is good enough. Just make sure that you cover every possible gatway and that you update your sttings file, if there are changes in the future.

     

    You're welcome. Have fun playing around with MDT.

  8. This looks fine and should work as you want.

     

    In your SCCM you need to create two packages. One for MDT2013. This will be used when you run the "use toolkit package" step. Another one, the "Settings package", will only hold your customsettings.ini.

    In the gather step you will refer to this package.

     

    The easiest way to create the MDT package is to run the "new MDT Task sequence" wizard. This will guide you through all needed packages and gives you the opportunity to create them (MDT,USMT,Settings).

  9. Well, the MDT itself has actually a pretty good build in help. Just search for customsettings.ini in the help topics.

     

    post-10753-0-05394400-1406911079_thumb.jpg

     

     

    Also you should not miss out the sites of Johan Arwidmark and Mikael Nystrom.

     

    http://deploymentbunny.com/category/mdt/

     

    http://www.deploymentresearch.com/Research.aspx?Search=customsettings.ini&SearchType=Keyword

     

    These two guys know what they are talking about. If you ever get a chance to attend one of their training sessions, go for it.

     

    Actually you can also watch some of their sessions online

     

    http://channel9.msdn.com/Events/TechEd/NorthAmerica/2014#fbid=

  10. You could use the Microsoft Deployment Toolkit and put the whole logic for the naming into your custumsetting.ini file. The simply run a "use deplyoment toolit" followed by a "gather" step in your task sequnce.

     

    Here is an example for the naming logic.

    [Settings]
    Priority=Default
    Properties=MyLocation
    
    [Default]
    OSDComputerName=%MyLocation%-#Replace("#Left("%SERIALNUMBER%",10)#"," ","")#
    Subsection=%DefaultGateway001%
    
    
    [192.168.0.1]
    MyLocation=MPHS
    
    [192.168.1.1]
    MyLocation=MPJH
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.