Windows 10 1607 Build 14939 Error “This app can’t open”

On most installations of Windows 10 the 1607 update installs without a problem. It just happens to be that my laptop is not most installations. For one, I am using deduplication which is a server feature not to mention all my developer tools.

After installation, my deduplication stopped working which I fixed with new 14939 packages and none of my store apps worked. I fact my store didn’t even open.

thisappcantopen
Error “This app can’t open”

Managed to fix store by running wsreset.exe after which I could repair all my apps

Error 0x800F0922 or 0x800F0902 when installing SNMP Service

Had an interesting issue. Our installation of SNMP service kept failing.

The same error was shown when using PowerShell, DISM and Server manager.

Long story short, weirdly the installation is only deemed successful if the service can start, if it cannot, the whole installation is rolled back.

In our case a 3rd party app was hogging UDP 161 and SNMP failed to start hence the installation kept rolling back.

The culprit was identified by looking for the process that uses UDP 161 in output of command “NETSTAT -anb”

After killing this process installation work

Clear all Active Directory users’ manager attribute

Clear all Active Directory users’ manager attribute. See POC video http://screencast-o-matic.com/watch/cDeUQw1uBB

[sourcecode language=”css”]
Option Explicit

Dim adoCommand
Dim adoConnection
Dim objRootDSE
Dim strDNSDomain
Dim strBase
Dim strFilter
Dim strAttributes
Dim strQuery
Dim adoRecordset
Dim strDN
Dim objUser

Const ADS_PROPERTY_CLEAR = 1

‘ Setup ADO objects.
Set adoCommand = CreateObject("ADODB.Command")
Set adoConnection = CreateObject("ADODB.Connection")
adoConnection.Provider = "ADsDSOObject"
adoConnection.Open "Active Directory Provider"
Set adoCommand.ActiveConnection = adoConnection

‘ Search entire Active Directory domain.
Set objRootDSE = GetObject("LDAP://RootDSE")
strDNSDomain = objRootDSE.Get("defaultNamingContext")
strBase = "<LDAP://" & strDNSDomain & ">"

‘ Filter for users
strFilter = "(&(objectCategory=person)(objectClass=user))"

‘ Comma delimited list of attribute values to retrieve.
strAttributes = "distinguishedName"

‘ Construct the LDAP syntax query.
strQuery = strBase & ";" & strFilter & ";" & strAttributes & ";subtree"
adoCommand.CommandText = strQuery
adoCommand.Properties("Page Size") = 100
adoCommand.Properties("Timeout") = 30
adoCommand.Properties("Cache Results") = False

‘ Run the query.
Set adoRecordset = adoCommand.Execute

‘ Enumerate the resulting recordset.
Do Until adoRecordset.EOF

‘ Retrieve values.
strDN = adoRecordset.Fields("distinguishedName").Value
‘ Bind to the user object.
Set objUser = GetObject("LDAP://" & strDN)

‘ Clear the manager attribute.
objUser.PutEx ADS_PROPERTY_CLEAR, "manager", 0

‘ Save change to AD.
objUser.SetInfo
‘ Move to the next record in the recordset.
adoRecordset.MoveNext
Loop

‘ Clean up.
adoRecordset.Close
adoConnection.Close
[/sourcecode]

SharePoint App – Change Site Logo (Not AppIcon)

Adding this to your App.css

[sourcecode language=”css”]
.ms-siteicon-img {
display: none;
}

.ms-siteicon-a {
display: block;
position: relative;
background-image: url(‘https://placeholdit.imgix.net/~text?txtsize=33&txt=180×64&w=180&h=64’);
background-repeat: no-repeat;
background-position: center;
width: 180px;
height: 64px;
}
[/sourcecode]

will give you this

SiteLogo

BizTalk how to use same message inside and outside loop

  1. Create two Orchestration messages of same type. In this case I refer to them as Message1 and Message2
  2. Create a Orchestration variable of type System.Xml.Document. Tn this case I refer to it as xmlDocument
  3. Construct Message1 outside, before the loop with a Transform ect.
  4. Inside loop, within a single Construct Shape:
    1. Assign xmlDocument to Message2
    2. Manipilate Message2
    3. Assign Message2 to xmlDocument
  5. Outside, after the loop, assign xmlDocument to Message1
  6. Return Message1

BizTalk – Rename Output File Based on Some Attribute in Orchestration

  1. Create an Orchestration string variable (in this case testVAR)
  2. Add assignment shape with code below
  3. Change the send location output file name to %SourceFileName%

    [sourcecode language=”csharp”]
    outputMessage = outputMessage ;

    testVAR = xpath(outputMessage,"string(/*[local-name()=’SomeName1′ and namespace-uri()=’SomeSchema’]/*[local-name()=’SomeName2′ and namespace-uri()=”]/*[local-name()=’SomeName3′ and namespace-uri()=”]/text())");

    outputMessage(FILE.ReceivedFileName) = testVAR + ".TXT";
    [/sourcecode]

     

Get ClientContext in SharePoint App

Add the following function

[sourcecode language="javascript"]
function getParameterByName(name) {
name = name.replace(/[\[]/, "\\[").replace(/[\]]/, "\\]");
var regex = new RegExp("[\\?&amp;]" + name + "=([^&amp;#]*)"),
results = regex.exec(location.search);
return results === null ? "" : decodeURIComponent(results[1].replace(/\+/g, " "));
}

[/sourcecode]

Then you can use this to get ClientContext

[sourcecode language="javascript"]
siteUrl = getParameterByName("SPAppWebUrl");

var clientContext = new SP.ClientContext(siteUrl);
[/sourcecode]

BizTalk – Using Tag Identifiers on Optional Records

Problem: I have a flat file with optional records for which I need to create a schema. Validation of schema only succeeds when a file is selected that contains all the possible records and fails if any is removed.

Resolution: Change the Parser Optimization (located on the schema node) to “Complexity” instead of “Speed” optimization.

BizTalkOptionalTagIdentifiers