VB.NETはべんりだなぁ

たったこんだけでレジストリの操作もできちゃうのか
http://dobon.net/vb/dotnet/system/registrykey.html

    Dim regkey As Microsoft.Win32.RegistryKey = _
        Microsoft.Win32.Registry.CurrentUser.CreateSubKey("Software\test\sub")

    'REG_EXPAND_SZで書き込む
    regkey.SetValue("ExpandString", "%windir%", _
        Microsoft.Win32.RegistryValueKind.ExpandString)

    '閉じる
    regkey.Close()