All Forums
 Microsoft Windows CE
 General CE
 Persisting ActiveSync Partnerships in the Registry
 Forum Locked  Topic Locked
 Send Topic to a Friend
 Printer Friendly
Author Topic  

KnowledgeBase

296 Posts

Posted - 21 Feb 2002 :  13:02:48  Show Profile  Email Poster
Q: Every time I reset my development system, I have to go through all the steps to create a Partnership again. Is there a way I can store the Partnership settings in the registry?

Yes. Follow this procedure:

1. Download the latest CE registry files from the CE developer's page (note the warnings if you do not have the Sharp LQ64D343 panel shipped with standard evaluation systems). You can also add the text in ActiveSync_Partnership_Reg.txt to your existing registry file, if you have one.

2. Establish an ActiveSync partnership with your desktop system.

3. Using \windows\regedit.exe on your ADS WinCE device. Open the "\HKLM\Software\Microsoft\Windows CE Services\Partners" key. You will see to search its registry for the keys "PName" and "PId".

4. Enter the values from those keys into your new ADSLOAD.REG file.

5. Update the ADSLOAD.REG file on your system with the changed file.

Now when you run "repllog" or "repllog /remote", the device will automatically create an ActiveSync partnership with the PC. This procedure is not necessary if you have a system with a working battery backup and never perform a hard (pushbutton) reset.


For more about ActiveSync on ADS products, see the ActiveSync topic index.

------------------
ADS Knowledge Base


Edited by akidder 21-Dec-2004: Correct HKCU to HKLM.

ljoy

22 Posts

Posted - 17 Sep 2007 :  11:11:29  Show Profile  Email Poster
#details
Q: How do I hard code ActiveSync partnership information into my Windows CE registry file, so that many identical devices can sync to the same PC?

A: This is an involved process, but when you finish, you will have a registry file that can be copied to many devices. In the registry file, each partnership key will have 3 entries, in the format shown:

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows CE Services\Partners\P1] ; or P2
"DataSourceID"="{00000000-0000-0000-0000-000000000000}"
"PName"="MyComputer" ; the name of the host PC
"PId"=dword:7E6C3646 ; partnership number







The first subkey, DataSourceID, is always the same.
The second subkey, PName, is the name of the host PC.
The third subkey, Pid, is the partnership number. It is a 8-digit hex number that is unique for each partnership, even when it is identical to another partnership. Every time a new partnership is set up, a new number is generated. Be sure to put the right number in the CE registry file.


Q: How do I find the name of the host PC?

A: On the PC, click Start | Settings | Control Panel | System | Computer Info tab (or right click "My Computer" on desktop)
Look at "Full Computer Name" and only use the part up to the first period. That goes in the CE registry file as the "PName" (e.g. if "mycomputer.mydomain.com" is listed, the computer name is "mycomputer")


Q: How do I find the partnership link number?

A: This is a little more complicated, involving the PC registry editor.
  1. Check for existing partnerships.
    • Start | Run | Regedit - this enters the PC's registry - do not change anything here!

    • Find the "Partners" folder. Open HKEY_CURRENT_USER\Software\Microsoft\Windows CE Services

    • Open the Partners folder (click the "+")

    • Note the folder names that are already there from previous partnerships. Exit the registry editor.


  2. Establish new partnership with your device.
    • Uncheck all Sync Options (Calendar, etc).

    • Check the box labelled "Synchronize mobile device upon connecting" (the most important thing of all).

    • Click "Settings" box and select the last box (no calendar sync), and click "OK".

    • Click Sync Mode tab. Select "Only upon connection" and click "OK".


  3. Repeat the Regedit procedure to find the new folder for the new partnership you just created.
    • Note the 8-digit hex number on this new folder. Exit the registry editor.

  4. Set the new partnership number in the CE registry file as "Pid".

Q: Now I have one partnership set up in my ADSLOAD.REG file as follows:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows CE Services\Partners\P1]
"DataSourceID"="{00000000-0000-0000-0000-000000000000}"
"PName"="MyComputer" ; the name of the host PC
"PId"=dword:7E6C3646 ; partnership number






What happens now?

A: Adding these entries to your adsload.reg file will create a partership with one PC. This is all you need to do to get many identical devices to sync to the same PC. (If you ever want to add a new partnership, you must tell Active Sync that the device should sync with 2 computers, and should not erase any existing partnerships.)
Go to Top of Page

ljoy

22 Posts

Posted - 18 Sep 2007 :  16:51:27  Show Profile  Email Poster
Q: What happens if I have 2 partnerships set up in my ADSLOAD.REG file as follows?

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows CE Services\Partners\P1]
"DataSourceID"="{00000000-0000-0000-0000-000000000000}"
"PName"="MyComputer" ; the name of the host PC
"PId"=dword:7E6C3646 ; partnership number

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows CE Services\Partners\P2]
"DataSourceID"="{00000000-0000-0000-0000-000000000000}"
"PName"="MyComputer" ; the name of the host PC
"PId"=dword:9876ABCD ; partnership number












A: Adding these entries to your adsload.reg file will create parterships with up to two different PCs. If you hard-code two partnerships, adding a fresh partnership will require you to erase one of the two existing partnerships. When you tell ActiveSync to sync with 2 computers, you will select which existing one to erase.


Q: How do I clear out partnership information?

A: Set up the key(s) as shown:

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows CE Services\Partners\P1] ; or P2
"DataSourceID"=""
"PName"=""
"PId"=dword:0

This is rarely done, because these entries in the adsload.reg file will require you to establish fresh partnerships every time you restart your CE device.
Go to Top of Page
  Topic  
 Forum Locked  Topic Locked
 Send Topic to a Friend
 Printer Friendly
Jump To:
Eurotech Support Forums © Eurotech Inc. Go To Top Of Page
This page was generated in 0.03 seconds. Snitz Forums 2000