Muhammad Mashwani

//Muhammad Mashwani
Muhammad Mashwani

Forum Replies Created

Viewing 15 posts - 16 through 30 (of 116 total)
  • Author
    Posts
  • Muhammad Mashwani
    Keymaster
    Post count: 118

    Please provide more information. The registry extract or the the application you are trying to uninstall and the command you are using for the removal would help in this case.

  • Muhammad Mashwani
    Keymaster
    Post count: 118

    Okay, I guess I have no objection to changing the file extension for that file to a .txt or .xml or something. It will make context highlighting in text editors kind of inconvenient but if this is the default setup for IIS on a 2007 box I guess I can change it on our end.

    Still, it is a pretty innocuous setting and it’s kind of silly for the server guys to take a hard line on not changing it. It is not too rare for advanced PowerShell scripts to have some C# code that they compile at run-time so this may be a problem they run into again.

    If you create a ticket for this on GitHub, I will include it in the next release.

  • Muhammad Mashwani
    Keymaster
    Post count: 118

    I have never had this problem with default DPs I have built or heard of this problem from anyone else and quite a few people use the toolkit. I’m curious, if they were to change the default settings on the DP, what setting exactly would they change? I would like to take a look at this setting if there is one because it seems like a very strange thing to block a file extension that is simply a text file that contains C# code.

  • Muhammad Mashwani
    Keymaster
    Post count: 118

    The version that came with SCCM 2012. I have version 5.0.7804.1000.

  • Muhammad Mashwani
    Keymaster
    Post count: 118

    Are you using the latest version of CMTrace.exe to open the log file? The older version does not open the SCCM 2012 CMTrace log format correctly.

  • Muhammad Mashwani
    Keymaster
    Post count: 118

    The log stating that it’s a valid, fully qualified path does not mean that the file exists. It just means that the path that was provided is properly formatted, fully qualified, path that Windows would recognize. I don’t think it’s a good idea to ignore an error thrown by this function because the file does not exist. If you’re not sure whether a file you wish to execute will be present, it’s rather trivial to use Test-Path to work around the issue. If you don’t want to use Test-Path, then you can use a Try/Catch to trap the error and ignore it.
    Try {
    Execute-Process
    }
    Catch {
    }

  • Muhammad Mashwani
    Keymaster
    Post count: 118

    Well I guess you do have the latest version of CMTrace if it works when you get rid of the empty line. There must be some character code of some sort that messes up the log file when you turn that array into a string using Out-String.

    Do this instead to join the array into a string:
    [string]$StrMonitorData=$monitorInfo | Format-List | Out-String

  • Muhammad Mashwani
    Keymaster
    Post count: 118

    Are you sure you’re using the new version of CMTrace that came with SCCM 2012? The older version of the utility does not work with the new CMTrace log format.

  • Muhammad Mashwani
    Keymaster
    Post count: 118

    I think the problem is that you’re not using the Write-Log function as it’s designed to be used. Model your Write-Log call like the other calls in the toolkit.

    Write-Log -Message $StrMonitorDataTexte -Source ${CmdletName}
    
  • Muhammad Mashwani
    Keymaster
    Post count: 118

    This feature was just meant to allow users to quickly test new MSI installs without having to do too much customization. That is why we kept it simple and did not spend too much time developing it. Instead of doing what we did, you can simply read in all the MST files in that folder and pass them on to the MSI. Look at how we discover all MSP files in that folder just after the MST section for an example that you can use to discover all MST files.

  • Muhammad Mashwani
    Keymaster
    Post count: 118

    Currently, the feature expects the MST file to have the same name as the MSI.

  • Muhammad Mashwani
    Keymaster
    Post count: 118

    Sure, it’s possible. Look at around line 9861 to see where we discover MST files in the folder. You can modify that to discover all MST files in the folder.

  • Muhammad Mashwani
    Keymaster
    Post count: 118

    The way most people do deployments in an enterprise setting, I don’t think this feature would be desirable. If I deploy software to users, I don’t want users to see anything at all for the most part and certainly not any errors. They are not going to know what those errors mean and will probably call the help desk; something the business does not want as part of a large deployment. I think the feature you want will have to be something you implement in your own branch of the toolkit. All the pieces are already there for you to do so. In the Catch {} statements of a function, add a Show-Dialog function call that displays the error message that gets thrown.

  • Muhammad Mashwani
    Keymaster
    Post count: 118

    The feature does not work with multiple MST files.

  • Muhammad Mashwani
    Keymaster
    Post count: 118

    That is the only section of the script where that variable gets populated. That variable is not referenced anywhere else. PowerShell ISE sometimes does not behave the same as the PowerShell console. It hangs onto variables and data from one execution to the next. Completely exit PowerShell ISE, launch it again, debug the code and step through it line by line and you should see when that variable first gets populated.

Viewing 15 posts - 16 through 30 (of 116 total)