Configuration Manager SDK ForumDiscussion on the Software Development kit for System Center Configuration Manager© 2009 Microsoft Corporation. All rights reserved.Wed, 25 Nov 2009 17:31:57 Z649dc3f6-ee04-4cc1-92e0-bf7fa910777dhttp://social.technet.microsoft.com/Forums/en-US/configmgrsdk/thread/69d55b69-2502-4f98-adfa-8ef29f9bd951http://social.technet.microsoft.com/Forums/en-US/configmgrsdk/thread/69d55b69-2502-4f98-adfa-8ef29f9bd951abanfordhttp://social.technet.microsoft.com/Profile/en-US/?user=abanfordScripting address creationHas anyone tried using the Technet vb script for creating multiple Addresses in SMS 2003 on an SCCM site?  I have a single primary site running SCCM 2007 SP2 with SQL server 2008 SP1 running on the same box.  The script does successfully create the address, but on the Rate Limits tab, 'Unlimited when sending to this address' is selected instead of 'Limited to specified'.  In my script I am creating an array of 24 transfer rates for each hour of the day.  It works great on SMS 2003 SP3 sites.  I can see in the site control file that when I create an address manually with the settings I want, it has the following text in the address, whereas the ones created by my script are missing this.<br/><br/>    BEGIN_PROPERTY_LIST<br/>        &lt;Pulse Mode&gt;<br/>        &lt;0&gt;<br/>        &lt;3&gt;<br/>        &lt;5&gt;<br/>    END_PROPERTY_LIST<br/><br/><br/>Here is the script I am using.  It is based on the script provided by Microsoft here:  <a href="http://technet.microsoft.com/en-us/library/cc180643.aspx">http://technet.microsoft.com/en-us/library/cc180643.aspx</a><br/><br/><br/>dim rateArray(24)<br/>Dim strSecSiteServer<br/>Dim strSecSiteCode<br/>Dim strSiteServer<br/>Dim strSiteCode<br/>Dim WbemContext<br/>Dim WbemServices<br/>Dim WbemInst<br/>Dim objArgs<br/>Dim lLocator<br/>Dim newep1<br/>Dim newep2<br/>rateArray(0)= 90<br/>rateArray(1)= 90<br/>rateArray(2)= 90<br/>rateArray(3)= 90<br/>rateArray(4)= 90<br/>rateArray(5)= 90<br/>rateArray(6)= 90<br/>rateArray(7)= 90<br/>rateArray(8)= 25<br/>rateArray(9)= 25<br/>rateArray(10)= 25<br/>rateArray(11)= 25<br/>rateArray(12)= 25<br/>rateArray(13)= 25<br/>rateArray(14)= 25<br/>rateArray(15)= 25<br/>rateArray(16)= 25<br/>rateArray(17)= 25<br/>rateArray(18)= 25<br/>rateArray(19)= 25<br/>rateArray(20)= 25<br/>rateArray(21)= 50<br/>rateArray(22)= 90<br/>rateArray(23)= 90<br/>strSiteCode=&quot;ABC&quot;<br/>strSiteServer=&quot;SCCM01&quot;<br/>Set objArgs = WScript.Arguments<br/>If objArgs.Count &lt;  1 Then WScript.Quit<br/>strSecSiteCode = objArgs(0)<br/>strSecSiteServer = &quot;SERVER&quot; &amp; strSecSiteCode<br/>WScript.Echo strSecSiteCode<br/>Set objArgs = Nothing<br/>Set lLocator = CreateObject(&quot;WbemScripting.SWbemLocator&quot;)<br/>Set WbemServices = lLocator.ConnectServer(strSiteServer, &quot;root\sms\site_&quot; &amp; strSiteCode)<br/>set WbemContext=CreateObject(&quot;WbemScripting.SWbemNamedValueSet&quot;)<br/>WbemContext.Add &quot;SessionHandle&quot;,WbemServices.ExecMethod(&quot;SMS_SiteControlFile&quot;,&quot;GetSessionHandle&quot;).SessionHandle<br/>WbemServices.ExecMethod &quot;SMS_SiteControlFile.Filetype=2,Sitecode=&quot;&quot;&quot; &amp; strSiteCode &amp; &quot;&quot;&quot;&quot;, &quot;Refresh&quot;, , , WbemContext<br/>'Spawn an SMS_SCI_Address instance<br/>Set WbemInst = WbemServices.Get(&quot;SMS_SCI_Address&quot;).SpawnInstance_()<br/>wbeminst.AddressType = &quot;MS_LAN&quot;<br/>wbeminst.DesSiteCode = strSecSiteCode<br/>wbeminst.ItemName = strSecSiteCode &amp; &quot;|MS_LAN&quot;<br/>wbeminst.ItemType = &quot;Address&quot;<br/>wbeminst.Order = 1<br/>wbeminst.SiteCode = strSiteCode<br/>wbeminst.UnlimitedRateForAll = 0<br/>wbeminst.RateLimitingSchedule = rateArray<br/>Set newep1 = WbemServices.Get(&quot;SMS_EmbeddedProperty&quot;).SpawnInstance_()<br/>newep1.PropertyName = &quot;Connection Point&quot;<br/>newep1.Value = 0<br/>newep1.Value1 = strSecSiteServer<br/>newep1.Value2 = &quot;SMS_SITE&quot;<br/>Set newep2 = WbemServices.Get(&quot;SMS_EmbeddedProperty&quot;).SpawnInstance_()<br/>newep2.PropertyName = &quot;LAN Login&quot;<br/>newep2.Value = 0<br/>wbeminst.Props = Array(newep1, newep2)<br/>wbeminst.Put_ , WbemContext<br/>'comment<br/>WbemServices.ExecMethod &quot;SMS_SiteControlFile.Filetype=1,Sitecode=&quot;&quot;&quot; &amp; strSitecode &amp; &quot;&quot;&quot;&quot;, &quot;Commit&quot;, , , WbemContext<br/>WbemServices.Get(&quot;SMS_SiteControlFile&quot;).ReleaseSessionHandle WbemContext.Item(&quot;SessionHandle&quot;).Value<br/>WScript.Sleep (30000)Wed, 25 Nov 2009 16:18:24 Z2009-11-25T17:31:57Zhttp://social.technet.microsoft.com/Forums/en-US/configmgrsdk/thread/373301b3-a2a2-41b9-a799-17a5118409e5http://social.technet.microsoft.com/Forums/en-US/configmgrsdk/thread/373301b3-a2a2-41b9-a799-17a5118409e5Computastarhttp://social.technet.microsoft.com/Profile/en-US/?user=ComputastarVBScript & ImportSequenceHi,<br/><br/>I know its bad form to just ask for code but I haven't got a clue where to start, I've been looking creating a script to import a task sequence, I've found the <span>SMS_TaskSequencePackage::ImportSequence function, I'd like to write the script in VBScript, any help?<br/><br/>Thanks<br/><br/>Jason</span><hr class="sig">ComputastarTue, 24 Nov 2009 15:53:27 Z2009-11-25T15:32:14Zhttp://social.technet.microsoft.com/Forums/en-US/configmgrsdk/thread/34e6243f-b480-4948-8543-c4a489831ee1http://social.technet.microsoft.com/Forums/en-US/configmgrsdk/thread/34e6243f-b480-4948-8543-c4a489831ee1Computastarhttp://social.technet.microsoft.com/Profile/en-US/?user=ComputastarFunction to set Parent Site,I'm trying to work out how to create a vbscript to set the Parent Site code, any pointers would be gratefully received<hr class="sig">ComputastarWed, 25 Nov 2009 14:38:01 Z2009-11-25T15:25:35Zhttp://social.technet.microsoft.com/Forums/en-US/configmgrsdk/thread/53621d84-a5a2-4a73-aa6e-76168ee8efc5http://social.technet.microsoft.com/Forums/en-US/configmgrsdk/thread/53621d84-a5a2-4a73-aa6e-76168ee8efc5Rodent_111http://social.technet.microsoft.com/Profile/en-US/?user=Rodent_111How to monitor a SCCM (SMS 4) Machine Policy Retrieval & Evaluation Cycle<p>Hi, i am after a vbscript method to monitor when a Machine Policy Retrieval &amp; Evaluation Cycle is in progress, because it can take several minitues to complete I would like my script to wait until the process has completed before continuing.<br/> <br/> This is the code used to start the process:</p> <pre>On Error Resume Next<br/> <br/> Dim oCPAppletMgr 'Control Applet manager object. <br/> Dim oClientAction 'Individual client action. <br/> Dim oClientActions 'A collection of client actions. <br/> <br/> 'Get the Control Panel manager object. <br/> Set oCPAppletMgr = CreateObject(&quot;CPApplet.CPAppletMgr&quot;) <br/> If Err.Number &lt;&gt; 0 Then<br/> Wscript.Echo &quot;Couldn’t create control panel application manager&quot; <br/> WScript.Quit <br/> End If<br/> <br/> 'Get a collection of actions. <br/> Set oClientActions = oCPAppletMgr.GetClientActions <br/> If Err.Number &lt;&gt; 0 Then<br/> WScript.Echo &quot;Couldn’t get the client actions&quot; <br/> Set oCPAppletMgr = Nothing<br/> WScript.Quit <br/> End If<br/> <br/> 'Display each client action name and perform it.<br/> For Each oClientAction In oClientActions<br/> <br/> If oClientAction.Name = &quot;Request &amp; Evaluate Machine Policy&quot; Then<br/> WScript.Echo &quot;Performing action &quot; + oClientAction.Name <br/> oClientAction.PerformAction <br/> End If<br/> Next <br/> <br/> <br/> Set oClientActions = Nothing<br/> Set oCPAppletMgr = Nothing</pre> any help would be great.<br/> <br/> Regards<br/> Rodney<br/> <br/> EDIT: I am using SCCM (SMS version 4)<br/>Wed, 18 Nov 2009 04:18:23 Z2009-11-25T02:09:11Zhttp://social.technet.microsoft.com/Forums/en-US/configmgrsdk/thread/d7dac221-afbd-4531-8e43-86df20bdce77http://social.technet.microsoft.com/Forums/en-US/configmgrsdk/thread/d7dac221-afbd-4531-8e43-86df20bdce77penticrackhttp://social.technet.microsoft.com/Profile/en-US/?user=penticrackHow to READ Collectionrules ?Hi there,<br/> i´ve read a lot of threads which describe adding rules to a collection via script. In my case i have to READ rules (query or static rules)<br/> of a collection. My script uses WMI. Here is a snippet of my Script:<br/> <br/> <pre lang=x-vbnet>Set objWMIService = GetObject(&quot;winMgmts:{impersonationLevel=impersonate}!\\&quot; &amp; strSiteServer &amp; &quot;\root\sms\site_&quot; &amp; strSiteCode) Set ergCollections = objWMIService.ExecQuery(&quot;select * from SMS_Collection&quot;) For Each ergCollection In ergCollections RuleSet = ergCollection.CollectionRules Debug.Print ergCollection.CollectionID Debug.Print ergCollection.CollectionRules For Each Rule In RuleSet Debug.Print Rule.RuleName Next Next </pre> U can see, i want to show all Collection with their Rules, but this way the Result is everytime NULL . The Class sms_collectionruledirect or sms_collectionrulequery  has no instances. <br/> What is the correct way to show the collection-rules?<br/> <br/> <br/> <br/> p.s.: The reason why i have to do this is to export whole trees of collections. I need this for a kind of migration. If someone know a script to do this, please tell me :)<br/> The export function of the sccm-console only export the parent node and ONE child node. I need all child-nodes :)<br/> <br/> <br/> greets nico<br/>Sun, 22 Nov 2009 18:53:15 Z2009-11-23T16:09:57Zhttp://social.technet.microsoft.com/Forums/en-US/configmgrsdk/thread/6d676a9a-2355-49a5-a56d-19550821f04ehttp://social.technet.microsoft.com/Forums/en-US/configmgrsdk/thread/6d676a9a-2355-49a5-a56d-19550821f04eJamie Courteshttp://social.technet.microsoft.com/Profile/en-US/?user=Jamie%20CourtesComputers added programmatically (vbscript) into SCCM collection, do not PXE boot...<p>Hi All,<br/><br/>I'd like to curtail the whole explanation of what my needs are etc, and just get to the problem at hand. It is the last hurdle in a process that I have developed, and if i can get this fixed, i've realised something quite cool (which I will gladly share if i can get it to work!)<br/><br/>Essentially, using some sample code from the SDK, i've got a VBScript patched together which adds computers into a predetermined SCCM collection (which coincidentally has a PXE OSD advertisement on it).<br/><br/>My issue is that the computers added via this VBScript don't seem to be able to PXE boot.<br/><br/>I receive this on the computers in question when attempting to boot via PXE:<br/><br/>CLIENT MAC ADDR: 01 01 01 01 01 01  GUID: 123456 23423  234 ......<br/>PXE-E53: No boot filename received<br/><br/>PXE-M0F: Exiting Intel Boot Agent.<br/><br/>Here is the vbscript we are using (based heavily off the samples in the SDK):<br/><br/><br/>'Usage:<br/>' cscript sccmsubmitpc.vbs &lt;hostname&gt; &lt;MAC&gt; &lt;GUID&gt;<br/>'</p> <p>Dim sComputername<br/>Dim sGUID<br/>Dim sMAC<br/>Dim sPassword<br/>Dim sUser</p> <p>Set Ag=Wscript.Arguments</p> <p>sComputername=Ag.item(0)<br/>sMac=Ag.item(1)<br/>sGuid=Ag.item(2)</p> <p><br/>sUser = &quot;account&quot;<br/>sPassword = &quot;password&quot;</p> <p><br/>Set conxion = Connect(&quot;SCCMDBSERVER&quot;, sUser, sPassword)<br/>AddNewComputer conxion, sComputername, sGUID, sMAC</p> <p> </p> <p>Function Connect(server, userName, userPassword)<br/>    <br/>    On Error Resume Next<br/>    <br/>    Dim net<br/>    Dim localConnection<br/>    Dim swbemLocator<br/>    Dim swbemServices<br/>    Dim providerLoc<br/>    Dim location<br/>    <br/>    Set swbemLocator = CreateObject(&quot;WbemScripting.SWbemLocator&quot;)</p> <p>    swbemLocator.Security_.AuthenticationLevel = 6 'Packet Privacy.<br/>    <br/>    ' If the server is local, don't supply credentials.<br/>    Set net = CreateObject(&quot;WScript.NetWork&quot;) <br/>    <br/>    If UCase(net.ComputerName) = UCase(server) Then<br/>        localConnection = true<br/>        userName = &quot;&quot;<br/>        userPassword = &quot;&quot;<br/>        server = &quot;.&quot;<br/>    End If<br/>    <br/>    ' Connect to the server.<br/>    Set swbemServices= swbemLocator.ConnectServer(server, &quot;root\sms&quot;,userName,userPassword)<br/>    <br/>    If Err.Number&lt;&gt;0 Then<br/>        Wscript.Echo &quot;Couldn't connect: &quot; + Err.Description<br/>        Connect = null<br/>        Exit Function<br/>    End If<br/>   </p> <p>    ' Determine where the provider is and connect.<br/>    Set providerLoc = swbemServices.InstancesOf(&quot;SMS_ProviderLocation&quot;)</p> <p>        For Each location In providerLoc<br/>            If location.ProviderForLocalSite = True Then<br/>                Set swbemServices = swbemLocator.ConnectServer(location.Machine, &quot;root\sms\site_&quot; + location.SiteCode,userName,userPassword)<br/>                If Err.Number&lt;&gt;0 Then<br/>                    Wscript.Echo &quot;Couldn't connect:&quot; + Err.Description<br/>                    Connect = Null<br/>                    Exit Function<br/>                End If<br/>                Set Connect = swbemServices<br/>                Exit Function<br/>            End If<br/>        Next<br/>    Set Connect = null ' Failed to connect.<br/>End Function</p> <p> </p> <p><br/>Sub AddNewComputer (connection, netBiosName, smBiosGuid, macAddress)</p> <p>    Dim inParams<br/>    Dim outParams<br/>    Dim siteClass<br/>    Dim collection<br/>    Dim collectionRule<br/>    <br/>    If (IsNull(smBiosGuid) = True) And (IsNull(macAddress) = True) Then<br/>     WScript.Echo &quot;smBiosGuid or macAddress must be defined&quot;        <br/>     Exit Sub    <br/>    End If         <br/>    <br/>    If IsNull(macAddress) = False Then<br/>     macAddress = Replace(macAddress,&quot;-&quot;,&quot;:&quot;)<br/>    End If<br/>    <br/>    ' Obtain an InParameters object specific    <br/>    ' to the method.        <br/>    <br/>    Set siteClass = connection.Get(&quot;SMS_Site&quot;)    <br/>    Set inParams = siteClass.Methods_(&quot;ImportMachineEntry&quot;). inParameters.SpawnInstance_()<br/>        <br/>    ' Add the input parameters.<br/>    inParams.Properties_.Item(&quot;MACAddress&quot;) =  macAddress<br/>    inParams.Properties_.Item(&quot;NetbiosName&quot;) =  netBiosName    <br/>    inParams.Properties_.Item(&quot;OverwriteExistingRecord&quot;) =  False    <br/>    inParams.Properties_.Item(&quot;SMBIOSGUID&quot;) =  smBiosGuid    <br/>    ' Add the computer.    <br/>    Set outParams = connection.ExecMethod(&quot;SMS_Site&quot;, &quot;ImportMachineEntry&quot;, inParams)<br/>    <br/>    ' Add the computer to the all systems collection.   <br/>    set collection = connection.Get(&quot;SMS_Collection.CollectionID='AIM00048'&quot;)<br/>    set collectionRule=connection.Get(&quot;SMS_CollectionRuleDirect&quot;).SpawnInstance_      <br/>    <br/>    collectionRule.ResourceClassName=&quot;SMS_R_System&quot;   <br/>    collectionRule.ResourceID= outParams.ResourceID<br/>              <br/>    collection.AddMembershipRule collectionRule</p> <p>End Sub<br/><br/><br/><br/><br/>I remember during my development of this whole solution (this submitting pc to a deployment collection is just part of a whole custom system), that I came across someone who had the same issue.... programmatically created computer objects couldn't pxe boot... <br/>when i tried to hunt down that forum post recently, i couldnt find it. <br/>all i can remember was that there was a mention of the type of resource or what not, but again, that is from memory, and it is quite vague, and may or may not have anything to do with the solution.<br/><br/>When comparing the programmatically added computer to discovery created computer objects, there ARE some differences in the properties of each, but im not quite sure if that could be part of the solution to this...<br/>If you think the info could help, let me know, and ill post some screenshots...<br/><br/>Thanks for taking the time to look at my question !<br/><br/>Cheers,<br/><br/>Jamie<br/><br/><br/></p>Fri, 13 Nov 2009 12:20:57 Z2009-11-22T19:18:09Zhttp://social.technet.microsoft.com/Forums/en-US/configmgrsdk/thread/be1167dd-c17c-48ed-afa3-a0147792404ehttp://social.technet.microsoft.com/Forums/en-US/configmgrsdk/thread/be1167dd-c17c-48ed-afa3-a0147792404eRodent_111http://social.technet.microsoft.com/Profile/en-US/?user=Rodent_111How to determine what type a step is, from the list of task sequence stepsOnce I have an array of step from a Task Sequence how can I determine what type of step each one is. ie: is the step an Install Software, Restart Computer or Command Line etc.<br/> <br/> There doesn't appear to be a property that tells the class or type for the action.<br/> <br/> Thanks for any help<br/> Rodney<br/>  Sat, 21 Nov 2009 03:09:38 Z2009-11-25T06:16:05Zhttp://social.technet.microsoft.com/Forums/en-US/configmgrsdk/thread/1503b7c9-d340-44be-ace0-a5a03d05fcb4http://social.technet.microsoft.com/Forums/en-US/configmgrsdk/thread/1503b7c9-d340-44be-ace0-a5a03d05fcb4Michl666http://social.technet.microsoft.com/Profile/en-US/?user=Michl666No TaskSequence Variables were setI'm using a vb script(with tsmediaapi.dll Version 4.0.5931.0) to create a standalone TaskSequence Media. In the script I define a TaskSequenceVaribable. The script says the image were successfully created. I can boot the image an everything works fine, except  my Variable(s) is(are) not set in SCCM Environment. The Script:<br/> iResult=fCreateStandaloneMedia(&quot;server_sccm&quot;,&quot;MYSITE&quot;,&quot;server_dp&quot;,&quot;&quot;,_<br/>     &quot;SBW Stand alone media&quot;,&quot;CD&quot;,_<br/>     &quot;d:\test_var.iso&quot;,_<br/>     &quot;6000&quot;,&quot;is_secret&quot;,&quot;MYSITE000&quot;,&quot;DVD=TRUE&quot;)<br/> if iResult = 0 then<br/>     wscript.echo &quot; Creating of StandaloneMedia successfully completed.&quot;<br/> else<br/>     wscript.echo &quot; Creating of StandaloneMedia finished with errors.&quot;<br/> end if<br/> wscript.quit iResult<br/> <br/> <br/> function fCreateStandaloneMedia(sProviderName,sSCCMSite,sDistributionPoints,sConnectionOptions,sMediaLabel,_<br/>         sMediaType,sDestinationPath,iMediaSizeInMB,sMediaPassword,sTaskSequenceId,sTaskSequenceVariables)<br/>     Dim oTSmedia<br/>     Dim hr<br/>     Set oTSmedia = CreateObject(&quot;Microsoft.ConfigMgr.TsMedia&quot;)<br/>     ' Change these properties according to your configuration.<br/>     oTSmedia.ProviderName = sProviderName<br/>     oTSmedia.SiteCode = sSCCMSite<br/>     oTSmedia.DistributionPoints = sDistributionPoints<br/>     oTSmedia.ConnectionOptions = sConnectionOptions<br/>     oTSmedia.MediaLabel = sMediaLabel<br/> <br/>     wscript.echo &quot; TSVAR: &quot; &amp; sTaskSequenceVariables<br/>     hr= oTSmedia.CreateStandaloneMedia( sMediaType, _<br/>             sDestinationPath,        _<br/>             iMediaSizeInMB,              _<br/>             sMediaPassword,          _<br/>             sTaskSequenceId,         _<br/>             sTaskSequenceVariables,  _<br/>             true)<br/>     <br/>     While oTSmedia.Status = 0<br/>           WScript.Echo oTSmedia.CurrentStep &amp; &quot;/&quot; &amp; oTSmedia.NumSteps &amp; _<br/>           &quot;  (&quot; &amp; oTSmedia.StepProgress &amp; &quot;)  &quot; &amp; oTSmedia.StepInfo<br/>           WScript.sleep 1000<br/>     Wend<br/>     WScript.Echo &quot;Boot media creation finished with result = 0x&quot; &amp; Hex(oTSmedia.ExitCode) &amp; &quot; &quot; &amp; oTSmedia.ErrorDetail<br/>     fCreateStandaloneMedia=oTSmedia.ExitCode<br/> End function<br/> <br/> Anything wrong?Wed, 11 Nov 2009 11:51:18 Z2009-11-20T14:27:59Zhttp://social.technet.microsoft.com/Forums/en-US/configmgrsdk/thread/63d02d2d-c288-49f4-92e5-91e2b98ce008http://social.technet.microsoft.com/Forums/en-US/configmgrsdk/thread/63d02d2d-c288-49f4-92e5-91e2b98ce008Cristian Vidalhttp://social.technet.microsoft.com/Profile/en-US/?user=Cristian%20VidalHow to create a branch Distribution Point using de SDK<p dir=ltr style="margin-right:0px" align=left><font face=Arial size=2>I have this script to create a Distribution Point. Anyone Knows what I have to add to create a Branch Distribution? Also I would like to make the BDP protected.</font></p> <p dir=ltr style="margin-right:0px" align=left> </p> <p dir=ltr style="margin-right:0px" align=left>Any Idea? </p> <p align=left> </p> <p align=left> </p> <p align=left><font face=Arial size=2>Dim objSWbemLocator<br>Dim objSWbemServices<br>Dim ProviderLoc<br>Dim Location<br>Dim objSWbemContext<br>Dim SCI_SysResUseComponent<br>Dim SCI_SysResUseComponentSet<br>Dim sitecode<br></p></font> <p align=left><font face=Arial size=2></font> </p> <p align=left><font face=Arial size=2>Dim siteserver<br>Dim username<br>Dim password<br>Dim objNewShare<br>Dim lasterr<br>Dim NALPath<br>Dim clsNALMethods</font></p><font face=Arial size=2> <p align=left><br>sitecode=&quot;C00&quot;<br>NomBranchDP=&quot;ServidorTest4&quot;<br>'Connect to the Site SMS provider<br>Wscript.echo &quot;Connect to the Site SMS provider&quot;</p> <p align=left> <br>Set objSWbemLocator =  CreateObject(&quot;WbemScripting.SWbemLocator&quot;)<br>Set objSWbemServices = objSWbemLocator.ConnectServer( , &quot;root\sms\site_&quot; &amp; sitecode )</p> <p align=left><br>'Open the Site Control File<br>Wscript.echo &quot;Open the Site Control File&quot;<br>Set objSWbemContext = CreateObject(&quot;WbemScripting.SWbemNamedValueSet&quot;)<br>objSWbemContext.Add &quot;SessionHandle&quot;,ObjSWbemServices.ExecMethod(&quot;SMS_SiteControlFile&quot;, &quot;GetSessionHandle&quot;).SessionHandle<br>objSWbemServices.ExecMethod &quot;SMS_SiteControlFile.Filetype=1,Sitecode=&quot;&quot;&quot; &amp; sitecode &amp; &quot;&quot;&quot;&quot;, &quot;Refresh&quot;, , , objSWbemContext</p> <p align=left>Wscript.echo &quot;Creating New DP...&quot;<br>Set clsNALMethods = objSWbemServices.Get(&quot;SMS_NAL_Methods&quot;)<br>clsNALMethods.PackNALPath Array(&quot;Display=\\&quot;&amp; NomBranchDP &amp;&quot;&quot;), &quot;MSWNET&quot;, &quot;\\&quot;&amp; NomBranchDP &amp;&quot;&quot;, Array(&quot;SMS_SITE=SITECODE&quot;), NALPath</p> <p align=left>Set objNewShare = objSWbemServices.Get(&quot;SMS_SCI_SysResUse&quot;).SpawnInstance_()</p> <p align=left><br>objNewShare.NetworkOSPath=Null<br>objNewShare.Props=Null<br>objNewShare.SiteCode=sitecode</p> <p align=left>objNewShare.NALPath=NALPath</p> <p align=left>'objNewShare.NALType=&quot;Windows NT Share&quot;<br>objNewShare.NALType=&quot;MSWNET&quot;<br>objNewShare.RoleName=&quot;SMS Site System&quot;</p> <p align=left>objNewShare.Put_ , objSWbemContext<br>objNewShare.RoleName=&quot;SMS Distribution Point&quot;<br>objNewShare.Put_ , objSWbemContext</p> <p align=left>If Err &lt;&gt; 0 Then<br>set lasterr = CreateObject(&quot;WbemScripting.SWbemLastError&quot;)<br>    Wscript.echo &quot;Error in: &quot; &amp; lasterr.Operation<br>End If</p> <p align=left><br>'Commit the changes and release control file<br>Wscript.echo &quot;Commit the changes and release control file&quot;<br>objSWbemServices.ExecMethod &quot;SMS_SiteControlFile.Filetype=1,Sitecode=&quot;&quot;&quot; &amp; sitecode &amp; &quot;&quot;&quot;&quot;, &quot;Commit&quot;, , , objSWbemContext<br>objSWbemServices.Get(&quot;SMS_SiteControlFile&quot;).ReleaseSessionHandle objSWbemContext.Item(&quot;SessionHandle&quot;).Value<br>Wscript.echo &quot;The End&quot;</p> <p align=left> </p> <p align=left> </p> <p align=left><br></font> </p>Tue, 20 Nov 2007 15:16:55 Z2009-11-20T06:12:49Zhttp://social.technet.microsoft.com/Forums/en-US/configmgrsdk/thread/fe73ef9f-1f65-4aea-9d4c-a4c0596da896http://social.technet.microsoft.com/Forums/en-US/configmgrsdk/thread/fe73ef9f-1f65-4aea-9d4c-a4c0596da896Shawn Willhelmhttp://social.technet.microsoft.com/Profile/en-US/?user=Shawn%20WillhelmHow do I create a new Driver Category using managed code.<p>We are writing an application to import drivers and build packages automatically. so far everything works except we are not able to create new driver categories, only add existing categories to our driver.<br/>I have attempted to create a new category using SMS_CategoryInstance but failed to realize the <strong>LocalizedCategoryInstanceName </strong>was read-only and now I have a blank category that i cannot delete as its not properly created.</p> <p>thank you</p> <p>Shawn</p>Thu, 19 Nov 2009 19:26:03 Z2009-11-19T19:26:04Zhttp://social.technet.microsoft.com/Forums/en-US/configmgrsdk/thread/583a76cc-39fe-4f20-828d-19eae9036c45http://social.technet.microsoft.com/Forums/en-US/configmgrsdk/thread/583a76cc-39fe-4f20-828d-19eae9036c45alex.fischerhttp://social.technet.microsoft.com/Profile/en-US/?user=alex.fischerSCCM 2007 and remote steering --> Power Shell or what?Hi, <br/><br/>I have to fill collections, create packages or advertisement programmatically. Is there a way to do this? (Background: how to execute steps in SCCM that will be initiated on an other machine without user interface available)?<br/><br/>Thanks for any input. <br/><br/>Alex FischerThu, 19 Nov 2009 13:43:06 Z2009-11-19T14:08:10Zhttp://social.technet.microsoft.com/Forums/en-US/configmgrsdk/thread/5fe60098-88ab-4d2d-b5f5-321df4a6d550http://social.technet.microsoft.com/Forums/en-US/configmgrsdk/thread/5fe60098-88ab-4d2d-b5f5-321df4a6d550Rodent_111http://social.technet.microsoft.com/Profile/en-US/?user=Rodent_111How to Read a Task Sequence from a Task Sequence Package I have been trying to get the following code to work in a vbscript:<br/> <pre>Function ReadTaskSequence(connection, taskSequencePackage) ' Get the parameters object. Set packageClass = connection.Get(&quot;SMS_TaskSequencePackage&quot;) Set objInParam = packageClass.Methods_(&quot;GetSequence&quot;). _ inParameters.SpawnInstance_() ' Add the input parameters. objInParam.Properties_.Item(&quot;TaskSequencePackage&quot;) = taskSequencePackage ' Get the sequence. Set objOutParams = connection.ExecMethod(&quot;SMS_TaskSequencePackage&quot;, &quot;GetSequence&quot;, objInParam) Set ReadTaskSequence = objOutParams.TaskSequence End Function</pre> but when I run this code like this:<br/><br/> <pre>set oTasks = ReadTaskSequence(connection, &quot;A01009E1&quot;) </pre> I get the follow error in the function on this line:<br/>objInParam.Properties_.Item(&quot;TaskSequencePackage&quot;) =  taskSequencePackage<br/><br/>error:<br/>Microsoft VBScript runtime error: Type mismatch: 'objInParam.Properties_.Item<br/><br/>Can anyone help me with this function, I need to list all the Tasks in a Task Sequence.<br/><br/>Regards<br/>Rodney<br/>Tue, 17 Nov 2009 22:44:22 Z2009-11-25T06:15:49Zhttp://social.technet.microsoft.com/Forums/en-US/configmgrsdk/thread/2e58df01-7cfc-445a-9bc9-bfe8b8671c0ehttp://social.technet.microsoft.com/Forums/en-US/configmgrsdk/thread/2e58df01-7cfc-445a-9bc9-bfe8b8671c0eMatt Broadstockhttp://social.technet.microsoft.com/Profile/en-US/?user=Matt%20BroadstockMissing DDRPropertyFlagsEnum for "Full Replace" in SMSResGenHello all, I am writing a VB.Net app to create DDRs for SMS/SCCM.  I am trying to follow good coding practices by using &quot;Option Strict On&quot; but the SMSResGen object is causing some issues. Basically, the &quot;Full Replace / Low Confidence&quot; bit isn't available when enumerating DDRPropertyFlagsEnum. I have an array that I would like to REPLACE with new info rather than appending to it. <br/><br/>I could probably disable 'Option Strict On' and just pass the integer 17 instead of &quot;SMSRSGENCTLLib.DDRPropertyFlagsEnum.ADDPROP_ARRAY Or <em>MISSINGENUMPROP</em>&quot; but it seems a bit silly to have to do this.  I know that SMS/SCCM itself generates DDRs with this flag set so it is a bit disappointing that I cannot do it with SMSResGen without getting rid of 'Option Scrict On'.<br/><br/>Any suggestions?<br/><br/>References to what I am seeing:<br/><a href="http://msdn.microsoft.com/en-us/library/cc145875.aspx">http://msdn.microsoft.com/en-us/library/cc145875.aspx</a><br/><a href="http://myitforum.com/cs2/blogs/rzander/archive/2009/05/15/ddrpropertyflagsenum-update.aspx">http://myitforum.com/cs2/blogs/rzander/archive/2009/05/15/ddrpropertyflagsenum-update.aspx</a>Tue, 03 Nov 2009 20:10:46 Z2009-11-17T20:30:49Zhttp://social.technet.microsoft.com/Forums/en-US/configmgrsdk/thread/8dc0369b-e646-4c43-91c1-778f76bc5b67http://social.technet.microsoft.com/Forums/en-US/configmgrsdk/thread/8dc0369b-e646-4c43-91c1-778f76bc5b67mrasmussenhttp://social.technet.microsoft.com/Profile/en-US/?user=mrasmussenSecurity around console pluginI am authoring a utility that will be hosted through the SCCM console.&nbsp; I can add the action item to the console fine and it launches the exe fine.&nbsp; My question is how do I lock down this action item from certain users?&nbsp; I know sccm has the ability to hide parts of the console based on who is logged in.&nbsp; How can I add my action item to the security mix?Wed, 14 Oct 2009 18:29:54 Z2009-11-17T01:55:43Zhttp://social.technet.microsoft.com/Forums/en-US/configmgrsdk/thread/3da45137-81e2-4088-beb3-3008d27b8c4fhttp://social.technet.microsoft.com/Forums/en-US/configmgrsdk/thread/3da45137-81e2-4088-beb3-3008d27b8c4ftalathamhttp://social.technet.microsoft.com/Profile/en-US/?user=talathamPackage FlagsQuick question. I'm creating a package using VBScript and have set all the properties as required except one!<br/><br/>The 'Make this package available on protected distribution points when requested by clients inside the protected boundaries' tick box on the Distribution Settings tab. Can someone tell me which package property should be set and what value to enable that?<br/><br/>It's driving me mad.<br/><br/>ThanksFri, 13 Nov 2009 17:35:06 Z2009-11-17T01:41:20Zhttp://social.technet.microsoft.com/Forums/en-US/configmgrsdk/thread/3b7d2034-6cfa-4a63-87c6-d63dd860fb64http://social.technet.microsoft.com/Forums/en-US/configmgrsdk/thread/3b7d2034-6cfa-4a63-87c6-d63dd860fb64talathamhttp://social.technet.microsoft.com/Profile/en-US/?user=talathamVBScript Package Creation - Creating in a folder<p>Hi,<br/>Hopefully this is the right place for this question.<br/>I have created a VBScript that creates a folder structure: Manufacturer &gt; Product &gt; Name<br/><br/>I'm now trying to create a package under that folder structure. However, I cannot see how to assign a package to a ParentContainerNodeID.<br/>It doesn't seem to be a property of <span><strong>SMS_PackageBaseclass </strong>and forcing it ie. </span></p> <pre>newPackage.Name = &lt;productname&gt; newPackage.ParentContainerNodeID = &lt;folderID&gt;</pre> doesn't work.<br/><br/>Any ideas?<br/><br/>Fri, 13 Nov 2009 11:16:59 Z2009-11-17T01:15:37Zhttp://social.technet.microsoft.com/Forums/en-US/configmgrsdk/thread/834c5c54-1f0c-42ca-b8c3-dfd007a7348dhttp://social.technet.microsoft.com/Forums/en-US/configmgrsdk/thread/834c5c54-1f0c-42ca-b8c3-dfd007a7348dCorvohttp://social.technet.microsoft.com/Profile/en-US/?user=CorvoShow up scripted advertisements in configmr console Hello,<br/> <br/> when I advertise a package to a certain client by script (SDK) then the database is correctly updated. However these changes are not returned to the configmgr console (at least on my testlab).<br/> <br/> How can I accomplish to show up changes made by scripts in the console?<br/> <br/> Thanks for your help!<br/> <br/>Wed, 06 May 2009 09:33:36 Z2009-11-13T20:36:29Zhttp://social.technet.microsoft.com/Forums/en-US/configmgrsdk/thread/cb24a804-f261-4bed-b825-d6b99ecb10cehttp://social.technet.microsoft.com/Forums/en-US/configmgrsdk/thread/cb24a804-f261-4bed-b825-d6b99ecb10ceSuper Bean Flickerhttp://social.technet.microsoft.com/Profile/en-US/?user=Super%20Bean%20FlickerModify collection update schedule via vbscript<span class=Apple-style-span style="text-transform:none;text-indent:0px;border-collapse:separate;font:medium 'Times New Roman';white-space:normal;letter-spacing:normal;color:#000000;word-spacing:0px"> <div style="background-color:#ffffff;margin:8px;font-family:Verdana, Arial, Helvetica, sans-serif;color:#000000;font-size:67%">Hi,  <div><br/></div> <div>I'm trying to write a vbscript to change all collections on our SCCM server to update hourly.</div> <div><br/></div> <div>This is what I've got so far... but it fails. Anyone have this working?<br/><br/></div> <div><br/></div> <div> <pre lang=x-vbnet>'Option Explicit Dim objWshShell, strSiteCode, strSCCMServerFQDN, strUserName, strPassword Dim objLocator, objSMS, returnValue, strMessage, StartProcess Dim Collection, objCollection, strCollectionCheck, newCollection, strCollectionID, newCollectionRelation, Token, objNewCollection, objNewRight Dim strParentCollectionID, strNewCollectionName, strCollectionComment, strSecurityUserName, intSecurityPermissions, intHourlyMembershipRefreshTime Set objWshShell = WScript.CreateObject(&quot;WScript.Shell&quot;) ' Provide the needed configuration information here. strSiteCode = &quot;XXX&quot; :'Site code for the SCCM environment strSCCMServerFQDN = &quot;XXX&quot; :'Name of the SCCM server 'strNewCollectionName = &quot;XXXXXXXXXX&quot; : 'Name of the collection to be created 'strCollectionComment = &quot;XXXXXXXXXXXXXXXXX&quot; : 'Comment field shown in the collection 'strParentCollectionID = &quot;XXXXXXX&quot; : 'ID of the collection to contain the collection to be created 'strSecurityUserName = &quot;YourDomain\XXXXXXXX&quot; : 'Name of the domain group or user to be granted access 'intSecurityPermissions = &quot;6887&quot; : 'Permission setting to be granted to the domain group or user intHourlyMembershipRefreshTime = &quot;1&quot; :'Amount of time in hours that the collection should update its membership 'strUserName = &quot;XXXXXXXXXXXXXXXXXXXXXXX&quot; :'Domain user account that has rights to the SCCM environment 'strPassword = &quot;XXXXXXXXXXXXXXXXXXXXXXXX&quot; :'Accompanying password to the domain user account ' Attempts to connect to the SCCM environment. returnValue = ConnectToSCCM If returnValue = &quot;NoAccess&quot; Then wscript.echo &quot;Unable to connect to the SCCM provider. Either the user credentials entered are incorrect, or else this account does not have the needed rights and permissions to access the SCCM environment.&quot; End If ' Attempts to check if the collection already exists. Set Collection = objSMS.ExecQuery (&quot;select * from SMS_Collection&quot;) For Each objCollection in Collection objCollection.hourspan = 1 'hourly update objCollection.Put_ If Err.Number&lt;&gt;0 Then WScript.Echo &quot;Couldn't commit the package&quot; End If Next WScript.Quit ' ~$~----------------------------------------~$~ ' FUNCTIONS &amp; SUBROUTINES ' ~$~----------------------------------------~$~ Function ConnectToSCCM ' Attempts to use the provided information to connect to the SCCM environment. On Error Resume Next Set objLocator = CreateObject(&quot;WbemScripting.SWbemLocator&quot;) Set objSMS = objLocator.ConnectServer(strSCCMServerFQDN, &quot;root\sms\site_&quot; &amp; strSiteCode, strUserName, strPassword) If Err then Err.Clear ConnectToSCCM = &quot;NoAccess&quot; Exit Function End If objSMS.Security_.ImpersonationLevel = 3 objSMS.Security_.AuthenticationLevel = 6 ConnectToSCCM = &quot;Accessed&quot; End Function ' ~$~----------------------------------------~$~ Function ConvertToWMIdate(strDate) ' Attempts to convert the date into a WMI date-time. Dim strYear, strMonth, strDay, strHour, strMinute strYear=year(strDate) strMonth=month(strDate) strDay=day(strDate) strHour=hour(strDate) strMinute=minute(strDate) If len(strMonth) = 1 Then strMonth = &quot;0&quot; &amp; strMonth End If If len(strDay) = 1 Then strDay = &quot;0&quot; &amp; strDay End If If len(strHour) = 1 Then strHour = &quot;0&quot; &amp; strHour End If If len(strMinute) = 1 Then strMinute = &quot;0&quot; &amp; strMinute End If ConvertToWMIdate = strYear &amp; strMonth &amp; strDay &amp; strHour &amp; strMinute &amp; &quot;00.000000+***&quot; End Function</pre> <br/></div> </div> </span><br class=Apple-interchange-newline>Tue, 20 Oct 2009 05:00:10 Z2009-11-10T15:54:26Zhttp://social.technet.microsoft.com/Forums/en-US/configmgrsdk/thread/2a0078db-2053-4e21-9262-62ffbc156862http://social.technet.microsoft.com/Forums/en-US/configmgrsdk/thread/2a0078db-2053-4e21-9262-62ffbc156862IDontWannahttp://social.technet.microsoft.com/Profile/en-US/?user=IDontWannaEnumerating fields returned with a WMI queryThere are lots of good examples out there of using VBScript to run a query and write the results to the screen.<br />For each obj in col<br />&nbsp;wscript.echo obj.property<br />next<br /><br />What I want to do is enumerate all the fields which are returned and echo the property and value to the screen. In ADO you would do something like:<br />for each fld in rs.fields<br />&nbsp;wscript.echo fld.name &amp; " = " &amp; fld.value<br />next<br /><br />I nearly lost my mind reading about ExecQuery and the objects it returns. If anyone has some sample code it would be greatly appriciated. The reason for this is to allow me to be able to modify my SCCM query without having to then modify the code which writes it out to the screen.<br /><br />Thanks!<br /><br />Rob<br /><br />--edit--<br />I found the code I was experimenting with, this is the relevant bit:<br />For Each qres In qresults<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; set qw = qres.subclasses_<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; for each qw in qobs<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; for each qprop in qw.properties_<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; wscript.echo qprop.name &amp; "=" &amp; qprop.value<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; next<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; next<br /><br />What I get out is a whole bunch of:<br />SMS_G_System_COMPUTER_SYSTEM = <br />(one for every field being returned).<br /><br />Someone please help!Sun, 04 Oct 2009 18:42:38 Z2009-11-10T15:40:07Zhttp://social.technet.microsoft.com/Forums/en-US/configmgrsdk/thread/9a6b504d-fcbd-4b87-a92c-90cc5fd3d70ahttp://social.technet.microsoft.com/Forums/en-US/configmgrsdk/thread/9a6b504d-fcbd-4b87-a92c-90cc5fd3d70akiwidjhttp://social.technet.microsoft.com/Profile/en-US/?user=kiwidjPackageFlags / ProgramFlags AssistanceHi,<br/><br/>I just need to know how to set the Program flags for a program that I'm creating.<br/><br/>the SDK explains the available Hex and bit values for the properties but I'm not sure how to specify them in code (vbscript), the programs I've looked at the properties for aren't giving anything away, can someone please explain this to me?<br/><br/><br/>I thought the number could be concatenated together but this doesn't look like it would work given the available values below..<br/><span class=Apple-style-span style="text-transform:none;text-indent:0px;border-collapse:separate;font:16px 'Times New Roman';white-space:normal;letter-spacing:normal;color:#000000;word-spacing:0px"><span class=Apple-style-span style="font-family:Verdana;font-size:11px;font-weight:800"><br/> <div style="background-color:white;color:black"> <pre> <span style="color:blue">Sub</span> ModifyProgram(connection, existingpackageID, existingProgramNameToModify, programFlags, durationtoRun) <span style="color:blue">Dim</span> program <span style="color:green">' Load the specific program to change (programname is a key value and must be unique).</span> <span style="color:blue">Set</span> program = connection.<span style="color:blue">Get</span>(<span style="color:#a31515">&quot;SMS_Program.PackageID='&quot;</span> &amp; existingPackageID &amp; <span style="color:#a31515">&quot;'&quot;</span> &amp; <span style="color:#a31515">&quot;,ProgramName='&quot;</span> &amp; existingProgramNameToModify &amp; <span style="color:#a31515">&quot;'&quot;</span>) program.ProgramFlags = ??????<br/> program.Description = <span style="color:#a31515">&quot;Application Installation&quot;</span> program.Duration = durationtoRun <span style="color:green">' Save the program with the modified properties.</span> program.Put_ <span style="color:green">' Output program name.</span> wscript.echo <span style="color:#a31515">&quot;Modified program: &quot;</span> &amp; program.ProgramName &amp; <span style="color:#a31515">&quot; for package &quot;</span> &amp; existingpackageID <span style="color:blue"><span style="color:#000000"> </span>End</span> <span style="color:blue">Sub</span> </pre> </div> <span class=Apple-style-span style="text-transform:none;text-indent:0px;border-collapse:separate;font:16px 'Times New Roman';white-space:normal;letter-spacing:normal;color:#000000;word-spacing:0px"><span class=Apple-style-span style="font-family:Verdana;font-size:11px"><dt style="font-style:normal;margin:0px"><strong><strong>ProgramFlags</strong></strong></dt><dd>Data type:<span class=Apple-converted-space> </span><strong>UInt32</strong> <p style="padding-bottom:0px;margin:0px 0px 10px;padding-left:0px;padding-right:0px;padding-top:0px"> </p> Access type: Read/Write <p style="padding-bottom:0px;margin:0px 0px 10px;padding-left:0px;padding-right:0px;padding-top:0px"> </p> Qualifiers: [bits, ResID(914), ResDLL(&quot;SMS_RSTT.dll&quot;) ] <p style="padding-bottom:0px;margin:0px 0px 10px;padding-left:0px;padding-right:0px;padding-top:0px"> </p> Flags identifying the installation characteristics of the program. Possible values are listed below. The default values are EVERYUSER, USEUNCPATH, USERCONTEXT, and UNATTENDED <p style="padding-bottom:0px;margin:0px 0px 10px;padding-left:0px;padding-right:0px;padding-top:0px"> </p> <div class=alert style="padding-bottom:0.82em;width:653px"> <table style="margin:5px 10px 5px 5px;width:632px;border-collapse:collapse;font-size:11px;border:#dddddd 1px solid" border=0> <tbody> <tr style="vertical-align:top"> <th style="border-bottom:#c8cdde 1px solid;text-align:left;border-left:#cccccc 0px solid;padding-bottom:5px;background-color:#efeff7;padding-left:5px;padding-right:5px;font-family:Verdana;color:#000066;vertical-align:bottom;border-top:#cccccc 0px solid;border-right:#cccccc 0px solid;padding-top:5px" align=left><img src="http://i.msdn.microsoft.com/cc144361.note(en-us).gif" alt=note>Note</th> </tr> <tr style="vertical-align:top"> <td style="border-bottom:#cccccc 1px solid;text-align:left;border-left:#cccccc 1px solid;padding-bottom:5px;overflow-x:auto;overflow-y:auto;background-color:#f7f7ff;margin:1px;padding-left:5px;padding-right:5px;font-family:Verdana;vertical-align:top;border-top:#cccccc 1px solid;border-right:#d5d5d3 1px solid;padding-top:5px">When using<span class=Apple-converted-space> </span><strong>SMS_Program</strong><span class=Apple-converted-space> </span>programmatically, ensure that no conflicting values are selected. For example, NOUSERLOGGEDIN and USERCONTEXT should not be used together. <p style="padding-bottom:5px;margin:0px;padding-left:5px;padding-right:5px;padding-top:5px"> </p> </td> </tr> </tbody> </table> <p style="padding-bottom:0px;margin:0px 0px 10px;padding-left:0px;padding-right:0px;padding-top:0px"> </p> </div> Possible values are: <p style="padding-bottom:0px;margin:0px 0px 10px;padding-left:0px;padding-right:0px;padding-top:0px"> </p> <h3 class=subHeading style="margin:0px;font-size:11px;font-weight:700"> </h3> <table style="margin:5px 10px 5px 5px;width:640px;border-collapse:collapse;font-size:11px;border:#dddddd 1px solid" border=0> <tbody> <tr style="vertical-align:top"> <th style="border-bottom:#c8cdde 1px solid;text-align:left;border-left:#cccccc 0px solid;padding-bottom:5px;background-color:#cccccc;padding-left:5px;padding-right:5px;font-family:Verdana;color:#000066;vertical-align:bottom;border-top:#cccccc 0px solid;border-right:#cccccc 0px solid;padding-top:5px">Hex (Bit)</th><th style="border-bottom:#c8cdde 1px solid;text-align:left;border-left:#cccccc 0px solid;padding-bottom:5px;background-color:#cccccc;padding-left:5px;padding-right:5px;font-family:Verdana;color:#000066;vertical-align:bottom;border-top:#cccccc 0px solid;border-right:#cccccc 0px solid;padding-top:5px">Description</th> </tr> <tr style="vertical-align:top"> <td style="border-bottom:#cccccc 1px solid;text-align:left;border-left:#cccccc 1px solid;padding-bottom:5px;overflow-x:auto;overflow-y:auto;background-color:#ffffff;margin:1px;padding-left:5px;padding-right:5px;font-family:Verdana;vertical-align:top;border-top:#cccccc 1px solid;border-right:#d5d5d3 1px solid;padding-top:5px"> <p style="padding-bottom:5px;margin:0px;padding-left:5px;padding-right:5px;padding-top:5px">0x00000001 (0)</p> </td> <td style="border-bottom:#cccccc 1px solid;text-align:left;border-left:#cccccc 1px solid;padding-bottom:5px;overflow-x:auto;overflow-y:auto;background-color:#ffffff;margin:1px;padding-left:5px;padding-right:5px;font-family:Verdana;vertical-align:top;border-top:#cccccc 1px solid;border-right:#d5d5d3 1px solid;padding-top:5px"> <p style="padding-bottom:5px;margin:0px;padding-left:5px;padding-right:5px;padding-top:5px">AUTHORIZED_DYNAMIC_INSTALL. The program is authorized for dynamic install.</p> </td> </tr> <tr style="vertical-align:top"> <td style="border-bottom:#cccccc 1px solid;text-align:left;border-left:#cccccc 1px solid;padding-bottom:5px;overflow-x:auto;overflow-y:auto;background-color:#ffffff;margin:1px;padding-left:5px;padding-right:5px;font-family:Verdana;vertical-align:top;border-top:#cccccc 1px solid;border-right:#d5d5d3 1px solid;padding-top:5px"> <p style="padding-bottom:5px;margin:0px;padding-left:5px;padding-right:5px;padding-top:5px">0x00000002 (1)</p> </td> <td style="border-bottom:#cccccc 1px solid;text-align:left;border-left:#cccccc 1px solid;padding-bottom:5px;overflow-x:auto;overflow-y:auto;background-color:#ffffff;margin:1px;padding-left:5px;padding-right:5px;font-family:Verdana;vertical-align:top;border-top:#cccccc 1px solid;border-right:#d5d5d3 1px solid;padding-top:5px"> <p style="padding-bottom:5px;margin:0px;padding-left:5px;padding-right:5px;padding-top:5px">USECUSTOMPROGRESSMSG. The task sequence shows a custom progress user interface message.</p> </td> </tr> <tr style="vertical-align:top"> <td style="border-bottom:#cccccc 1px solid;text-align:left;border-left:#cccccc 1px solid;padding-bottom:5px;overflow-x:auto;overflow-y:auto;background-color:#ffffff;margin:1px;padding-left:5px;padding-right:5px;font-family:Verdana;vertical-align:top;border-top:#cccccc 1px solid;border-right:#d5d5d3 1px solid;padding-top:5px"> <p style="padding-bottom:5px;margin:0px;padding-left:5px;padding-right:5px;padding-top:5px">0x00000010 (4)</p> </td> <td style="border-bottom:#cccccc 1px solid;text-align:left;border-left:#cccccc 1px solid;padding-bottom:5px;overflow-x:auto;overflow-y:auto;background-color:#ffffff;margin:1px;padding-left:5px;padding-right:5px;font-family:Verdana;vertical-align:top;border-top:#cccccc 1px solid;border-right:#d5d5d3 1px solid;padding-top:5px"> <p style="padding-bottom:5px;margin:0px;padding-left:5px;padding-right:5px;padding-top:5px">DEFAULT_PROGRAM. This is a default program</p> </td> </tr> <tr style="vertical-align:top"> <td style="border-bottom:#cccccc 1px solid;text-align:left;border-left:#cccccc 1px solid;padding-bottom:5px;overflow-x:auto;overflow-y:auto;background-color:#ffffff;margin:1px;padding-left:5px;padding-right:5px;font-family:Verdana;vertical-align:top;border-top:#cccccc 1px solid;border-right:#d5d5d3 1px solid;padding-top:5px"> <p style="padding-bottom:5px;margin:0px;padding-left:5px;padding-right:5px;padding-top:5px">0x00000020 (5)</p> </td> <td style="border-bottom:#cccccc 1px solid;text-align:left;border-left:#cccccc 1px solid;padding-bottom:5px;overflow-x:auto;overflow-y:auto;background-color:#ffffff;margin:1px;padding-left:5px;padding-right:5px;font-family:Verdana;vertical-align:top;border-top:#cccccc 1px solid;border-right:#d5d5d3 1px solid;padding-top:5px"> <p style="padding-bottom:5px;margin:0px;padding-left:5px;padding-right:5px;padding-top:5px">DISABLEMOMALERTONRUNNING. Disables MOM alerts while the program runs.</p> </td> </tr> <tr style="vertical-align:top"> <td style="border-bottom:#cccccc 1px solid;text-align:left;border-left:#cccccc 1px solid;padding-bottom:5px;overflow-x:auto;overflow-y:auto;background-color:#ffffff;margin:1px;padding-left:5px;padding-right:5px;font-family:Verdana;vertical-align:top;border-top:#cccccc 1px solid;border-right:#d5d5d3 1px solid;padding-top:5px"> <p style="padding-bottom:5px;margin:0px;padding-left:5px;padding-right:5px;padding-top:5px">0x00000040 (6)</p> </td> <td style="border-bottom:#cccccc 1px solid;text-align:left;border-left:#cccccc 1px solid;padding-bottom:5px;overflow-x:auto;overflow-y:auto;background-color:#ffffff;margin:1px;padding-left:5px;padding-right:5px;font-family:Verdana;vertical-align:top;border-top:#cccccc 1px solid;border-right:#d5d5d3 1px solid;padding-top:5px"> <p style="padding-bottom:5px;margin:0px;padding-left:5px;padding-right:5px;padding-top:5px">MOMALERTONFAIL. Generates MOM alert if the program fails.</p> </td> </tr> <tr style="vertical-align:top"> <td style="border-bottom:#cccccc 1px solid;text-align:left;border-left:#cccccc 1px solid;padding-bottom:5px;overflow-x:auto;overflow-y:auto;background-color:#ffffff;margin:1px;padding-left:5px;padding-right:5px;font-family:Verdana;vertical-align:top;border-top:#cccccc 1px solid;border-right:#d5d5d3 1px solid;padding-top:5px"> <p style="padding-bottom:5px;margin:0px;padding-left:5px;padding-right:5px;padding-top:5px">0x00000080 (7)</p> </td> <td style="border-bottom:#cccccc 1px solid;text-align:left;border-left:#cccccc 1px solid;padding-bottom:5px;overflow-x:auto;overflow-y:auto;background-color:#ffffff;margin:1px;padding-left:5px;padding-right:5px;font-family:Verdana;vertical-align:top;border-top:#cccccc 1px solid;border-right:#d5d5d3 1px solid;padding-top:5px"> <p style="padding-bottom:5px;margin:0px;padding-left:5px;padding-right:5px;padding-top:5px">RUN_DEPENDANT_ALWAYS. If set, this program's immediate dependent should always be run.</p> </td> </tr> <tr style="vertical-align:top"> <td style="border-bottom:#cccccc 1px solid;text-align:left;border-left:#cccccc 1px solid;padding-bottom:5px;overflow-x:auto;overflow-y:auto;background-color:#ffffff;margin:1px;padding-left:5px;padding-right:5px;font-family:Verdana;vertical-align:top;border-top:#cccccc 1px solid;border-right:#d5d5d3 1px solid;padding-top:5px"> <p style="padding-bottom:5px;margin:0px;padding-left:5px;padding-right:5px;padding-top:5px">0x00000100 (8)</p> </td> <td style="border-bottom:#cccccc 1px solid;text-align:left;border-left:#cccccc 1px solid;padding-bottom:5px;overflow-x:auto;overflow-y:auto;background-color:#ffffff;margin:1px;padding-left:5px;padding-right:5px;font-family:Verdana;vertical-align:top;border-top:#cccccc 1px solid;border-right:#d5d5d3 1px solid;padding-top:5px"> <p style="padding-bottom:5px;margin:0px;padding-left:5px;padding-right:5px;padding-top:5px">WINDOWS_CE. Indicates a device program. If set, the program is not offered to desktop clients.</p> </td> </tr> <tr style="vertical-align:top"> <td style="border-bottom:#cccccc 1px solid;text-align:left;border-left:#cccccc 1px solid;padding-bottom:5px;overflow-x:auto;overflow-y:auto;background-color:#ffffff;margin:1px;padding-left:5px;padding-right:5px;font-family:Verdana;vertical-align:top;border-top:#cccccc 1px solid;border-right:#d5d5d3 1px solid;padding-top:5px"> <p style="padding-bottom:5px;margin:0px;padding-left:5px;padding-right:5px;padding-top:5px">0x00000200 (9)</p> </td> <td style="border-bottom:#cccccc 1px solid;text-align:left;border-left:#cccccc 1px solid;padding-bottom:5px;overflow-x:auto;overflow-y:auto;background-color:#ffffff;margin:1px;padding-left:5px;padding-right:5px;font-family:Verdana;vertical-align:top;border-top:#cccccc 1px solid;border-right:#d5d5d3 1px solid;padding-top:5px"> <p style="padding-bottom:5px;margin:0px;padding-left:5px;padding-right:5px;padding-top:5px">This value is not used.</p> </td> </tr> <tr style="vertical-align:top"> <td style="border-bottom:#cccccc 1px solid;text-align:left;border-left:#cccccc 1px solid;padding-bottom:5px;overflow-x:auto;overflow-y:auto;background-color:#ffffff;margin:1px;padding-left:5px;padding-right:5px;font-family:Verdana;vertical-align:top;border-top:#cccccc 1px solid;border-right:#d5d5d3 1px solid;padding-top:5px"> <p style="padding-bottom:5px;margin:0px;padding-left:5px;padding-right:5px;padding-top:5px">0x00000400 (10)</p> </td> <td style="border-bottom:#cccccc 1px solid;text-align:left;border-left:#cccccc 1px solid;padding-bottom:5px;overflow-x:auto;overflow-y:auto;background-color:#ffffff;margin:1px;padding-left:5px;padding-right:5px;font-family:Verdana;vertical-align:top;border-top:#cccccc 1px solid;border-right:#d5d5d3 1px solid;padding-top:5px"> <p style="padding-bottom:5px;margin:0px;padding-left:5px;padding-right:5px;padding-top:5px">COUNTDOWN. The countdown dialog is not displayed.</p> </td> </tr> <tr style="vertical-align:top"> <td style="border-bottom:#cccccc 1px solid;text-align:left;border-left:#cccccc 1px solid;padding-bottom:5px;overflow-x:auto;overflow-y:auto;background-color:#ffffff;margin:1px;padding-left:5px;padding-right:5px;font-family:Verdana;vertical-align:top;border-top:#cccccc 1px solid;border-right:#d5d5d3 1px solid;padding-top:5px"> <p style="padding-bottom:5px;margin:0px;padding-left:5px;padding-right:5px;padding-top:5px">0x00000800 (11)</p> </td> <td style="border-bottom:#cccccc 1px solid;text-align:left;border-left:#cccccc 1px solid;padding-bottom:5px;overflow-x:auto;overflow-y:auto;background-color:#ffffff;margin:1px;padding-left:5px;padding-right:5px;font-family:Verdana;vertical-align:top;border-top:#cccccc 1px solid;border-right:#d5d5d3 1px solid;padding-top:5px"> <p style="padding-bottom:5px;margin:0px;padding-left:5px;padding-right:5px;padding-top:5px">FORCERERUN. This value is not used.</p> </td> </tr> <tr style="vertical-align:top"> <td style="border-bottom:#cccccc 1px solid;text-align:left;border-left:#cccccc 1px solid;padding-bottom:5px;overflow-x:auto;overflow-y:auto;background-color:#ffffff;margin:1px;padding-left:5px;padding-right:5px;font-family:Verdana;vertical-align:top;border-top:#cccccc 1px solid;border-right:#d5d5d3 1px solid;padding-top:5px"> <p style="padding-bottom:5px;margin:0px;padding-left:5px;padding-right:5px;padding-top:5px">0x00001000 (12)</p> </td> <td style="border-bottom:#cccccc 1px solid;text-align:left;border-left:#cccccc 1px solid;padding-bottom:5px;overflow-x:auto;overflow-y:auto;background-color:#ffffff;margin:1px;padding-left:5px;padding-right:5px;font-family:Verdana;vertical-align:top;border-top:#cccccc 1px solid;border-right:#d5d5d3 1px solid;padding-top:5px"> <p style="padding-bottom:5px;margin:0px;padding-left:5px;padding-right:5px;padding-top:5px">DISABLED. The program is disabled.</p> </td> </tr> <tr style="vertical-align:top"> <td style="border-bottom:#cccccc 1px solid;text-align:left;border-left:#cccccc 1px solid;padding-bottom:5px;overflow-x:auto;overflow-y:auto;background-color:#ffffff;margin:1px;padding-left:5px;padding-right:5px;font-family:Verdana;vertical-align:top;border-top:#cccccc 1px solid;border-right:#d5d5d3 1px solid;padding-top:5px"> <p style="padding-bottom:5px;margin:0px;padding-left:5px;padding-right:5px;padding-top:5px">0x00002000 (13)</p> </td> <td style="border-bottom:#cccccc 1px solid;text-align:left;border-left:#cccccc 1px solid;padding-bottom:5px;overflow-x:auto;overflow-y:auto;background-color:#ffffff;margin:1px;padding-left:5px;padding-right:5px;font-family:Verdana;vertical-align:top;border-top:#cccccc 1px solid;border-right:#d5d5d3 1px solid;padding-top:5px"> <p style="padding-bottom:5px;margin:0px;padding-left:5px;padding-right:5px;padding-top:5px">UNATTENDED. The program requires no user interaction.</p> </td> </tr> <tr style="vertical-align:top"> <td style="border-bottom:#cccccc 1px solid;text-align:left;border-left:#cccccc 1px solid;padding-bottom:5px;overflow-x:auto;overflow-y:auto;background-color:#ffffff;margin:1px;padding-left:5px;padding-right:5px;font-family:Verdana;vertical-align:top;border-top:#cccccc 1px solid;border-right:#d5d5d3 1px solid;padding-top:5px"> <p style="padding-bottom:5px;margin:0px;padding-left:5px;padding-right:5px;padding-top:5px">0x00004000 (14)</p> </td> <td style="border-bottom:#cccccc 1px solid;text-align:left;border-left:#cccccc 1px solid;padding-bottom:5px;overflow-x:auto;overflow-y:auto;background-color:#ffffff;margin:1px;padding-left:5px;padding-right:5px;font-family:Verdana;vertical-align:top;border-top:#cccccc 1px solid;border-right:#d5d5d3 1px solid;padding-top:5px"> <p style="padding-bottom:5px;margin:0px;padding-left:5px;padding-right:5px;padding-top:5px">USERCONTEXT. The program can run only when a user is logged on.</p> </td> </tr> <tr style="vertical-align:top"> <td style="border-bottom:#cccccc 1px solid;text-align:left;border-left:#cccccc 1px solid;padding-bottom:5px;overflow-x:auto;overflow-y:auto;background-color:#ffffff;margin:1px;padding-left:5px;padding-right:5px;font-family:Verdana;vertical-align:top;border-top:#cccccc 1px solid;border-right:#d5d5d3 1px solid;padding-top:5px"> <p style="padding-bottom:5px;margin:0px;padding-left:5px;padding-right:5px;padding-top:5px">0x00008000 (15)</p> </td> <td style="border-bottom:#cccccc 1px solid;text-align:left;border-left:#cccccc 1px solid;padding-bottom:5px;overflow-x:auto;overflow-y:auto;background-color:#ffffff;margin:1px;padding-left:5px;padding-right:5px;font-family:Verdana;vertical-align:top;border-top:#cccccc 1px solid;border-right:#d5d5d3 1px solid;padding-top:5px"> <p style="padding-bottom:5px;margin:0px;padding-left:5px;padding-right:5px;padding-top:5px">ADMINRIGHTS. The program must be run as the local Administrator account.</p> </td> </tr> <tr style="vertical-align:top"> <td style="border-bottom:#cccccc 1px solid;text-align:left;border-left:#cccccc 1px solid;padding-bottom:5px;overflow-x:auto;overflow-y:auto;background-color:#ffffff;margin:1px;padding-left:5px;padding-right:5px;font-family:Verdana;vertical-align:top;border-top:#cccccc 1px solid;border-right:#d5d5d3 1px solid;padding-top:5px"> <p style="padding-bottom:5px;margin:0px;padding-left:5px;padding-right:5px;padding-top:5px">0x00010000 (16)</p> </td> <td style="border-bottom:#cccccc 1px solid;text-align:left;border-left:#cccccc 1px solid;padding-bottom:5px;overflow-x:auto;overflow-y:auto;background-color:#ffffff;margin:1px;padding-left:5px;padding-right:5px;font-family:Verdana;vertical-align:top;border-top:#cccccc 1px solid;border-right:#d5d5d3 1px solid;padding-top:5px"> <p style="padding-bottom:5px;margin:0px;padding-left:5px;padding-right:5px;padding-top:5px">EVERYUSER. The program must be run by every user for whom it is valid. Valid only for mandatory jobs.</p> </td> </tr> <tr style="vertical-align:top"> <td style="border-bottom:#cccccc 1px solid;text-align:left;border-left:#cccccc 1px solid;padding-bottom:5px;overflow-x:auto;overflow-y:auto;background-color:#ffffff;margin:1px;padding-left:5px;padding-right:5px;font-family:Verdana;vertical-align:top;border-top:#cccccc 1px solid;border-right:#d5d5d3 1px solid;padding-top:5px"> <p style="padding-bottom:5px;margin:0px;padding-left:5px;padding-right:5px;padding-top:5px">0x00020000 (17)</p> </td> <td style="border-bottom:#cccccc 1px solid;text-align:left;border-left:#cccccc 1px solid;padding-bottom:5px;overflow-x:auto;overflow-y:auto;background-color:#ffffff;margin:1px;padding-left:5px;padding-right:5px;font-family:Verdana;vertical-align:top;border-top:#cccccc 1px solid;border-right:#d5d5d3 1px solid;padding-top:5px"> <p style="padding-bottom:5px;margin:0px;padding-left:5px;padding-right:5px;padding-top:5px">NOUSERLOGGEDIN. The program is run only when no user is logged on.</p> </td> </tr> <tr style="vertical-align:top"> <td style="border-bottom:#cccccc 1px solid;text-align:left;border-left:#cccccc 1px solid;padding-bottom:5px;overflow-x:auto;overflow-y:auto;background-color:#ffffff;margin:1px;padding-left:5px;padding-right:5px;font-family:Verdana;vertical-align:top;border-top:#cccccc 1px solid;border-right:#d5d5d3 1px solid;padding-top:5px"> <p style="padding-bottom:5px;margin:0px;padding-left:5px;padding-right:5px;padding-top:5px">0x00040000 (18)</p> </td> <td style="border-bottom:#cccccc 1px solid;text-align:left;border-left:#cccccc 1px solid;padding-bottom:5px;overflow-x:auto;overflow-y:auto;background-color:#ffffff;margin:1px;padding-left:5px;padding-right:5px;font-family:Verdana;vertical-align:top;border-top:#cccccc 1px solid;border-right:#d5d5d3 1px solid;padding-top:5px"> <p style="padding-bottom:5px;margin:0px;padding-left:5px;padding-right:5px;padding-top:5px">OKTOQUIT. The program will restart the computer.</p> </td> </tr> <tr style="vertical-align:top"> <td style="border-bottom:#cccccc 1px solid;text-align:left;border-left:#cccccc 1px solid;padding-bottom:5px;overflow-x:auto;overflow-y:auto;background-color:#ffffff;margin:1px;padding-left:5px;padding-right:5px;font-family:Verdana;vertical-align:top;border-top:#cccccc 1px solid;border-right:#d5d5d3 1px solid;padding-top:5px"> <p style="padding-bottom:5px;margin:0px;padding-left:5px;padding-right:5px;padding-top:5px">0x00080000 (19)</p> </td> <td style="border-bottom:#cccccc 1px solid;text-align:left;border-left:#cccccc 1px solid;padding-bottom:5px;overflow-x:auto;overflow-y:auto;background-color:#ffffff;margin:1px;padding-left:5px;padding-right:5px;font-family:Verdana;vertical-align:top;border-top:#cccccc 1px solid;border-right:#d5d5d3 1px solid;padding-top:5px"> <p style="padding-bottom:5px;margin:0px;padding-left:5px;padding-right:5px;padding-top:5px">OKTOREBOOT. Configuration Manager restarts the computer when the program has finished running successfully.</p> </td> </tr> <tr style="vertical-align:top"> <td style="border-bottom:#cccccc 1px solid;text-align:left;border-left:#cccccc 1px solid;padding-bottom:5px;overflow-x:auto;overflow-y:auto;background-color:#ffffff;margin:1px;padding-left:5px;padding-right:5px;font-family:Verdana;vertical-align:top;border-top:#cccccc 1px solid;border-right:#d5d5d3 1px solid;padding-top:5px"> <p style="padding-bottom:5px;margin:0px;padding-left:5px;padding-right:5px;padding-top:5px">0x00100000 (20)</p> </td> <td style="border-bottom:#cccccc 1px solid;text-align:left;border-left:#cccccc 1px solid;padding-bottom:5px;overflow-x:auto;overflow-y:auto;background-color:#ffffff;margin:1px;padding-left:5px;padding-right:5px;font-family:Verdana;vertical-align:top;border-top:#cccccc 1px solid;border-right:#d5d5d3 1px solid;padding-top:5px"> <p style="padding-bottom:5px;margin:0px;padding-left:5px;padding-right:5px;padding-top:5px">USEUNCPATH. Use a UNC path (no drive letter) to access the distribution point.</p> </td> </tr> <tr style="vertical-align:top"> <td style="border-bottom:#cccccc 1px solid;text-align:left;border-left:#cccccc 1px solid;padding-bottom:5px;overflow-x:auto;overflow-y:auto;background-color:#ffffff;margin:1px;padding-left:5px;padding-right:5px;font-family:Verdana;vertical-align:top;border-top:#cccccc 1px solid;border-right:#d5d5d3 1px solid;padding-top:5px"> <p style="padding-bottom:5px;margin:0px;padding-left:5px;padding-right:5px;padding-top:5px">0x00200000 (21)</p> </td> <td style="border-bottom:#cccccc 1px solid;text-align:left;border-left:#cccccc 1px solid;padding-bottom:5px;overflow-x:auto;overflow-y:auto;background-color:#ffffff;margin:1px;padding-left:5px;padding-right:5px;font-family:Verdana;vertical-align:top;border-top:#cccccc 1px solid;border-right:#d5d5d3 1px solid;padding-top:5px"> <p style="padding-bottom:5px;margin:0px;padding-left:5px;padding-right:5px;padding-top:5px">PERSISTCONNECTION. Persists the connection to the drive specified in the DriveLetter property. The USEUNCPATH bit flag must not be set.</p> </td> </tr> <tr style="vertical-align:top"> <td style="border-bottom:#cccccc 1px solid;text-align:left;border-left:#cccccc 1px solid;padding-bottom:5px;overflow-x:auto;overflow-y:auto;background-color:#ffffff;margin:1px;padding-left:5px;padding-right:5px;font-family:Verdana;vertical-align:top;border-top:#cccccc 1px solid;border-right:#d5d5d3 1px solid;padding-top:5px"> <p style="padding-bottom:5px;margin:0px;padding-left:5px;padding-right:5px;padding-top:5px">0x00400000 (22)</p> </td> <td style="border-bottom:#cccccc 1px solid;text-align:left;border-left:#cccccc 1px solid;padding-bottom:5px;overflow-x:auto;overflow-y:auto;background-color:#ffffff;margin:1px;padding-left:5px;padding-right:5px;font-family:Verdana;vertical-align:top;border-top:#cccccc 1px solid;border-right:#d5d5d3 1px solid;padding-top:5px"> <p style="padding-bottom:5px;margin:0px;padding-left:5px;padding-right:5px;padding-top:5px">RUNMINIMIZED. Run the program as a minimized window.</p> </td> </tr> <tr style="vertical-align:top"> <td style="border-bottom:#cccccc 1px solid;text-align:left;border-left:#cccccc 1px solid;padding-bottom:5px;overflow-x:auto;overflow-y:auto;background-color:#ffffff;margin:1px;padding-left:5px;padding-right:5px;font-family:Verdana;vertical-align:top;border-top:#cccccc 1px solid;border-right:#d5d5d3 1px solid;padding-top:5px"> <p style="padding-bottom:5px;margin:0px;padding-left:5px;padding-right:5px;padding-top:5px">0x00800000 (23)</p> </td> <td style="border-bottom:#cccccc 1px solid;text-align:left;border-left:#cccccc 1px solid;padding-bottom:5px;overflow-x:auto;overflow-y:auto;background-color:#ffffff;margin:1px;padding-left:5px;padding-right:5px;font-family:Verdana;vertical-align:top;border-top:#cccccc 1px solid;border-right:#d5d5d3 1px solid;padding-top:5px"> <p style="padding-bottom:5px;margin:0px;padding-left:5px;padding-right:5px;padding-top:5px">RUNMAXIMIZED. Run the program as a maximized window.</p> </td> </tr> <tr style="vertical-align:top"> <td style="border-bottom:#cccccc 1px solid;text-align:left;border-left:#cccccc 1px solid;padding-bottom:5px;overflow-x:auto;overflow-y:auto;background-color:#ffffff;margin:1px;padding-left:5px;padding-right:5px;font-family:Verdana;vertical-align:top;border-top:#cccccc 1px solid;border-right:#d5d5d3 1px solid;padding-top:5px"> <p style="padding-bottom:5px;margin:0px;padding-left:5px;padding-right:5px;padding-top:5px">0x01000000 (24)</p> </td> <td style="border-bottom:#cccccc 1px solid;text-align:left;border-left:#cccccc 1px solid;padding-bottom:5px;overflow-x:auto;overflow-y:auto;background-color:#ffffff;margin:1px;padding-left:5px;padding-right:5px;font-family:Verdana;vertical-align:top;border-top:#cccccc 1px solid;border-right:#d5d5d3 1px solid;padding-top:5px"> <p style="padding-bottom:5px;margin:0px;padding-left:5px;padding-right:5px;padding-top:5px">HIDEWINDOW. Hide the program window.</p> </td> </tr> <tr style="vertical-align:top"> <td style="border-bottom:#cccccc 1px solid;text-align:left;border-left:#cccccc 1px solid;padding-bottom:5px;overflow-x:auto;overflow-y:auto;background-color:#ffffff;margin:1px;padding-left:5px;padding-right:5px;font-family:Verdana;vertical-align:top;border-top:#cccccc 1px solid;border-right:#d5d5d3 1px solid;padding-top:5px"> <p style="padding-bottom:5px;margin:0px;padding-left:5px;padding-right:5px;padding-top:5px">0x02000000 (25)</p> </td> <td style="border-bottom:#cccccc 1px solid;text-align:left;border-left:#cccccc 1px solid;padding-bottom:5px;overflow-x:auto;overflow-y:auto;background-color:#ffffff;margin:1px;padding-left:5px;padding-right:5px;font-family:Verdana;vertical-align:top;border-top:#cccccc 1px solid;border-right:#d5d5d3 1px solid;padding-top:5px"> <p style="padding-bottom:5px;margin:0px;padding-left:5px;padding-right:5px;padding-top:5px">OKTOLOGOFF. Logoff user when program completes successfully.</p> </td> </tr> <tr style="vertical-align:top"> <td style="border-bottom:#cccccc 1px solid;text-align:left;border-left:#cccccc 1px solid;padding-bottom:5px;overflow-x:auto;overflow-y:auto;background-color:#ffffff;margin:1px;padding-left:5px;padding-right:5px;font-family:Verdana;vertical-align:top;border-top:#cccccc 1px solid;border-right:#d5d5d3 1px solid;padding-top:5px"> <p style="padding-bottom:5px;margin:0px;padding-left:5px;padding-right:5px;padding-top:5px">0x04000000 (26)</p> </td> <td style="border-bottom:#cccccc 1px solid;text-align:left;border-left:#cccccc 1px solid;padding-bottom:5px;overflow-x:auto;overflow-y:auto;background-color:#ffffff;margin:1px;padding-left:5px;padding-right:5px;font-family:Verdana;vertical-align:top;border-top:#cccccc 1px solid;border-right:#d5d5d3 1px solid;padding-top:5px"> <p style="padding-bottom:5px;margin:0px;padding-left:5px;padding-right:5px;padding-top:5px">RUNACCOUNT. This value is not used.</p> </td> </tr> <tr style="vertical-align:top"> <td style="border-bottom:#cccccc 1px solid;text-align:left;border-left:#cccccc 1px solid;padding-bottom:5px;overflow-x:auto;overflow-y:auto;background-color:#ffffff;margin:1px;padding-left:5px;padding-right:5px;font-family:Verdana;vertical-align:top;border-top:#cccccc 1px solid;border-right:#d5d5d3 1px solid;padding-top:5px"> <p style="padding-bottom:5px;margin:0px;padding-left:5px;padding-right:5px;padding-top:5px">0x08000000 (27)</p> </td> <td style="border-bottom:#cccccc 1px solid;text-align:left;border-left:#cccccc 1px solid;padding-bottom:5px;overflow-x:auto;overflow-y:auto;background-color:#ffffff;margin:1px;padding-left:5px;padding-right:5px;font-family:Verdana;vertical-align:top;border-top:#cccccc 1px solid;border-right:#d5d5d3 1px solid;padding-top:5px"> <p style="padding-bottom:5px;margin:0px;padding-left:5px;padding-right:5px;padding-top:5px">ANY_PLATFORM. Override check for platform support.</p> </td> </tr> <tr style="vertical-align:top"> <td style="border-bottom:#cccccc 1px solid;text-align:left;border-left:#cccccc 1px solid;padding-bottom:5px;overflow-x:auto;overflow-y:auto;background-color:#ffffff;margin:1px;padding-left:5px;padding-right:5px;font-family:Verdana;vertical-align:top;border-top:#cccccc 1px solid;border-right:#d5d5d3 1px solid;padding-top:5px"> <p style="padding-bottom:5px;margin:0px;padding-left:5px;padding-right:5px;padding-top:5px">0x10000000 (28)</p> </td> <td style="border-bottom:#cccccc 1px solid;text-align:left;border-left:#cccccc 1px solid;padding-bottom:5px;overflow-x:auto;overflow-y:auto;background-color:#ffffff;margin:1px;padding-left:5px;padding-right:5px;font-family:Verdana;vertical-align:top;border-top:#cccccc 1px solid;border-right:#d5d5d3 1px solid;padding-top:5px"> <p style="padding-bottom:5px;margin:0px;padding-left:5px;padding-right:5px;padding-top:5px">STILL_RUNNING. This value is not used.</p> </td> </tr> <tr style="vertical-align:top"> <td style="border-bottom:#cccccc 1px solid;text-align:left;border-left:#cccccc 1px solid;padding-bottom:5px;overflow-x:auto;overflow-y:auto;background-color:#ffffff;margin:1px;padding-left:5px;padding-right:5px;font-family:Verdana;vertical-align:top;border-top:#cccccc 1px solid;border-right:#d5d5d3 1px solid;padding-top:5px"> <p style="padding-bottom:5px;margin:0px;padding-left:5px;padding-right:5px;padding-top:5px">0x20000000 (29)</p> </td> <td style="border-bottom:#cccccc 1px solid;text-align:left;border-left:#cccccc 1px solid;padding-bottom:5px;overflow-x:auto;overflow-y:auto;background-color:#ffffff;margin:1px;padding-left:5px;padding-right:5px;font-family:Verdana;vertical-align:top;border-top:#cccccc 1px solid;border-right:#d5d5d3 1px solid;padding-top:5px"> <p style="padding-bottom:5px;margin:0px;padding-left:5px;padding-right:5px;padding-top:5px">SUPPORT_UNINSTALL. Run uninstall from the registry key when the advertisement expires.</p> </td> </tr> <tr style="vertical-align:top"> <td style="border-bottom:#cccccc 1px solid;text-align:left;border-left:#cccccc 1px solid;padding-bottom:5px;overflow-x:auto;overflow-y:auto;background-color:#ffffff;margin:1px;padding-left:5px;padding-right:5px;font-family:Verdana;vertical-align:top;border-top:#cccccc 1px solid;border-right:#d5d5d3 1px solid;padding-top:5px"> <p style="padding-bottom:5px;margin:0px;padding-left:5px;padding-right:5px;padding-top:5px">0x40000000 (30)</p> </td> <td style="border-bottom:#cccccc 1px solid;text-align:left;border-left:#cccccc 1px solid;padding-bottom:5px;overflow-x:auto;overflow-y:auto;background-color:#ffffff;margin:1px;padding-left:5px;padding-right:5px;font-family:Verdana;vertical-align:top;border-top:#cccccc 1px solid;border-right:#d5d5d3 1px solid;padding-top:5px"> <p style="padding-bottom:5px;margin:0px;padding-left:5px;padding-right:5px;padding-top:5px">The platform is not supported.</p> </td> </tr> <tr style="vertical-align:top"> <td style="border-bottom:#cccccc 1px solid;text-align:left;border-left:#cccccc 1px solid;padding-bottom:5px;overflow-x:auto;overflow-y:auto;background-color:#ffffff;margin:1px;padding-left:5px;padding-right:5px;font-family:Verdana;vertical-align:top;border-top:#cccccc 1px solid;border-right:#d5d5d3 1px solid;padding-top:5px"> <p style="padding-bottom:5px;margin:0px;padding-left:5px;padding-right:5px;padding-top:5px">0x80000000 (31)</p> </td> <td style="border-bottom:#cccccc 1px solid;text-align:left;border-left:#cccccc 1px solid;padding-bottom:5px;overflow-x:auto;overflow-y:auto;background-color:#ffffff;margin:1px;padding-left:5px;padding-right:5px;font-family:Verdana;vertical-align:top;border-top:#cccccc 1px solid;border-right:#d5d5d3 1px solid;padding-top:5px"> <p style="padding-bottom:5px;margin:0px;padding-left:5px;padding-right:5px;padding-top:5px">SHOW_IN_ARP. This value is not used.</p> </td> </tr> </tbody> </table> </dd></span></span></span></span>Wed, 28 Oct 2009 04:47:09 Z2009-11-03T22:43:44Zhttp://social.technet.microsoft.com/Forums/en-US/configmgrsdk/thread/b12cd9e8-fcdd-48a5-a655-db473990ff7bhttp://social.technet.microsoft.com/Forums/en-US/configmgrsdk/thread/b12cd9e8-fcdd-48a5-a655-db473990ff7bTfeller9http://social.technet.microsoft.com/Profile/en-US/?user=Tfeller9Calling AddMembershipRule method of sms_collection using iresultObject and vb.net<p>Is it possible there is a bug in the executemethod function of iresultobject when used under vb.net?<br/></p> <pre> '============================== 'add the rule to the collection '============================== Dim oNewRule As IResultObject = oWMI.CreateEmbeddedObjectInstance(&quot;SMS_CollectionRuleDirect&quot;) oNewRule(&quot;ResourceClassName&quot;).StringValue = &quot;SMS_R_UserGroup&quot; oNewRule(&quot;ResourceID&quot;).StringValue = &lt;resourceID&gt;<br/> oNewRule(&quot;RuleName&quot;).StringValue = &lt;groupname&gt; ' Add the direct rule to the collection. Dim oDictParameters As New Dictionary(Of String, Object) oDictParameters.Add(&quot;SMS_CollectionRule&quot;, oNewRule) oCollection = oWMI.GetInstance(&quot;SMS_Collection.CollectionID='&quot; &amp; strCollectionID &amp; &quot;'&quot;) oCollection.ExecuteMethod(&quot;AddMembershipRule&quot;, oDictParameters)</pre> I get the error:<br/><br/>10/29/2009 1:18:32 PM Error: Microsoft.ConfigurationManagement.ManagementProvider.WqlQueryEngine.WqlQueryException: Not found , Method = AddMembershipRule ---&gt; System.Management.ManagementException: Not found <br/><br/>I know from the c# examples that this shoudl work, but it doesn't.<br/><br/>Thu, 29 Oct 2009 18:01:44 Z2009-10-30T13:59:20Zhttp://social.technet.microsoft.com/Forums/en-US/configmgrsdk/thread/c97f0747-3b2f-4ef6-a7cd-7378350a30bdhttp://social.technet.microsoft.com/Forums/en-US/configmgrsdk/thread/c97f0747-3b2f-4ef6-a7cd-7378350a30bdKaido1000http://social.technet.microsoft.com/Profile/en-US/?user=Kaido1000SCCM client side messageHi,<br/><br/>I want to change client Software Update Management message to our local language. I found in SCCM SDK: <a href="http://msdn.microsoft.com/en-us/library/cc143473.aspx">http://msdn.microsoft.com/en-us/library/cc143473.aspx</a> but its too difficult. Can someone help me?<br/><br/>Thanks,<br/><br/>Kaido Mon, 26 Oct 2009 08:54:05 Z2009-10-27T07:38:33Zhttp://social.technet.microsoft.com/Forums/en-US/configmgrsdk/thread/a7fbc8bb-658d-4d4e-97e8-523b69315e71http://social.technet.microsoft.com/Forums/en-US/configmgrsdk/thread/a7fbc8bb-658d-4d4e-97e8-523b69315e71Alvedonhttp://social.technet.microsoft.com/Profile/en-US/?user=AlvedonRUN_DEPENDANT_ALWAYS when creating a program does not work?Hi,<br/><br/>I'm trying to create a program with a dependent program and that dependent program should always run. I have no issues to set the dependent program but I can not manage to set the &quot;Always run the dependent program&quot; checkbox. <br/><br/>I've tried using the RUN_DEPENDANT_ALWAYS as according to the SDK but the checkbox was never marked. <br/><br/>I ended up extracting the program option value from another program that I've created and that worked, at least in the GUI the dependent program was correct and the checboxk was checked. The problem is that when I run the program, its dependent program does not run unless I go into the program properties and redo the dependent program in the GUI and save the changes.<br/><br/>This leads me to believe that there is something that my code does not set right which makes it appear ok in the GUI but not when executed.<br/><br/>I'm running this piece of code against ConfigMgr 2007 SP1 and I utilize the newest version of the SDK and the code is written in C#.<br/><br/>Code that does not set the checkbox:<br/> <pre lang="x-c#">newProgram[&quot;ProgramFlags&quot;].IntegerValue =(int)ProgramFlags.AdminRights + (int)ProgramFlags.UserContext + (int)ProgramFlags.UseUncPath + (int)ProgramFlags.RunDependantAlways;</pre> Code that does set the checkbox but does not work when executing the program (integer value is extracted with WQL from a program that is configured excatly as I want it and that works):<br/><br/> <pre>newProgram[&quot;ProgramFlags&quot;].IntegerValue = 1097856;</pre> Anyone experience any issues with the RUN_DEPENDANT_ALWAYS? Anyone that could provide me with an example of the correct and working way to code this?Sat, 24 Oct 2009 19:18:35 Z2009-10-25T16:23:51Zhttp://social.technet.microsoft.com/Forums/en-US/configmgrsdk/thread/4f14a3b5-ffe4-40fd-8686-6fe215bce99bhttp://social.technet.microsoft.com/Forums/en-US/configmgrsdk/thread/4f14a3b5-ffe4-40fd-8686-6fe215bce99bGarth Joneshttp://social.technet.microsoft.com/Profile/en-US/?user=Garth%20JonesHow to obtain PackageIDs?<p align=left><font face=Arial size=2></font> </p> <p class=MsoNormal style="margin:0cm 0cm 0pt"><font size=3><font face=Calibri>While trying to follow the “How to Create a Package” example, I notice that it does not provide you with the PackageID. You need the PackageID to add programs to a package and the example within the SDK does not show you how to do this in VB.NET (VS 2008). After I digging deeper, I found the example for creating a package with a PDF, “How to Create a Package by Using a Package Definition File Template“ </font></font></p> <p class=MsoNormal style="margin:0cm 0cm 0pt"><font face=Calibri size=3> </font></p> <p class=MsoNormal style="margin:0cm 0cm 0pt"><font size=3><font face=Calibri>Following this example with the SDK, I modified the original example code to the following, however this does not give me the PackageID <span style=""> </span>(tmp,tmp2,tmp3,tmp4) So how can I get the package ID, so that a program can be created?</font></font></p> <p class=MsoNormal style="margin:0cm 0cm 0pt"><font face=Calibri size=3> </font></p> <p class=MsoNormal style="margin:0cm 0cm 0pt"><span style="font-size:10pt;font-family:'Courier New'"><span style="">    </span><span style="color:blue">Function</span> CreatePackage(<span style="color:blue">ByVal</span> connection, <span style="color:blue">ByVal</span> newPackageName, <span style="color:blue">ByVal</span> newPackageDescription, <span style="color:blue">ByVal</span> newPackageSourceFlag, <span style="color:blue">ByVal</span> newPackageSourcePath)</span></p> <p class=MsoNormal style="margin:0cm 0cm 0pt"><span style="font-size:10pt;font-family:'Courier New'"><span style="">        </span><span style="color:blue">Dim</span> newpackage</span></p> <p class=MsoNormal style="margin:0cm 0cm 0pt"><span style="font-size:10pt;font-family:'Courier New'"><span style="">        </span><span style="color:blue">Dim</span> tmp</span></p> <p class=MsoNormal style="margin:0cm 0cm 0pt"><span style="font-size:10pt;font-family:'Courier New'"><span style="">        </span><span style="color:blue">Dim</span> tmp2</span></p> <p class=MsoNormal style="margin:0cm 0cm 0pt"><span style="font-size:10pt;font-family:'Courier New'"><span style="">        </span><span style="color:blue">Dim</span> tmp3</span></p> <p class=MsoNormal style="margin:0cm 0cm 0pt"><span style="font-size:10pt;font-family:'Courier New'"><span style="">        </span><span style="color:blue">Dim</span> tmp4</span></p> <p class=MsoNormal style="margin:0cm 0cm 0pt"><span style="font-size:10pt;font-family:'Courier New'"> </span></p> <p class=MsoNormal style="margin:0cm 0cm 0pt"><span style="font-size:10pt;font-family:'Courier New'"><span style="">        </span><span style="color:green">' Create the new package object. </span></span></p> <p class=MsoNormal style="margin:0cm 0cm 0pt"><span style="font-size:10pt;font-family:'Courier New'"><span style="">        </span>newPackage = connection.Get(<span style="color:#a31515">&quot;SMS_Package&quot;</span>).SpawnInstance_</span></p> <p class=MsoNormal style="margin:0cm 0cm 0pt"><span style="font-size:10pt;font-family:'Courier New'"> </span></p> <p class=MsoNormal style="margin:0cm 0cm 0pt"><span style="font-size:10pt;font-family:'Courier New'"><span style="">        </span><span style="color:green">' Populate the new package properties.</span></span></p> <p class=MsoNormal style="margin:0cm 0cm 0pt"><span style="font-size:10pt;font-family:'Courier New'"><span style="">        </span>newPackage.Name = newPackageName</span></p> <p class=MsoNormal style="margin:0cm 0cm 0pt"><span style="font-size:10pt;font-family:'Courier New'"><span style="">        </span>newPackage.Description = newPackageDescription</span></p> <p class=MsoNormal style="margin:0cm 0cm 0pt"><span style="font-size:10pt;font-family:'Courier New'"><span style="">        </span>newpackage.PkgSourceFlag = newPackageSourceFlag</span></p> <p class=MsoNormal style="margin:0cm 0cm 0pt"><span style="font-size:10pt;font-family:'Courier New'"><span style="">        </span>newpackage.PkgSourcePath = newPackageSourcePath</span></p> <p class=MsoNormal style="margin:0cm 0cm 0pt"><span style="font-size:10pt;font-family:'Courier New'"><span style=""> </span><span style="">       </span>newpackage.ForcedDisconnectDelay = 5 <span style="color:green">'5 minutes</span></span></p> <p class=MsoNormal style="margin:0cm 0cm 0pt"><span style="font-size:10pt;font-family:'Courier New'"><span style="">        </span>newpackage.ForcedDisconnectEnabled = <span style="color:blue">True</span> <span style="color:green">'disconnect clients</span></span></p> <p class=MsoNormal style="margin:0cm 0cm 0pt"><span style="font-size:10pt;font-family:'Courier New'"><span style="">        </span>newpackage.ForcedDisconnectNumRetries = 7 <span style="color:green">' 7 retries</span></span></p> <p class=MsoNormal style="margin:0cm 0cm 0pt"><span style="font-size:10pt;font-family:'Courier New'"><span style="">        </span>newpackage.manufacturer = <span style="color:#a31515">&quot;SMSUG.ca&quot;</span></span></p> <p class=MsoNormal style="margin:0cm 0cm 0pt"><span style="font-size:10pt;font-family:'Courier New'"><span style="">        </span>newpackage.Packagetype = PT_R</span></p> <p class=MsoNormal style="margin:0cm 0cm 0pt"><span style="font-size:10pt;font-family:'Courier New'"><span style="">        </span><span style="color:green">'newpackage.PreferredAddressType = ADR_LAN(MS_LAN) **** Dig deeper into the SDK for this.</span></span></p> <p class=MsoNormal style="margin:0cm 0cm 0pt"><span style="font-size:10pt;font-family:'Courier New'"><span style="">        </span>newpackage.priority = 2 <span style="color:green">'Normal</span></span></p> <p class=MsoNormal style="margin:0cm 0cm 0pt"><span style="font-size:10pt;font-family:'Courier New'"><span style="">        </span>newpackage.Sharetype = 1 <span style="color:green">'Common</span></span></p> <p class=MsoNormal style="margin:0cm 0cm 0pt"><span style="font-size:10pt;font-family:'Courier New'"><span style="">        </span>tmp4 = newpackage.packageid</span></p> <p class=MsoNormal style="margin:0cm 0cm 0pt"><span style="font-size:10pt;font-family:'Courier New'"> </span></p> <p class=MsoNormal style="margin:0cm 0cm 0pt"><span style="font-size:10pt;font-family:'Courier New'"><span style="">        </span><span style="color:green">' Save the package.</span></span></p> <p class=MsoNormal style="margin:0cm 0cm 0pt"><span style="font-size:10pt;font-family:'Courier New'"><span style="">        </span>tmp = newpackage.Put_()</span></p> <p class=MsoNormal style="margin:0cm 0cm 0pt"><span style="font-size:10pt;font-family:'Courier New'"><span style="">        </span>tmp3 = newpackage.packageid</span></p> <p class=MsoNormal style="margin:0cm 0cm 0pt"><span style="font-size:10pt;font-family:'Courier New'"><span style="">        </span>tmp2 = tmp.Keys(<span style="color:#a31515">&quot;PackageID&quot;</span>)</span></p> <p class=MsoNormal style="margin:0cm 0cm 0pt"><span style="font-size:10pt;font-family:'Courier New'"> </span></p> <p class=MsoNormal style="margin:0cm 0cm 0pt"><span style="font-size:10pt;font-family:'Courier New'"><span style="">        </span><span style="color:green">' Output the new package name.</span></span></p> <p class=MsoNormal style="margin:0cm 0cm 0pt"><span style="font-size:10pt;font-family:'Courier New'"><span style="">        </span>MsgBox(<span style="color:#a31515">&quot;Created package: &quot;</span> &amp; tmp2)</span></p> <p class=MsoNormal style="margin:0cm 0cm 0pt"><span style="font-size:10pt;font-family:'Courier New'"><span style="">        </span>CreatePackage = tmp2</span></p> <p class=MsoNormal style="margin:0cm 0cm 0pt"><span style="font-size:10pt;font-family:'Courier New'"> </span></p> <p class=MsoNormal style="margin:0cm 0cm 0pt"><span style="font-size:10pt;font-family:'Courier New'"><span style="">    </span><span style="color:blue">End</span> <span style="color:blue">Function</span></span></p> <p class=MsoNormal style="margin:0cm 0cm 0pt"><font face=Calibri size=3> </font></p>Fri, 13 Jun 2008 16:51:14 Z2009-10-25T14:02:12Zhttp://social.technet.microsoft.com/Forums/en-US/configmgrsdk/thread/27150bbd-2bd1-4ad4-a84e-e8521853cf05http://social.technet.microsoft.com/Forums/en-US/configmgrsdk/thread/27150bbd-2bd1-4ad4-a84e-e8521853cf05Wally McClurehttp://social.technet.microsoft.com/Profile/en-US/?user=Wally%20McClureprogramming with SCCM/SMS<p class=MsoNormal><font face="Times New Roman" size=3><span style="font-size:12pt">I'm going to have to program against SCCM/SMS for a customer.  I've downloaded the SCCM 2007 SDK.  They are using SCCM 2007.  I am currently reading through the documentation.  I'm trying to understand what are the steps I need to do to tell SMS to install a piece of software onto a user's computer at a given time.  I need to do this programatically in .NET.  I'm not even sure where to start, so any pointers/suggestions would be very helpful.</span></font></p> <p class=MsoNormal><font face="Times New Roman" size=3><span style="font-size:12pt"> </span></font></p> <p class=MsoNormal><font face="Times New Roman" size=3><span style="font-size:12pt">Wally</span></font></p>Thu, 11 Sep 2008 16:49:32 Z2009-10-23T01:50:02Zhttp://social.technet.microsoft.com/Forums/en-US/configmgrsdk/thread/6d5e0942-2c4b-4ebe-aade-fdc25f6d6142http://social.technet.microsoft.com/Forums/en-US/configmgrsdk/thread/6d5e0942-2c4b-4ebe-aade-fdc25f6d6142kiwidjhttp://social.technet.microsoft.com/Profile/en-US/?user=kiwidjPackage / Collection Migration script - SMS to SCCM (vbscript or Powershell)Hi,<br /><br />I'm currently doing a side by side migration of SMS to SCCM.&nbsp; I'm currently building the new SCCM site at the moment,&nbsp; due to a few issues with the current SMS site I don't want to do a typical side by side migration (building a sms 2003 box and making it a child to replicate packages etc..),&nbsp; however there are over 200 packages all of which need migrated.<br /><br />I'd like to create a script to read the package configuration from the sms 2003 primary then create the same packages in the SCCM primary site.. (maybe dumping to a text file or similar in between).<br /><br />It'd be great to do the same with collections too.. although there's not that many so can do manual export / import for those if req'd.<br /><br />I'd like to use either vbscript or powershell..<br /><br />does anyone have anything that might help me get started?<br /><br />thanks!Tue, 13 Oct 2009 23:38:10 Z2009-10-21T23:16:12Zhttp://social.technet.microsoft.com/Forums/en-US/configmgrsdk/thread/b9d7ff05-3141-4ed9-aebf-ff201e798e34http://social.technet.microsoft.com/Forums/en-US/configmgrsdk/thread/b9d7ff05-3141-4ed9-aebf-ff201e798e34TRG66http://social.technet.microsoft.com/Profile/en-US/?user=TRG66Script to check Allow Basic Authentication<p align=left><font face=Arial size=2></font> </p> <p>I posted this in the Software Updates Management forum earlier today and Wally recommended that I post it here so that I could receive notification on a sample script that will resolve the problem.</p> <p> </p> <blockquote dir=ltr style="margin-right:0px"> <p>My SCCM server sits behind a proxy server that requires a username and password.  the password is passed in clear text.  WSUS has a check box to allow for this: Allow Basic Authentication, but SCCM does not have the same, so everytime SCCM updates the WSUS proxy settings, the check box is cleared.</p> <p> </p> <p>How can I tell SCCM to use the Allow Basic Authentication?</p> <p> </p> <p>Thanks!!</p> <p> </p> <p>Tom</p> <p> </p></blockquote> <p dir=ltr align=left>Thanks in Advance!!  Look forward to testing the script.</p> <p dir=ltr align=left> </p> <p dir=ltr align=left>Tom</p>Fri, 01 Feb 2008 23:24:48 Z2009-10-21T18:41:35Zhttp://social.technet.microsoft.com/Forums/en-US/configmgrsdk/thread/66a5d973-2e70-48c3-9d7d-6c0277a9f232http://social.technet.microsoft.com/Forums/en-US/configmgrsdk/thread/66a5d973-2e70-48c3-9d7d-6c0277a9f232William Brackenhttp://social.technet.microsoft.com/Profile/en-US/?user=William%20BrackenScript to execute non mandatory assignments?I am looking to create a script that would query the list of non mandatory assignments that are pending and execute them one by one.&nbsp; Taking into consideration that the code might not be downloaded yet so I assume I would need to check and if needed make a content request prior to execution.&nbsp; Anyone have anything like this yet?<br /><br />Thanks!Wed, 07 Oct 2009 15:58:16 Z2009-10-20T04:01:42Zhttp://social.technet.microsoft.com/Forums/en-US/configmgrsdk/thread/b365eb2e-5ed7-48ae-bb6c-c8dae50fc289http://social.technet.microsoft.com/Forums/en-US/configmgrsdk/thread/b365eb2e-5ed7-48ae-bb6c-c8dae50fc289NKeppelhttp://social.technet.microsoft.com/Profile/en-US/?user=NKeppelIProgram2::GetNextMandatoryTime I am setting up a script that will display specific data with regards to Programs and Advertisements that are available to be installed on a workstation.<br /><br />I am having alot of trouble getting the IProgram2::GetNextMandatoryTime action to return any data.&nbsp; I see that the next run time is displayed in the RAP but it does not appear to be stored in any readable format in the registry or WMI.&nbsp; I assume from the description in the SDK for GetNextMandatoryTime that it will do what I am looking for.&nbsp; I am not all that familiar with writing scripts and learning as I go, so any suggestions or examples to access this method would be very helpful.Fri, 16 Oct 2009 13:35:31 Z2009-10-16T13:48:42Zhttp://social.technet.microsoft.com/Forums/en-US/configmgrsdk/thread/bd467dff-64df-4750-b56e-779a4fe75e5ehttp://social.technet.microsoft.com/Forums/en-US/configmgrsdk/thread/bd467dff-64df-4750-b56e-779a4fe75e5eRiju_gphttp://social.technet.microsoft.com/Profile/en-US/?user=Riju_gpOSD- Task sequence: Any one have vbscript to read the steps for Task sequence in SCCMhi my query is to read the Task sequence and there corresponding Groups (Steps) which has been created inside the tasksequence editor. Any one faced or done similar thing using vbscript please help me. <br/>or<br/>If any one have any idea how we can export the Groups / Steps in Task sequence with the help of any script or any command line to be used to export the .xml file from teh Tasksequence Editor.<br/><br/>Any help appreciated.... thank youTue, 25 Aug 2009 10:21:26 Z2009-10-15T07:00:50Zhttp://social.technet.microsoft.com/Forums/en-US/configmgrsdk/thread/ed38d1eb-57c8-4f02-91aa-82b552b1570fhttp://social.technet.microsoft.com/Forums/en-US/configmgrsdk/thread/ed38d1eb-57c8-4f02-91aa-82b552b1570feriwestehttp://social.technet.microsoft.com/Profile/en-US/?user=eriwesteMemory Sccm and managed codeHi<br />We are using a mix between managed code c# and Vb scripts to perform integration and changes for Sccm Sp1 <br /><br />Ex, adding/removing computer objects as direct members to collections. Syncronize package, program, collection info to other SQL etc.<br /><br />Now and then the mmc console stops responding, (no exact time table interval between incidents). Most of the times a restart of the WMI service resolves the issue.&nbsp;if not a reboot of the server is needed.<br /><br />No specific solution is presented when searcing for MMC and console related errors.<br /><br />I suspect that this might be the case<br /><a href="http://social.technet.microsoft.com/Forums/en-US/configmgrsdk/thread/942db779-fafe-4f38-adee-b200758816b4">http://social.technet.microsoft.com/Forums/en-US/configmgrsdk/thread/942db779-fafe-4f38-adee-b200758816b4</a><br /><br /><br />Question:<br />1. Could this be the issue with the console becomming unresponsive<br />2. If so, can I check if thats the case, (memory leak application finder, wmi trace log, etc etc) &nbsp;<br />- I have no access to source code&nbsp;&nbsp;<br /><br /><br />Env:<br />Sccm 2007 Sp1 / R2<br />Sql 2005 Sp3<br />Windows Srv std x64 12GB RAM<br /><br />Br<br />erikTue, 06 Oct 2009 16:40:05 Z2009-10-06T22:38:51Zhttp://social.technet.microsoft.com/Forums/en-US/configmgrsdk/thread/a9ddce6b-3f78-4fd5-90f2-575880a8daf1http://social.technet.microsoft.com/Forums/en-US/configmgrsdk/thread/a9ddce6b-3f78-4fd5-90f2-575880a8daf1Scrapinouhttp://social.technet.microsoft.com/Profile/en-US/?user=ScrapinouHow to Read a Task Sequence from a Task Sequence Package<p>I want to Read a Task Sequence from a Task Sequence Package.</p> <p>The, I use SDK and I found this code :</p> <p>Function ReadTaskSequence(connection, taskSequencePackage) ' Get the parameters object.<br>    Set packageClass = connection.Get(&quot;SMS_TaskSequencePackage&quot;)<br>    Set objInParam = packageClass.Methods_(&quot;GetSequence&quot;)._ inParameters.SpawnInstance_()<br>    ' Add the input parameters.<br>    objInParam.Properties_.Item(&quot;TaskSequencePackage&quot;) = taskSequencePackage<br>    ' Get the sequence.<br>    Set objOutParams = connection.ExecMethod(&quot;SMS_TaskSequencePackage&quot;, &quot;GetSequence&quot;, objInParam)<br>    Set ReadTaskSequence = objOutParams.TaskSequence<br>End Function</p> <p>With VBScript, this code is working perfectly, but when I use this code with VB.Net, I have an error on : &quot;objInParam.Properties_.Item(&quot;TaskSequencePackage&quot;) = taskSequencePackage&quot;</p> <p>Error is : &quot;Exception from HRESULT: 0x80020003 (DISP_E_MEMBERNOTFOUND)&quot;</p> <p>Below the VB.Net functionning I am using :</p> <p>Public Function SCCM_TaskSequenceFromTaskSequencePackage(ByVal Server, ByVal SiteCode, ByVal Username, ByVal Password)<br>Dim Locator As Object = CreateObject(&quot;WbemScripting.SWbemLocator&quot;)</p> <p>Dim WbemServices As Object = Locator.ConnectServer(Server, &quot;ROOT\SMS\SITE_&quot; &amp; SiteCode, Username, Password)</p> <p>Dim taskSequencePackages As Object = WbemServices.ExecQuery(&quot;Select * from SMS_TaskSequencePackage WHERE PackageID = 'AA000016'&quot;)</p> <p>Dim taskSequencePackage As Object = Nothing</p> <p>For Each taskSequencePackage In taskSequencePackages</p> <p>'MsgBox(taskSequencePackage.Name)</p> <p>' Get the parameters object.</p> <p>Dim packageClass = WbemServices.Get(&quot;SMS_TaskSequencePackage&quot;)</p> <p>Dim objInParam = packageClass.Methods_(&quot;GetSequence&quot;).inParameters.SpawnInstance_()</p> <p>' Add the input parameters.</p> <p>objInParam.Properties_.Item(&quot;TaskSequencePackage&quot;) = taskSequencePackage</p> <p>' Get the sequence.</p> <p>Dim objOutParams As Object = WbemServices.ExecMethod(&quot;SMS_TaskSequencePackage&quot;, &quot;GetSequence&quot;, objInParam)</p> <p>Dim TS : TS = objOutParams.TaskSequence</p> <p>MsgBox(TS.SchemaVersion)</p> <p>'Set ReadTaskSequence = objOutParams.TaskSequence</p> <p>NextSCCM_TaskSequenceFromTaskSequencePackage = True</p> <p>End Function</p> <p><br>Thanks for your help.</p>Mon, 02 Mar 2009 09:31:44 Z2009-10-05T11:32:50Zhttp://social.technet.microsoft.com/Forums/en-US/configmgrsdk/thread/49a0baa3-0973-47b6-81b0-587470c00334http://social.technet.microsoft.com/Forums/en-US/configmgrsdk/thread/49a0baa3-0973-47b6-81b0-587470c00334jcsoftgrid138http://social.technet.microsoft.com/Profile/en-US/?user=jcsoftgrid138ExecuteProgram I am creating my own UI to list available programs for users and when they click on the program to install i want the program to check if the package source is available for download before installing.<br>All my packages will run directly from the DPs. I tried using <font size=2>uiResMgr.ExecuteProgram(prog.Id, prog.PackageId, 1) to execute the program but the problem is that if the package is not available on the DP, the program will just hang in downloading state forever. I want to know if there is a way to check to see if the package is available before running ExecuteProgram. Thanks<br><br></font>Mon, 12 Jan 2009 03:18:21 Z2009-10-05T10:28:29Zhttp://social.technet.microsoft.com/Forums/en-US/configmgrsdk/thread/7d939710-ef40-41e8-9f9e-06306d07b631http://social.technet.microsoft.com/Forums/en-US/configmgrsdk/thread/7d939710-ef40-41e8-9f9e-06306d07b631Gonchukhttp://social.technet.microsoft.com/Profile/en-US/?user=GonchukImport OSD Task Sequence via XML - 0xC00CE556 using SDK script<p align=left><font face=Arial size=2></font> </p> <p>Hi</p> <p align=left> </p> <p align=left>I have attempted to import a Task Sequence into ConfigMgr using the following function within the SDK:</p> <p align=left> </p> <p align=left> </p> <p align=left>'=================================================================</p> <p align=left>Function ImportTaskSequence(connection, taskSequenceXml)<br>    Dim taskSequenceClass<br>    Dim inParams<br>    Dim outParams<br>    <br>    ' Obtain the class definition object of a SMS_TaskSequence object.<br>    Set taskSequenceClass = connection.Get(&quot;SMS_TaskSequence&quot;)<br><br>    Set inParams = _<br>        taskSequenceClass.Methods_(&quot;LoadFromXML&quot;).InParameters.SpawnInstance_<br>     inParams.Xml = taskSequenceXml<br><br>    ' Call the method.<br>    Set outParams = _<br>        connection.ExecMethod( &quot;SMS_TaskSequence&quot;, &quot;LoadFromXML&quot;, inParams)<br>  <br>    Set ImportTaskSequence=outParams.ReturnValue<br><br>End Function</p> <p align=left>'=================================================================</p> <p align=left> </p> <p align=left>I exported the Task Sequence from ConfigMgr and have tried importing it using this function and receive an error when calling the method - <strong>SWbemSericesEx : 0xC00CE556.</strong></p> <p align=left><strong></strong> </p> <p align=left>I have looked around and this seems to mean 'Invalid at the top level of the document'. Unfortunately I can't seem to find anything regfading this when using &quot;LoadFromXML&quot;</p> <p align=left> </p> <p align=left>For info I am using MSXML 6.0, running the script directly on the site server</p> <p align=left> </p> <p align=left>Has anyone come across this problem or can help me?</p> <p align=left> </p> <p align=left>Much appreciated</p> <p align=left> </p> <p align=left>Steve</p> <p align=left> </p>Wed, 05 Mar 2008 13:19:41 Z2009-10-05T08:24:04Zhttp://social.technet.microsoft.com/Forums/en-US/configmgrsdk/thread/6e074d2d-ed51-42a0-bc67-f9ab08fd2fe9http://social.technet.microsoft.com/Forums/en-US/configmgrsdk/thread/6e074d2d-ed51-42a0-bc67-f9ab08fd2fe9Alexander Burghardthttp://social.technet.microsoft.com/Profile/en-US/?user=Alexander%20BurghardtSCCM WoL with SDK Is it possible to use the WoL-function of SCCM in an external tool (SDK, C#) to start an individual PC?<br />Or i have to use other tools to implement WoL?<br /><br />thanks.Fri, 02 Oct 2009 09:20:20 Z2009-10-03T00:41:06Zhttp://social.technet.microsoft.com/Forums/en-US/configmgrsdk/thread/6982376b-fcea-479f-b5fe-1436df6c2e0bhttp://social.technet.microsoft.com/Forums/en-US/configmgrsdk/thread/6982376b-fcea-479f-b5fe-1436df6c2e0bWardHhttp://social.technet.microsoft.com/Profile/en-US/?user=WardHProblems connecting to SCCM 2007 Provider and create a package from PDF Template.<p>Hi,</p> <p>1. Is there a C# equivalent of the following?</p> <p>   &quot;How to Create a Package by Using a Package Definition File Template&quot;<br>   <a href="http://msdn.microsoft.com/en-us/library/cc143469.aspx">http://msdn.microsoft.com/en-us/library/cc143469.aspx</a></p> <p>2. Problems connecting with the SCCM 2007 provider.</p> <p>   I am using C# and having trouble connecting to the provider.</p> <p>   Article:<br>     <br>   How to Connect to an SMS Provider in Configuration Manager by Using Managed Code<br>   <a href="http://msdn.microsoft.com/en-us/library/cc146404.aspx">http://msdn.microsoft.com/en-us/library/cc146404.aspx</a><br>   <br>   <br>   Error 1 The type or namespace name 'WqlConnectionManager' could not be<br>   found (are you missing a using directive or an assembly reference?) ...</p> <p>   Where is this symbol defined?<br>   <br>   <br>   using System;<br>   ..<br>   ..<br>   using Microsoft.ConfigurationManagement.ManagementProvider;<br>   <br>   // I also have a reference to: the DLL:<br>   // ..AdminUI\bin\microsoft.configurationmanagement.managementprovider.dll<br>   <br>   using System.Management;<br>   ..<br>   ..</p> <p>        private void button1_Click(object sender, EventArgs e)<br>        {<br>            SmsNamedValuesDictionary namedValues = new SmsNamedValuesDictionary();<br>            WqlConnectionManager connection = new WqlConnectionManager(namedValues);</p> <p>        }</p> <p>   Thanks,<br>   <br>   Ward<br>   <br>   </p>Thu, 19 Mar 2009 13:38:03 Z2009-10-02T08:10:10Zhttp://social.technet.microsoft.com/Forums/en-US/configmgrsdk/thread/0a37c038-30f5-4bb2-9770-fd9330542a99http://social.technet.microsoft.com/Forums/en-US/configmgrsdk/thread/0a37c038-30f5-4bb2-9770-fd9330542a99Dan.Dufushttp://social.technet.microsoft.com/Profile/en-US/?user=Dan.DufusQuerying currently running advert *in C#*Hi All,<br/><br/>I've been trying to convert some VBS into a C# app for 2 days now, I thought it time to ask for some help..<br/><br/>I've used the VBS from this thread..<br/><br/><a href="http://social.technet.microsoft.com/Forums/en-US/configmgrsdk/thread/d0222501-0086-4018-ac4b-4593572225a9">http://social.technet.microsoft.com/Forums/en-US/configmgrsdk/thread/d0222501-0086-4018-ac4b-4593572225a9</a><br/><br/>Which works wonderfully if just running as a vbs, alas I need to work it into a C# app.<br/><br/>I have given up on anything complex and now I am just trying to connect to the CCM_ExecutionRequestEx class, but when it gets to the foreach loop it just comes up invalid class. This is really really frustrating and must be something simple as 1) It works in vbs and 2) I'm sure im connecting to the right namespace and class...<br/><br/>In the interest of keeping minimilist I've just coped some code from MS website about connecting to the CCM Client Agent and just modified it.<br/><br/>Any help would be really appreciated :)<br/><br/>-Dan<br/><br/> <pre lang="x-c#">// Define the scope (namespace) to connect to. ManagementScope inventoryAgentScope = new ManagementScope(@&quot;root\ccm\SoftMgmtAgent&quot;); inventoryAgentScope.Connect(); // Load the class to work with (CCM_Client). ManagementClass inventoryClass = new ManagementClass(&quot;CCM_ExecutionRequestEx&quot;); // Query the class for the objects (create query, create searcher object, execute query). ObjectQuery query = new ObjectQuery(&quot;SELECT * FROM CCM_ExecutionRequestEx&quot;); ManagementObjectSearcher searcher = new ManagementObjectSearcher(inventoryAgentScope, query); ManagementObjectCollection queryResults = searcher.Get(); // Loop through the available objects (only one) and display the ClientId value. foreach (ManagementObject result in queryResults) { //Console.WriteLine(&quot;ClientId (GUID): &quot; + result[&quot;RunningState&quot;]); }</pre>Tue, 29 Sep 2009 06:21:07 Z2009-09-30T04:41:46Zhttp://social.technet.microsoft.com/Forums/en-US/configmgrsdk/thread/36c9b63d-6371-4dae-9dc2-91d091938f45http://social.technet.microsoft.com/Forums/en-US/configmgrsdk/thread/36c9b63d-6371-4dae-9dc2-91d091938f45Bugbear1973http://social.technet.microsoft.com/Profile/en-US/?user=Bugbear1973Query SCCM Services object for server and site codeThis may be a bit of a chicken vs egg question.<br/><br/>I create a connection to my sccm site using code similar to the following (vbscript):<br/><br/> <pre>Set objWBemLoc = CreateObject( &quot;WBemScripting.SWBemLocator&quot; ) Set objSMSServices = objWBemLoc.ConnectServer( strServer, &quot;root\SMS\Site_&quot; &amp; strSite )</pre> <br/>I then pass the objSMSServices object to various functions and subs while doing what I need to do.<br/><br/>Without resorting to global variables, from within a function, how can I determine what the current connection object's server and site code is?<br/><br/>I've looked at the SMS_ProviderLocation object but that only seems to work if the current services object has not been connected to a specific SMS namespace.<br/><br/>i.e. this works:<br/> <pre> Set swbemLocator = CreateObject(&quot;WbemScripting.SWbemLocator&quot;) Set swbemServices = swbemLocator.ConnectServer(&quot;&lt;server name&gt;&quot;, &quot;root\sms&quot;) Set providerLoc = swbemServices.InstancesOf(&quot;SMS_ProviderLocation&quot;) For Each Location In providerLoc If location.ProviderForLocalSite = True Then WScript.Echo Location.Machine WScript.Echo Location.SiteCode Set swbemServices = swbemLocator.ConnectServer(Location.Machine, &quot;root\sms\site_&quot; + Location.SiteCode) Exit For End If Next</pre> <br/>But this doesn't (where objSCCM is my SCCM services object passed into the function)<br/> <pre> Dim objProviderLoc : Set objProviderLoc = objSCCM.InstancesOf( &quot;SMS_ProviderLocation&quot; ) Dim objLocation, strSiteCode, strServer For Each objLocation In objProviderLoc If objLocation.ProviderForLocalSite Then strServer = objLocation.Machine strSiteCode = objLocation.SiteCode Exit For End If Next<br/></pre> What am I missing?<br/><br/>Thanks in advance.<hr class="sig">Blah Blah BlahThu, 27 Aug 2009 09:05:00 Z2009-09-23T03:51:14Zhttp://social.technet.microsoft.com/Forums/en-US/configmgrsdk/thread/2ddb840c-6eeb-4357-9f19-2cd578031af0http://social.technet.microsoft.com/Forums/en-US/configmgrsdk/thread/2ddb840c-6eeb-4357-9f19-2cd578031af0PeteSQLhttp://social.technet.microsoft.com/Profile/en-US/?user=PeteSQLVBScript runtime error: Object required: from oWbemLocator.ConnectServer<p align=left><font face=Arial size=2></font> </p> <p>So I am kind of new to SCCM but need to automate the installation of applications in a task sequence for OSD but I am receiving the error above.  I am just trying to get the insert to work before I move to an application install with SMS_TaskSequence_InstallSoftwareAction.  Here is a code I have thus far:  Red part is where the error arises.</p> <p align=left> </p> <p align=left> </p> <p align=left> <div class=codeseg> <div class=codecontent> <div class=codesniptitle><span style="width:100%">Code Snippet</span></div> <p align=left>'***************** Declare input parameter values ***************<br>Dim ArgObj, oPackageID<br>Set ArgObj = WScript.Arguments</p> <p align=left><br>'************* First parameter which is *************************<br>'************* _SMSTSPackageID environmental variable ***********<br>oPackageID = ArgObj(0)</p> <p align=left>'************ Declare varibles **********************************<br>Dim oWbemLocator<br>Dim oWbemService<br>Dim oProviderLoc<br>Dim oLocation<br>Dim oSvc<br>Dim oUserName<br>Dim oPassword<br>Dim strComputer</p> <p align=left>'************** Need credentials to connect to SCCM Server ******</p> <p align=left>Set oUserName = &quot;DOMAIN\First.Last&quot;<br>Set oPassword = &quot;Password&quot;<br>Set strComputer = &quot;ServerName&quot;</p> <p align=left>Set objWMIService = GetObject(&quot;winmgmts:&quot; _ <br>    &amp; &quot;{impersonationLevel=Impersonate}!\\&quot; _<br>    &amp; strComputer &amp; &quot;\root\cimv2&quot;)</p> <p align=left>'************** Connect to SCCM MP *****************************<br>Set oWbemLocator = CreateObject(&quot;WbemScripting.SWbemLocator&quot;)<br><font color="#ff0000">Set oWbemService = oWbemLocator.ConnectServer(strComputer, &quot;root\sms&quot;,oUserName,oPassword)<br></font> oWMIServices.Security_.ImpersonationLevel = 3<br>Set oProviderLoc = oWbemService.InstancesOf(&quot;SMS_ProviderLocation&quot;)<br>For Each oLocation in oProviderLoc<br> If oLocation.ProviderForLocalSite = True Then<br>  Set oSvc = oWbemLocator.ConnectServer(oLocation.Machine, &quot;root\sms\site_&quot; + oLocation.SiteCode)<br>  Exit For<br> End If<br>Next</p> <p align=left><br>Set oTSP = oPackageID<br>set TS = GetTSSequence(oSvc, oTSP)</p> <p align=left>'********** Call's to sub functions **************************** </p> <p align=left>Call AddTSStep (oSvc, TS)</p> <p align=left>Call SetTSSequence (oSvc, oTSP, TS)</p> <p align=left><br>'********** Function's *****************************************<br>'**********                                          ***********<br>'**********  What step to add to Task Sequence *****************</p> <p align=left>Function AddTSStep(oCon, oTS)<br> Dim action<br> Dim steps</p> <p align=left>Set action = oCon.Get(&quot;SMS_TaskSequence_RunCommandLineAction&quot;).SpawnInstance_</p> <p align=left> action.CommandLine = &quot;cmd /c echo Hello&quot;<br> action.Name = &quot;Test&quot;<br> action.Enabled = true<br> action.ContinueOnError = false</p> <p align=left> If IsNull(oTS.Steps) Then<br>  steps = Array(action)<br> ElseIf UBound(oTS.Steps) = -1 Then<br>  steps = Array(action)<br> Else<br>  steps = oTS.Steps<br>  Redim Preserve steps(UBound(steps) + 1)<br>  Set steps(UBound(steps)) = action<br> End If</p> <p align=left> oTS.Steps = steps</p> <p align=left>End Function</p> <p align=left><br>'************* Insert step into identified Task Sequence *********</p> <p align=left>Function SetTSSequence(oCon, oTSPackage, oTS)<br> On Error Resume Next<br> Set inParams = oTSPackage.Methods_(&quot;SetSequence&quot;).InParameters.SpawnInstance_<br> inParams.TaskSequencePackage = oTSPackage<br> inParams.TaskSequence = oTS<br> Set outParams = oSvc.ExecMethod(&quot;SMS_TaskSequencePackage&quot;, &quot;SetSequence&quot;, inParams)<br> </p> <p align=left> If outParams.ReturnValue = 0 Then<br>  SetTSSequence = True<br> Else<br>  SetTSSequence = False<br> End If<br> On Error Goto 0<br>End Function</p> <p align=left><br>'************ Get current Task Sequence info *********************</p> <p align=left>Function GetTSSequence (oCon, oTSPackage)<br> Dim oPkgClass<br> Dim oParam<br> Dim oOutParam</p> <p align=left> Set oPkgClass = oCon.Get(&quot;SMS_TaskSequencePackage&quot;)<br> Set oParam = oPkgClass.Methods_(&quot;GetSequence&quot;).inParameters.SpawnInstance_()<br> <br> oParam.Properties_.Item(&quot;TaskSequencePackage&quot;) = oTSPackage<br> <br> Set oOutParam = oCon.ExecMethod(&quot;SMS_TaskSequencePackage&quot;, &quot;GetSequence&quot;, oParam)<br> <br> Set GetTSSequence = oOutParam.TaskSequence<br>End Function</p> <p align=left> </p></div></div> <p align=left> </p> <p></p> <p align=left></p> <p> </p> <p>The SMSTS*.log file has the error &lt;![LOG[C:\_SMSTaskSequence\Packages\HOU000BF\SMSSWD.VBS(22, 1) Microsoft VBScript runtime error: Object required: '[string: &quot;Domain\First.Na&quot;]</p> <p> </p> <p align=left>the user name is being cut off at 20 characters where it is actually 25 characters long.  is there a limitation on lenght for user name but any help would be greatly appreciated.</p> <p align=left> </p> <p align=left>Thxs</p> <p align=left> </p> <p align=left>P</p>Tue, 07 Oct 2008 17:50:48 Z2009-09-22T12:16:06Zhttp://social.technet.microsoft.com/Forums/en-US/configmgrsdk/thread/53f53ef6-c5ee-4a1e-b73b-9f0a59032f16http://social.technet.microsoft.com/Forums/en-US/configmgrsdk/thread/53f53ef6-c5ee-4a1e-b73b-9f0a59032f16Giancarlo S.http://social.technet.microsoft.com/Profile/en-US/?user=Giancarlo%20S.How to disable an advertisement using SCCM SDKHi,<br/><br/>There is an option in the SCCM console where you right click on the advertisement and select: Disable Program. I would like to know how can I disable the program using SKD.<br/><br/>Tks in advance,<br/>Giancarlo.Fri, 18 Sep 2009 05:13:22 Z2009-09-18T06:42:03Z