Jump to content


wedaniel

adding deployment type with global condition to a application fails with the between using powershell

Recommended Posts

I'm in the process of automating reader so that it downloads and creates the application in SCCM

We use a global condition to get the version of reader out of the registry.

I have two deployment types,  One installs the full reader and the second just installs the patch.

On the second deployment type we use the requirement Between operand with the values of "17.011.130000" "17.011.130080"   that way it will only install the patch 

it fails on the between operand.   If I use greaterthan or others it works fine.

   Any help????

Here is the error message.

 

Add-CMScriptDeploymentType : ConfigMgr Error Object:
instance of SMS_ExtendedStatus
{
    Description = "There is a failure while generating lantern documents for this configuration item";
    ErrorCode = 1078462256;
    File = "..\\sspconfigurationitem.cpp";
    Line = 2164;
    Operation = "PutInstance";
    ParameterInfo = "";
    ProviderName = "ExtnProv";
    StatusCode = 2147749889;
};
At C:\Reader\Add-Depend.ps1:155 char:1
+ Add-CMScriptDeploymentType  -SourceUpdateProductCode "$ReaderGUID" -A ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (Microsoft.Confi...mentTypeCommand:AddScriptDeploymentTypeCommand) [Add-CMScriptDeploymentType], WqlQueryException
    + FullyQualifiedErrorId : UnhandledException,Microsoft.ConfigurationManagement.Cmdlets.AppMan.Commands.AddScriptDeploymentTypeCommand
 

 

Share this post


Link to post
Share on other sites


Sounds way to complicated for me. We are using just a registry value detection with the "greater than or equal to" operator, which works just fine. It's probably easier to automate too.

 

 

readerDR.JPG

Share this post


Link to post
Share on other sites

We have more than one version reader installed in our environment.   The second deployment type is just the patch.   This patch is for Reader 17.011.130000 so I don't want this patch to be deployed to 18.000???     That's we use the between.

Share this post


Link to post
Share on other sites

Well, i get that. But i think it's easier to create a patch application for every Reader Version. Then set the original Reader deployment as dependency for the patch application. The screenshot is just an example. You got to replace the ID and version with your values.

There is no need for a gobal condition requirement.

Share this post


Link to post
Share on other sites

Diffenrent to getting the version from a file, if you get a "version" from registry it is not a value type "version" but a value type "string". So you might be able to use the operand "greater than" but not "Between".

And even "greater than" would not provide you the correct result in some cases. If you compare for example 10.0.0.0 with 9.0.0.0. In this case if you compare 2 values of type "version" 10.0.0.0 will be greater than 9.0.0.0.

But if you compare these to valöues of type "string" then 9.0.0.0 will be greater than 10.0.0.0.

so remind...Even if it looks like a version it is not a version it is a string and the operand "between" will not work.

In your case I would prefer to switch to the corresponding file and use this in your global condition instead of registry key.

Share this post


Link to post
Share on other sites

I am getting the same error but I am just trying to create 2 Script deployment types for a single application. The first one creates fine but the second one gets this error. How can you create 2. I am using Add-CMScriptDeploymentType for both

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...