I need to add a package to a DP programmatically but the SDK solution yields slightly different results to the manual solution.

Hi
I have been using this:
http://msdn.microsoft.com/en-us/library/cc144027.aspx
to add packages to configmgr 2007 but I have noticed that if I look at the distribution points for the package, the site name doesn't exist like it does if it has been added manually. Other than that, the package does actually appear to get physically copied
over to the DP but I am unhappy using this in production until I can sort this out.
Anyone know what I am missing? In the above example I pass the site code of the (secondary) site server (257) and the server name itself. I assume this is correct, but I must be missing something.
Additionally, I noticed that if more than one DP share exists, eg a package DP and an SMSPXE$ on the same server, it tries to put it on the last one it finds, usually SMSPXE$. I get round this by filtering the returned string but wondered if there was a
more elegant solution.
Thanks

OK looks like I've fixed this. I've added a new query to get the site description (sitedescriptionquery) and simply added that to the distribution point properties before saving.
Given that this is the default in ConfigMgr 2007 I am surprised the SDK code doesn't include this. The workaround to avoid putting the package on SMSPXE$ is also included below.
string query = "SELECT * FROM SMS_SystemResourceList WHERE RoleName='SMS Distribution Point' AND SiteCode='" + siteCode + "' AND ServerName='" + serverName + "'";
string sitedescriptionquery = "SELECT * FROM SMS_Site Where SiteCode='" + siteCode + "' AND ServerName='" + serverName + "'";
IResultObject listOfDescriptions = WMIConn().QueryProcessor.ExecuteQuery(sitedescriptionquery);
foreach (IResultObject site in listOfDescriptions)
siteName = site["SiteName"].StringValue;
IResultObject listOfResources = WMIConn().QueryProcessor.ExecuteQuery(query);
foreach (IResultObject resource in listOfResources)
if (resource["NALPath"].StringValue.IndexOf("SMSPXEIMAGES$") < 0)
distributionPoint["ServerNALPath"].StringValue = resource["NALPath"].StringValue;
distributionPoint["SiteCode"].StringValue = resource["SiteCode"].StringValue;
distributionPoint["SiteName"].StringValue = siteName;

Similar Messages

  • HT201269 I am using my daughters old laptop (which already has her iTunes on it) and need to add my iPhone and iTunes acct info but can't figure out how...   HELP!!

    I am using my daughters old laptop (which already has her iTunes on it) and need to add my iPhone and iTunes acct info but can't figure out how...   PLEASE HELP!!

    Sign her out of the iTunes copy that's on the machine, then you can sign in with your account credentials.

  • I need to add more pages to my photo book but its only letting me do 78 pages, can you help me please?

    Hello
    I need to add more pages to my photo book but its only letting me do 78 pages, can you help me please?

    You posted in the Photoshop forum by mistake - and people there aren't going to be able to help you with Elements issues.
    I've moved your post to the Elements forum where you are more likely to get help with Elements questions.

  • HT1495 I need to add an app to my Japan iPhone from iTunes Japan, since it is not available in the US iTunes store. How do I do this.

    I am in Japan. My iTunes is a US account. I need to add an app to my Japan based iPhone.  It is not available in US iTunes. Do I need another iTunes account in Japan?

    You can only purchase from the country in which you live. You cannot purchase from the Japan Store if you live in the U.S. and your iTunes account is a U.S. based account.

  • Need to add a new ipod touch to itunes but want to create entire new account ... how do i create a new account for itunes in another person's name and link the libraries?

    I have 4 devices ... currently 3 of the are all attached to my personal itunes/email account.  Just got another device - ipod touch 5 - that is my son's and I want for him to have his own account so that we are no longer sharing text messages, contacts, etc.
    I want to create a new itunes account for me but still be able to share my music library with him.  How do I do this?  appreciate the help.

    See:
    MacMost Now 653: Setting Up Multiple iOS Devices For Messages and FaceTime
    You will not have a phone number, only an email address.
    iOS and OS X: Link your phone number and Apple ID for use with FaceTime and iMessage

  • I need help using the impdb utility on a different machine to the export...

    Hi all,
    I have recieved an export from a ClearQuest database, built on Oracle.
    It's a 6GB file xxx_full_dpdump.dmp, with a corresponding .log.
    This was exported from a different Oracle instance on a different machine.
    I'd like to import this dump file into my Oracle instance.
    I tried to use imp, and received the following error: IMP-00010: not a valid export file, header
    After a bit of reading, I think this may becase I should be using impdp.
    BUT... when trying to use impdp, I'm not sure how to structure the syntax? specifically, what is DIRECTORY?
    As this is export is from a different machine, the directory that it was exported to is not on my machine.
    When running ...
    impdp username/password directory=MyDirectoryThatContainsTheDmp DUMPFILE=xxx_full_dpdump.dmp
    ... I receive:
    ORA-39002: invalid operation
    ORA-3970: Unable to open the log file
    ORA-3907: directory name MyDirectoryThatContainsTheDpm is invalid

    Thanks, I'm using Windows XP SP3 and Oracle 11g (11.2.0.1.0)
    So I've now granted the right permissions, it seems and The Impdp now executes (Hoorar!)
    The command I'm running is:
    impdp username/password directory=DATA_PUMP_DIR dumpfile=xxx_full_dpdump.dmp REMAP_SCHEMA=MYUSER:Test;
    ... where MYSUER is who I'm logged in as running this command; and Test is just a word, I haven't created anything called this myself.
    BUT ... I get a few thousand errors around
    - Cannot add file ... file has an Oracle Managed Files file name
    - CREATE USer ..... failed tablespace XXX does not exist
    - lots of "already exists" errors for users and tables.
    Any ideas what I'm doing wrong? I though these would all be created as new items under MYUSER.
    Thanks so much!

  • A suggestion for the mouse setting through persistence via SkyDrive/OneDrive: Add a check button to let the user tell if the mouse settings should be "restored" every time the user logs in a "different" computer using the same Microsoft Account.

    Every time I log in one of my 2 computers with Microsoft Account, I have to change the main button (left/right) setting, because the settings persistence via SkyDrive/OneDrive.
    I have different main mouse button settings in the computers.
    Those settings shouldn't be changed, if the account is not a new one, after all, if the user has different settings in old accounts, it means there must be a reason to do it (because of hardware and/or furniture restriction).
    Thus, a check button in the mouse settings' window that let the user tell if it should be changed or not would be welcomed.

    Every time I log in one of my 2 computers with Microsoft Account, I have to change the main button (left/right) setting, because the settings persistence via SkyDrive/OneDrive.
    I have different main mouse button settings in the computers.
    Those settings shouldn't be changed, if the account is not a new one, after all, if the user has different settings in old accounts, it means there must be a reason to do it (because of hardware and/or furniture restriction).
    Thus, a check button in the mouse settings' window that let the user tell if it should be changed or not would be welcomed.

  • After a long time, i looged in to add some files in my iphone 4s but when i connect my iphone, it says that the iphone zizous friend cannot synced,you do not have enough permission to run this operation..using windows 7 and transfering videos

    i am facing this issue for the first time.....cannot sync my iphone 4s ...iphone cannot sync.you do not have enough permission for this operation...
    i am adding videos to my iphone....
    using windows 7
    ios latest update

    there are lot of threads in respect to this issue but still unable to get the problem solved from the solutions available

  • Do I need to add friends & family numbers

    I've just changed my call package to unlimited anytime friends and family mobile. Do I need to add friends and family numbers to benefit from this package? I can't see any way to do it through the BT website so I presume I don't need to do anything more. Is this correct?

    Hi Guys,
     I think the new service is slightly different to the old friends and family.
    Freinds and family mobile is a discount on all uk mobile calls, it means any mobile call you make will be charged at 7p per minute.
    the friends and family internation is a similar deal but on international instead of mobile calls.

  • I need to add symbols!!

    Hello there and Greetings,
    I need to add a few symbols to my keyboard, but I don't know how to do it.
    I need to add a registered symbol and a copyright symbol. I have been looking on my mac for hours and can't find out how to do it, and I can't find it.
    Please can someone help?? I am sure that this is easy, I'm just not the sharpest knife in the drawer
    THANK YOU in advance!
    Cheers for now,
    JT

    In the Finder menu bar choose edit/special characters/miscellaneous.
    Drag the icon from the window to your text.
    Voila!
    ©

  • How can I add this package?

    Hello,
    I downloaded the "xmlunit-1.0.jar", and in the code that I'm working with I have this as the first line:
    package org.custommonkey.xmlunit.examples;
    But, I'm getting an error, in addition to the following line:
    import org.custommonkey.xmlunit.*;
    I'm using Eclipse on MAC OS X.
    How can I add the ""xmlunit-1.0.jar" and do the imports correctly?
    Thanks.

    Configure the build path of your project. Right-click on the project in Eclipse, select Properties, and have a dig around what you find there. It won't take you long. I'm not going to tell you exactly what to do, because if you try and figure it out for yourself, you'll almost certainly find out some other useful things at the same time. That's how I learnt to use Eclipse: just dug around in menus

  • Need to add mobile (cell) phone in corporate directory via LDAP

    Hello All
    Can I just start by saying that I am not a developer so expect some dumb questions to follow.
    We have cucm 6.1 and am using ldap sync to AD. The problem is that we would like to query the mobile phone field within AD and present it on the phone when the directory button is pressed.
    Is this possible ?
    From what I have read in the forums I have to create another directory ???
    I have downloaded the sdk 4.1 and tried to copy the asp files from the following directory C:\CiscoIPServices\ASP\ldap
    I have replaced the variables
    var s = new ActiveXObject("LDAPSEARCH.LDAPSearchList");
    s.server = "ldap.cisco.com";
    s.searchbase = "ou=people,o=cisco.com";
    with
    var s = new ActiveXObject("LDAPSEARCH.LDAPSearchList");
    s.server = "demounity.demo.voyager.net.uk";
    s.searchbase = "ou=users,ou=demo,dc=demo,dc=voyager,dc=net,dc=uk";
    s.SetOutputTitle("ActiveX Directory Search", 45);
    s.SetOutputPrompt("Records %s to %e of total %c", 45);
    s.AddReturnAttr("givenName,sn","Name","%1,%2", 20);
    s.AddreturnAttr("telephonenumber","Telephone","%1", 20);
    s.AddreturnAttr("mobile","Mobile","%1", 20);
    s.Addreturnattr("mail","Email","%1", 20);
    s.AddSortingAttr("telephonenumber", 1);
    s.SearchByEmail(email);
    I made these changes to all the asp files and referenced them all in a file called test_main.asp. Which is similar to the ASP_main.asp.
    I have run the regsvr32 LDAPSearch.dll and have added the following url to the phones directory url field ttp://192.168.9.101/CiscoIPServices/ldap/test_main.asp. Where 192.168.9.101 is my AD and IIS server (demounity.demo).
    The phone only display the Missed, received and places calls when I press the directory button. The corporate directory is missing.
    Are there any steps that I am missing or am I barking up the wrong tree all together
    to achieve what I need to ?
    I have also configured the CiscoUrlproxy for what reason I don't really understand.
    Thanks
    Feisal

    Since the CCM is a black box now, unless you pull out a HD and mount it on another Linux box where you have full access, or booting from a Linux boot CD there's no way to access the file system.
    However, you posted an ASP sample so I'm not sure if a jsp (java server page) would help you a lot - there's also no way of telling how much logic will be in the jsp page and how much logic will be behind in a compiled class - e.g. my own directories only have very basic logic (reading input, writing output, limit the number of results per page) and everything else is done in a bunch of jar files - so using them would only work if you can restrict yourself to doing exactly what my frontend page does.

  • My iPhoto won't open, and tells me I need to download the current version. But when I try to do that, it says the application isn't available in my country.

    I was trying to open iPhoto one day, when I noticed the icon had a white circle with a slash mark through it on top of the icon. I clicked on it, and an error message popped up that read: "In order to open iPhoto, you need to update to the latest version." (I had just updated my Mac with the OS X Yosemite 10.10.3 Supplemental Update) So I go ahead and click download on the error message, and it brings me to the app store and says "Item Not Available. The item you've requested is not currently available in your country." (I live in the U.S.)
    Had this happened to anybody??

    Go to the App Store and check out the Purchases List. If iPhoto is there then it will be v9.6.1
    If it is there, then drag your existing iPhoto app (not the library, just the app) to the trash
    Install the App from the App Store.
    Sometimes iPhoto is not visible on the Purchases List. it may be hidden. See this article for details on how to unhide it.
    http://support.apple.com/kb/HT4928
    One question often asked: Will I lose my Photos if I reinstall?
    iPhoto the application and the iPhoto Library are two different parts of the iPhoto programme. So, reinstalling the app should not affect the Library. BUT you should always have a back up before doing this kind of work. Always.

  • REG: 4 different folders from the source side and we need to have the BPM t

    Hi All,
    We are using a BPM for file-idoc scenario. Previously we use to have one source folder which sends file and the bpm worked fine. Now we have a requirement where the files come from 4 different folders from the source side and we need to have the BPM to run independently for each folder.
    What are the changes to be made in IR and id for this..
    Thanks & Regards,
    Kiran.

    File adapter has a option advance selection of source file setting which can be used for picking files from different folder.

  • Which SharingReference I need to add at a portal service for these packages

    Hello,
    I have written a portal service, not at the Dynpro, environment which uses these imports:
    com.sap.tc.webdynpro.progmodel.api.IWDNode;
    com.sap.tc.webdynpro.progmodel.api.IWDNodeElement;
    com.sap.tc.webdynpro.services.sal.url.api.IWDCachedWebResource;
    com.sap.tc.webdynpro.services.sal.url.api.WDURLException;
    com.sap.tc.webdynpro.services.sal.url.api.WDWebResource;
    com.sap.tc.webdynpro.services.sal.url.api.WDWebResourceType;
    Which SharingReference do I need to add in order for this to be recognized from the service?

    Hello Valery and Maksim,
    I am familiar with this post yet I have two problems that it doesn't solve:
    1. The reason we are not migrating from Local Dynpro projects to DCs is because of language issues currently handled by SAP. Our GUI is written in Hebrew and at the migration process all the text appearing on the GUI simply vanishes. So, at the moment let's assume we are working with Local Dynpro projects and not DCs.
    2. The second problem we are facing involves from the first one: Since we are not working with DCs yet and since SAP doesn't support local Dynpro projects at the DTR, CBS, CMS even if I will develop such DC it will stay locally and I will be able to use it only from projects at my workspace, other developers won't be able to share it.
    So, at the moment, even if creating a portal service is not the best solution it is the only temporary solution I see right now, unless you have other suggestions...

Maybe you are looking for