registry editing from vb.net help on how to do this?

i need help editing the registry because i want to change the regional time and maybe short date formats. i know a little about the registry but can someone show how to edit values in the registry from vb.net and shell the regedit program to backup the registry or another way from the commandline or from my program to back it up ( i think i may be able to shell the NTBACKUP program with the /b parameter but i want the old settings restored if theres a error). heres the registry keys i have from microsoft articles on how to do this: regional formats and settings for the currently logged on user: HKEY_CURRENT_USER/Control Panel/International, regional formats and settings if you want the defaults for all users: HKEY_USERS/.Default/Control Panel/International hive. i just want the current users time/short date settings changed if necessary and change them back when my program exits or load the settings from the reg file or make the backup override the new settings with the old my program just put in if i need to.
P.S.: i know the consquences if other programs depend on the default or other formats but i want to do it anyways ( my os to distribute to will be windows 2000 sp2 or later os's )
thanks for any help again,
jeffman the planner

Comments

  • : i need help editing the registry because i want to change the
    : regional time and maybe short date formats. i know a little about
    : the registry but can someone show how to edit values in the registry
    : from vb.net and shell the regedit program to backup the registry or
    : another way from the commandline or from my program to back it up (
    : i think i may be able to shell the NTBACKUP program with the /b
    : parameter but i want the old settings restored if theres a error).
    : heres the registry keys i have from microsoft articles on how to do
    : this: regional formats and settings for the currently logged on
    : user: HKEY_CURRENT_USER/Control Panel/International, regional
    : formats and settings if you want the defaults for all users:
    : HKEY_USERS/.Default/Control Panel/International hive. i just want
    : the current users time/short date settings changed if necessary and
    : change them back when my program exits or load the settings from the
    : reg file or make the backup override the new settings with the old
    : my program just put in if i need to.
    : P.S.: i know the consquences if other programs depend on the default
    : or other formats but i want to do it anyways ( my os to distribute
    : to will be windows 2000 sp2 or later os's )
    : thanks for any help again,
    : jeffman the planner

    Microsoft.Win32.Registry class, along with the RegistryKey class, are what you need.

    But a program should never do this. Backing up is ok, but a program shouldn't change the computer settings.

    Also, to furtherly make the changes take effect, I think it's appropriate to send a global message to windows indicating that the settings have changed.
    I forgot which API call was used, or even what the name of the global event was...

    Best Regards,
    Richard

    The way I see it... Well, it's all pretty blurry
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

In this Discussion