All Forums
 Microsoft Windows CE
 CE Sample Applications and Utilities
 Help with ADSReg!
 Forum Locked
 Send Topic to a Friend
 Printer Friendly
Author Topic  

david

2 Posts

Posted - 02 Jan 2003 :  17:38:33  Show Profile  Email Poster
Can someone tell me how to get this util. to work????? Which directory does the .exe and the .reg file have to be in???

ctacke

877 Posts

Posted - 02 Jan 2003 :  19:59:25  Show Profile  Email Poster
David,

ADSReg.exe doesn't have to be in any particular directory. It simply takes a command-line parameter for the .reg file you want to parse.

As an example, if you had a .reg file called myreg.reg you wanted to parse and apply you could simply have both adsreg.exe and myreg.reg in the root folder then use the Start | Run command and enter this command line:

adsreg.exe /myreg.reg
Go to Top of Page

harpring

6 Posts

Posted - 29 Oct 2003 :  14:49:18  Show Profile  Email Poster
Here is the content of my *.reg file:

[HKEY_LOCAL_MACHINE\Explorer\RunHistory]
"2"="\Windows\repllog.exe /remote"
"1"="\Windows\restart.exe"
"0"="\Windows\repllog.exe"
[HKEY_LOCAL_MACHINE\nls\overrides]
"SDate"="/"
"IDate"=dword:00000000
"SSDte"="MM/dd/yyyy"
[HKEY_CURRENT_USER\ControlPanel\Comm]
"AutoCnct"=dword:00000001
"Cnct"="com3"

The first key works fine, the second one not at all and the third one sets the value to com, not com3.

What am I doing wrong?

Thanks,

Larry
Go to Top of Page

harpring

6 Posts

Posted - 29 Oct 2003 :  15:19:47  Show Profile  Email Poster
Let me clarify my last post:

I used the remote registry viewer and it appears that the registry values are being set. However, my desired effect is not happening. For the key:

[HKEY_LOCAL_MACHINE\nls\overrides]
"SDate"="/"
"IDate"=dword:00000000
"SSDte"="MM/dd/yyyy"

This is supposed to set the default format for the Short Date type, but it does not. I'm trying to achieve the effect of doing the following manually:

Start > Settings > Control Panel > Regional Settings > Date > Style > MM/dd/yyyy

The same goes for the last key:

[HKEY_CURRENT_USER\ControlPanel\Comm]
"AutoCnct"=dword:00000001
"Cnct"="com3"

It is set in the registry correctly, but does not set my default ActiveSync port to com3 the same as doing the following manually:

Start > Settings > Control Panel > Communications > PC Connection > Change Connection... > com3

How do I figure out what other registry entries must be made? Is there something obvious that I'm doing wrong?

Thanks,

Larry
Go to Top of Page

ctacke

877 Posts

Posted - 04 Nov 2003 :  10:18:58  Show Profile  Email Poster
When programmatically changing device settings, sometimes you must then notify the system that the change has occurred (things like the shell do not routinely poll for changes, as they are rare).

For the regional settings to take effect call the following:

PostMessage(HWND_BROADCAST, WM_WININICHANGE, 0, INI_INTL);

The connection settings do not require a notification to be sent. The control panel applet loads the registry info at startup and saves it when you click "OK". You can verify this by using regedit.exe on the device to modify or view the settings.
Go to Top of Page

harpring

6 Posts

Posted - 04 Nov 2003 :  13:12:25  Show Profile  Email Poster
Chris,

Thanks for your answer, but I was not really looking for a programatic way to do this. Is there a way to do it via ADSReg? If not, could ADSReg be modified to do this? It seems out of place for me to have to include the above code in my application or a seperate application just to set up Windows CE.

By the way, the connection setting does not work either. They show up correctly in the registry, but the control panel default value is set to "com" instead of "com3". So, I guess I need to do a Post Message for this one too. What would be the change in the command for this?

Larry
Go to Top of Page

ctacke

877 Posts

Posted - 04 Nov 2003 :  13:50:25  Show Profile  Email Poster
You can add the notification code above to the ADSReg source yourself since the source is posted or have another EXE that you run at startup, maybe in conjuction with ADSCopy.

As for the registry setting for the connection, I verified that there is no call necessary and that the value in the registry is what shows up in the Control Panel applet. Try modifying the value using regedit and see if it changes the value shown in the Control Panel.
Go to Top of Page

harpring

6 Posts

Posted - 04 Nov 2003 :  14:12:06  Show Profile  Email Poster
I tried the remote Registry Editor and indeed the Connection Control Panel did show what I changed the com port to.

Then I remembered that I did not add a CR LF after com3 in my .reg file. After adding the CR LF, the connection is now set correctly.

Now, I look into add the post message to ADSReg or my app.

Thanks!
Go to Top of Page

harpring

6 Posts

Posted - 04 Nov 2003 :  15:00:20  Show Profile  Email Poster
I added the following code to my eVB app and it did not update the Regional Setting info in the control panel applet:

In a .bas I added:

Public Declare Function PostMessage Lib "Coredll" Alias "PostMessageW"
(ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, ByVal lParam As Long) As Long

'PostMessage Constants
Public Const WM_WININICHANGE = &H1A&
Public Const HWND_BROADCAST = &HFFFF&
Public Const INI_INTL = &H1&

And in the start up Form_Load I added:

PostMessage HWND_BROADCAST, WM_WININICHANGE, 0, INI_INTL

Do you have any idea why?

Go to Top of Page

harpring

6 Posts

Posted - 04 Nov 2003 :  15:14:33  Show Profile  Email Poster
I modified the PostMessage command to:

Dim lngReturn As Long
lngReturn = PostMessage(HWND_BROADCAST, WM_WININICHANGE, 0, INI_INTL)

and after execution lngReturn=1.

According to the documentation, a non-zero value indicates success. So, it seems to be executing correctly, but it has no effect.
Go to Top of Page
  Topic  
 Forum 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