Yeah the resetting is the problem still. It requires High Level security setting of the DACL :-(

I did find a way to apply it as the VBS code does. To put it in better words I have translated the VBS code in a way KiX can handle it. Unfortunately it does not reset the DACL as I thought.

 Code:
  ;Set HighLevel Security Control Flag
  Dim $objSecurity, $objMethod, $objInParam
  ReDim $objSD
  $objSecurity = GetObject("winmgmts:{(Security,Restore)}\\.\root\cimv2:Win32_LogicalFileSecuritySetting='"+$strObject+"'")
  $objSD = $objSecurity.ExecMethod_("GetSecurityDescriptor").Descriptor
  $objSD.ControlFlags = $objSD.ControlFlags + &400
  $objMethod = $objSecurity.Methods_("SetSecurityDescriptor")
  $objInParam = $objMethod.inParameters.SpawnInstance_()
  $objInParam.Properties_.item("Descriptor").Value = $objSD
  $=$objSecurity.ExecMethod_("SetSecurityDescriptor",$objInParam)


$strObject would be the folder.