Binären Reg Key schreiben Problem

  • VB.NET
  • .NET 4.5

Es gibt 16 Antworten in diesem Thema. Der letzte Beitrag () ist von Blackn0va.

    Binären Reg Key schreiben Problem

    Gute Tag allerseits,


    ich versuche seit einiger Zeit einen RegKey zu setzen, soweit auch kein Problem, doch er soll Binär sein.

    Ich habe den Binären wert in HEX (warum auch immer, und diesen Wert möchte ich in die Registry schreiben mit:

    Spoiler anzeigen

    Quellcode

    1. ​ Dim FavoritesResoveKey() As Byte = System.Text.Encoding.ASCII.GetBytes("08,03,00,00,4c,00,00,00,01,14,02,00,00,00,00,00,c0,00,\
    2. 00,00,00,00,00,46,83,00,80,00,20,00,00,00,95,81,24,ad,80,6a,d3,01,95,81,24,\
    3. ad,80,6a,d3,01,8f,e0,a7,80,4d,f6,d2,01,ac,09,00,00,00,00,00,00,01,00,00,00,\
    4. 00,00,00,00,00,00,00,00,00,00,00,00,6e,01,3a,00,1f,80,c8,27,34,1f,10,5c,10,\
    5. 42,aa,03,2e,e4,52,87,d6,68,26,00,01,00,26,00,ef,be,12,00,00,00,b7,f3,55,31,\
    6. 7e,6a,d3,01,40,e0,d3,35,7e,6a,d3,01,40,e0,d3,35,7e,6a,d3,01,14,00,56,00,31,\
    7. 00,00,00,00,00,81,4b,a1,45,11,00,54,61,73,6b,42,61,72,00,40,00,09,00,04,00,\
    8. ef,be,81,4b,6c,43,81,4b,a1,45,2e,00,00,00,79,3c,01,00,00,00,07,00,00,00,00,\
    9. 00,00,00,00,00,00,00,00,00,00,00,6b,79,2c,00,54,00,61,00,73,00,6b,00,42,00,\
    10. 61,00,72,00,00,00,16,00,dc,00,32,00,ac,09,00,00,e6,4a,ce,5d,20,00,4f,55,54,\
    11. 4c,4f,4f,7e,31,2e,4c,4e,4b,00,00,52,00,09,00,04,00,ef,be,81,4b,a1,45,81,4b,\
    12. a1,45,2e,00,00,00,c5,38,01,00,00,00,0e,00,00,00,00,00,00,00,00,00,00,00,00,\
    13. 00,00,00,71,e1,15,00,4f,00,75,00,74,00,6c,00,6f,00,6f,00,6b,00,20,00,32,00,\
    14. 30,00,31,00,36,00,2e,00,6c,00,6e,00,6b,00,00,00,1c,00,22,00,00,00,1e,00,ef,\
    15. be,02,00,55,00,73,00,65,00,72,00,50,00,69,00,6e,00,6e,00,65,00,64,00,00,00,\
    16. 1c,00,4c,00,00,00,1d,00,ef,be,02,00,4d,00,69,00,63,00,72,00,6f,00,73,00,6f,\
    17. 00,66,00,74,00,2e,00,4f,00,66,00,66,00,69,00,63,00,65,00,2e,00,4f,00,55,00,\
    18. 54,00,4c,00,4f,00,4f,00,4b,00,2e,00,45,00,58,00,45,00,2e,00,31,00,35,00,00,\
    19. 00,1c,00,00,00,a3,00,00,00,1c,00,00,00,01,00,00,00,1c,00,00,00,34,00,00,00,\
    20. 00,00,00,00,a2,00,00,00,18,00,00,00,03,00,00,00,e5,fc,85,ea,10,00,00,00,57,\
    21. 69,6e,64,6f,77,73,00,43,3a,5c,55,73,65,72,73,5c,62,2e,77,61,6c,64,5c,41,70,\
    22. 70,44,61,74,61,5c,52,6f,61,6d,69,6e,67,5c,4d,69,63,72,6f,73,6f,66,74,5c,49,\
    23. 6e,74,65,72,6e,65,74,20,45,78,70,6c,6f,72,65,72,5c,51,75,69,63,6b,20,4c,61,\
    24. 75,6e,63,68,5c,55,73,65,72,20,50,69,6e,6e,65,64,5c,54,61,73,6b,42,61,72,5c,\
    25. 4f,75,74,6c,6f,6f,6b,20,32,30,31,36,2e,6c,6e,6b,00,00,60,00,00,00,03,00,00,\
    26. a0,58,00,00,00,00,00,00,00,74,68,69,6e,6b,70,61,64,2d,30,30,31,00,00,00,00,\
    27. 3c,31,a9,83,e8,04,62,42,bb,bb,87,c0,08,15,a7,23,71,53,c6,78,71,d6,e7,11,84,\
    28. 31,54,e1,ad,08,b8,a9,3c,31,a9,83,e8,04,62,42,bb,bb,87,c0,08,15,a7,23,71,53,\
    29. c6,78,71,d6,e7,11,84,31,54,e1,ad,08,b8,a9,45,00,00,00,09,00,00,a0,39,00,00,\
    30. 00,31,53,50,53,b1,16,6d,44,ad,8d,70,48,a7,48,40,2e,a4,3d,78,8c,1d,00,00,00,\
    31. 68,00,00,00,00,48,00,00,00,3c,61,67,3f,40,c1,02,44,a5,3f,d6,c1,1c,65,b2,34,\
    32. 00,00,00,00,00,00,00,00,00,00,00,00,ff,02,00,00,4c,00,00,00,01,14,02,00,00,\
    33. 00,00,00,c0,00,00,00,00,00,00,46,83,00,80,00,20,00,00,00,e3,25,7f,8c,72,b0,\
    34. d3,01,e3,25,7f,8c,72,b0,d3,01,93,4d,ae,80,4d,f6,d2,01,1e,0a,00,00,00,00,00,\
    35. 00,01,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,68,01,3a,00,1f,80,c8,27,\
    36. 34,1f,10,5c,10,42,aa,03,2e,e4,52,87,d6,68,26,00,01,00,26,00,ef,be,12,00,00,\
    37. 00,b7,f3,55,31,7e,6a,d3,01,40,e0,d3,35,7e,6a,d3,01,40,e0,d3,35,7e,6a,d3,01,\
    38. 14,00,56,00,31,00,00,00,00,00,5c,4c,01,48,11,00,54,61,73,6b,42,61,72,00,40,\
    39. 00,09,00,04,00,ef,be,81,4b,6c,43,5c,4c,01,48,2e,00,00,00,79,3c,01,00,00,00,\
    40. 07,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,33,c5,d7,00,54,00,61,00,73,\
    41. 00,6b,00,42,00,61,00,72,00,00,00,16,00,d6,00,32,00,1e,0a,00,00,e6,4a,ce,5d,\
    42. 20,00,57,4f,52,44,32,30,7e,31,2e,4c,4e,4b,00,00,4c,00,09,00,04,00,ef,be,5c,\
    43. 4c,08,48,5c,4c,08,48,2e,00,00,00,cc,b7,02,00,00,00,0a,00,00,00,00,00,00,00,\
    44. 00,00,00,00,00,00,00,00,6d,74,0f,00,57,00,6f,00,72,00,64,00,20,00,32,00,30,\
    45. 00,31,00,36,00,2e,00,6c,00,6e,00,6b,00,00,00,1c,00,22,00,00,00,1e,00,ef,be,\
    46. 02,00,55,00,73,00,65,00,72,00,50,00,69,00,6e,00,6e,00,65,00,64,00,00,00,1c,\
    47. 00,4c,00,00,00,1d,00,ef,be,02,00,4d,00,69,00,63,00,72,00,6f,00,73,00,6f,00,\
    48. 66,00,74,00,2e,00,4f,00,66,00,66,00,69,00,63,00,65,00,2e,00,57,00,49,00,4e,\
    49. 00,57,00,4f,00,52,00,44,00,2e,00,45,00,58,00,45,00,2e,00,31,00,35,00,00,00,\
    50. 1c,00,00,00,a0,00,00,00,1c,00,00,00,01,00,00,00,1c,00,00,00,34,00,00,00,00,\
    51. 00,00,00,9f,00,00,00,18,00,00,00,03,00,00,00,e5,fc,85,ea,10,00,00,00,57,69,\
    52. 6e,64,6f,77,73,00,43,3a,5c,55,73,65,72,73,5c,62,2e,77,61,6c,64,5c,41,70,70,\
    53. 44,61,74,61,5c,52,6f,61,6d,69,6e,67,5c,4d,69,63,72,6f,73,6f,66,74,5c,49,6e,\
    54. 74,65,72,6e,65,74,20,45,78,70,6c,6f,72,65,72,5c,51,75,69,63,6b,20,4c,61,75,\
    55. 6e,63,68,5c,55,73,65,72,20,50,69,6e,6e,65,64,5c,54,61,73,6b,42,61,72,5c,57,\
    56. 6f,72,64,20,32,30,31,36,2e,6c,6e,6b,00,00,60,00,00,00,03,00,00,a0,58,00,00,\
    57. 00,00,00,00,00,74,68,69,6e,6b,70,61,64,2d,30,30,31,00,00,00,00,3c,31,a9,83,\
    58. e8,04,62,42,bb,bb,87,c0,08,15,a7,23,ba,5b,d9,56,d0,1b,e8,11,84,6a,54,e1,ad,\
    59. 08,b8,a9,3c,31,a9,83,e8,04,62,42,bb,bb,87,c0,08,15,a7,23,ba,5b,d9,56,d0,1b,\
    60. e8,11,84,6a,54,e1,ad,08,b8,a9,45,00,00,00,09,00,00,a0,39,00,00,00,31,53,50,\
    61. 53,b1,16,6d,44,ad,8d,70,48,a7,48,40,2e,a4,3d,78,8c,1d,00,00,00,68,00,00,00,\
    62. 00,48,00,00,00,3c,61,67,3f,40,c1,02,44,a5,3f,d6,c1,1c,65,b2,34,00,00,00,00,\
    63. 00,00,00,00,00,00,00,00,fe,02,00,00,4c,00,00,00,01,14,02,00,00,00,00,00,c0,\
    64. 00,00,00,00,00,00,46,83,00,80,00,20,00,00,00,ca,87,43,8e,72,b0,d3,01,ca,87,\
    65. 43,8e,72,b0,d3,01,9a,b9,8b,80,4d,f6,d2,01,1a,0a,00,00,00,00,00,00,01,00,00,\
    66. 00,00,00,00,00,00,00,00,00,00,00,00,00,66,01,3a,00,1f,80,c8,27,34,1f,10,5c,\
    67. 10,42,aa,03,2e,e4,52,87,d6,68,26,00,01,00,26,00,ef,be,12,00,00,00,b7,f3,55,\
    68. 31,7e,6a,d3,01,40,e0,d3,35,7e,6a,d3,01,40,e0,d3,35,7e,6a,d3,01,14,00,56,00,\
    69. 31,00,00,00,00,00,5c,4c,08,48,11,00,54,61,73,6b,42,61,72,00,40,00,09,00,04,\
    70. 00,ef,be,81,4b,6c,43,5c,4c,08,48,2e,00,00,00,79,3c,01,00,00,00,07,00,00,00,\
    71. 00,00,00,00,00,00,00,00,00,00,00,00,1d,ea,5e,00,54,00,61,00,73,00,6b,00,42,\
    72. 00,61,00,72,00,00,00,16,00,d4,00,32,00,1a,0a,00,00,e6,4a,ce,5d,20,00,45,58,\
    73. 43,45,4c,32,7e,31,2e,4c,4e,4b,00,00,4e,00,09,00,04,00,ef,be,5c,4c,0a,48,5c,\
    74. 4c,0a,48,2e,00,00,00,c2,b7,02,00,00,00,0d,00,00,00,00,00,00,00,00,00,00,00,\
    75. 00,00,00,00,66,08,32,00,45,00,78,00,63,00,65,00,6c,00,20,00,32,00,30,00,31,\
    76. 00,36,00,2e,00,6c,00,6e,00,6b,00,00,00,1c,00,22,00,00,00,1e,00,ef,be,02,00,\
    77. 55,00,73,00,65,00,72,00,50,00,69,00,6e,00,6e,00,65,00,64,00,00,00,1c,00,48,\
    78. 00,00,00,1d,00,ef,be,02,00,4d,00,69,00,63,00,72,00,6f,00,73,00,6f,00,66,00,\
    79. 74,00,2e,00,4f,00,66,00,66,00,69,00,63,00,65,00,2e,00,45,00,58,00,43,00,45,\
    80. 00,4c,00,2e,00,45,00,58,00,45,00,2e,00,31,00,35,00,00,00,1c,00,00,00,a1,00,\
    81. 00,00,1c,00,00,00,01,00,00,00,1c,00,00,00,34,00,00,00,00,00,00,00,a0,00,00,\
    82. 00,18,00,00,00,03,00,00,00,e5,fc,85,ea,10,00,00,00,57,69,6e,64,6f,77,73,00,\
    83. 43,3a,5c,55,73,65,72,73,5c,62,2e,77,61,6c,64,5c,41,70,70,44,61,74,61,5c,52,\
    84. 6f,61,6d,69,6e,67,5c,4d,69,63,72,6f,73,6f,66,74,5c,49,6e,74,65,72,6e,65,74,\
    85. 20,45,78,70,6c,6f,72,65,72,5c,51,75,69,63,6b,20,4c,61,75,6e,63,68,5c,55,73,\
    86. 65,72,20,50,69,6e,6e,65,64,5c,54,61,73,6b,42,61,72,5c,45,78,63,65,6c,20,32,\
    87. 30,31,36,2e,6c,6e,6b,00,00,60,00,00,00,03,00,00,a0,58,00,00,00,00,00,00,00,\
    88. 74,68,69,6e,6b,70,61,64,2d,30,30,31,00,00,00,00,3c,31,a9,83,e8,04,62,42,bb,\
    89. bb,87,c0,08,15,a7,23,bb,5b,d9,56,d0,1b,e8,11,84,6a,54,e1,ad,08,b8,a9,3c,31,\
    90. a9,83,e8,04,62,42,bb,bb,87,c0,08,15,a7,23,bb,5b,d9,56,d0,1b,e8,11,84,6a,54,\
    91. e1,ad,08,b8,a9,45,00,00,00,09,00,00,a0,39,00,00,00,31,53,50,53,b1,16,6d,44,\
    92. ad,8d,70,48,a7,48,40,2e,a4,3d,78,8c,1d,00,00,00,68,00,00,00,00,48,00,00,00,\
    93. 3c,61,67,3f,40,c1,02,44,a5,3f,d6,c1,1c,65,b2,34,00,00,00,00,00,00,00,00,00,\
    94. 00,00,00,d9,02,00,00,4c,00,00,00,01,14,02,00,00,00,00,00,c0,00,00,00,00,00,\
    95. 00,46,83,00,80,00,20,00,00,00,eb,d5,bb,87,9b,6e,d3,01,eb,d5,bb,87,9b,6e,d3,\
    96. 01,4b,93,f4,8e,fd,5d,d3,01,df,08,00,00,00,00,00,00,01,00,00,00,00,00,00,00,\
    97. 00,00,00,00,00,00,00,00,3e,01,3a,00,1f,80,c8,27,34,1f,10,5c,10,42,aa,03,2e,\
    98. e4,52,87,d6,68,26,00,01,00,26,00,ef,be,12,00,00,00,b7,f3,55,31,7e,6a,d3,01,\
    99. 40,e0,d3,35,7e,6a,d3,01,40,e0,d3,35,7e,6a,d3,01,14,00,56,00,31,00,00,00,00,\
    100. 00,86,4b,eb,70,11,00,54,61,73,6b,42,61,72,00,40,00,09,00,04,00,ef,be,81,4b,\
    101. 6c,43,86,4b,eb,70,2e,00,00,00,79,3c,01,00,00,00,07,00,00,00,00,00,00,00,00,\
    102. 00,00,00,00,00,00,00,15,b3,2f,01,54,00,61,00,73,00,6b,00,42,00,61,00,72,00,\
    103. 00,00,16,00,ac,00,32,00,df,08,00,00,6f,4b,87,54,20,00,47,4f,4f,47,4c,45,7e,\
    104. 31,2e,4c,4e,4b,00,00,54,00,09,00,04,00,ef,be,86,4b,eb,70,86,4b,eb,70,2e,00,\
    105. 00,00,f9,e3,00,00,00,00,19,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,b5,\
    106. cf,92,00,47,00,6f,00,6f,00,67,00,6c,00,65,00,20,00,43,00,68,00,72,00,6f,00,\
    107. 6d,00,65,00,2e,00,6c,00,6e,00,6b,00,00,00,1c,00,22,00,00,00,1e,00,ef,be,02,\
    108. 00,55,00,73,00,65,00,72,00,50,00,69,00,6e,00,6e,00,65,00,64,00,00,00,1c,00,\
    109. 1a,00,00,00,1d,00,ef,be,02,00,43,00,68,00,72,00,6f,00,6d,00,65,00,00,00,1c,\
    110. 00,00,00,a4,00,00,00,1c,00,00,00,01,00,00,00,1c,00,00,00,34,00,00,00,00,00,\
    111. 00,00,a3,00,00,00,18,00,00,00,03,00,00,00,e5,fc,85,ea,10,00,00,00,57,69,6e,\
    112. 64,6f,77,73,00,43,3a,5c,55,73,65,72,73,5c,62,2e,77,61,6c,64,5c,41,70,70,44,\
    113. 61,74,61,5c,52,6f,61,6d,69,6e,67,5c,4d,69,63,72,6f,73,6f,66,74,5c,49,6e,74,\
    114. 65,72,6e,65,74,20,45,78,70,6c,6f,72,65,72,5c,51,75,69,63,6b,20,4c,61,75,6e,\
    115. 63,68,5c,55,73,65,72,20,50,69,6e,6e,65,64,5c,54,61,73,6b,42,61,72,5c,47,6f,\
    116. 6f,67,6c,65,20,43,68,72,6f,6d,65,2e,6c,6e,6b,00,00,60,00,00,00,03,00,00,a0,\
    117. 58,00,00,00,00,00,00,00,74,68,69,6e,6b,70,61,64,2d,30,30,31,00,00,00,00,3c,\
    118. 31,a9,83,e8,04,62,42,bb,bb,87,c0,08,15,a7,23,b4,96,41,14,57,da,e7,11,84,33,\
    119. 54,e1,ad,08,b8,a9,3c,31,a9,83,e8,04,62,42,bb,bb,87,c0,08,15,a7,23,b4,96,41,\
    120. 14,57,da,e7,11,84,33,54,e1,ad,08,b8,a9,45,00,00,00,09,00,00,a0,39,00,00,00,\
    121. 31,53,50,53,b1,16,6d,44,ad,8d,70,48,a7,48,40,2e,a4,3d,78,8c,1d,00,00,00,68,\
    122. 00,00,00,00,48,00,00,00,3c,61,67,3f,40,c1,02,44,a5,3f,d6,c1,1c,65,b2,34,00,\
    123. 00,00,00,00,00,00,00,00,00,00,00,01,03,00,00,4c,00,00,00,01,14,02,00,00,00,\
    124. 00,00,c0,00,00,00,00,00,00,46,83,00,80,00,20,00,00,00,2d,f2,94,6d,50,9e,d3,\
    125. 01,2d,f2,94,6d,50,9e,d3,01,fc,ad,80,6e,82,3e,d3,01,3c,08,00,00,00,00,00,00,\
    126. 01,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,6c,01,3a,00,1f,80,c8,27,34,\
    127. 1f,10,5c,10,42,aa,03,2e,e4,52,87,d6,68,26,00,01,00,26,00,ef,be,12,00,00,00,\
    128. b7,f3,55,31,7e,6a,d3,01,40,e0,d3,35,7e,6a,d3,01,40,e0,d3,35,7e,6a,d3,01,14,\
    129. 00,56,00,31,00,00,00,00,00,45,4c,54,39,11,00,54,61,73,6b,42,61,72,00,40,00,\
    130. 09,00,04,00,ef,be,81,4b,6c,43,45,4c,54,39,2e,00,00,00,79,3c,01,00,00,00,07,\
    131. 00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,d3,e5,2e,00,54,00,61,00,73,00,\
    132. 6b,00,42,00,61,00,72,00,00,00,16,00,da,00,32,00,3c,08,00,00,46,4b,d7,48,20,\
    133. 00,53,77,79,78,49,74,21,2e,6c,6e,6b,00,48,00,09,00,04,00,ef,be,45,4c,54,39,\
    134. 45,4c,54,39,2e,00,00,00,94,4c,00,00,00,00,4b,00,00,00,00,00,00,00,00,00,00,\
    135. 00,00,00,00,00,04,e9,ec,00,53,00,77,00,79,00,78,00,49,00,74,00,21,00,2e,00,\
    136. 6c,00,6e,00,6b,00,00,00,1a,00,22,00,00,00,1e,00,ef,be,02,00,55,00,73,00,65,\
    137. 00,72,00,50,00,69,00,6e,00,6e,00,65,00,64,00,00,00,1a,00,56,00,00,00,1d,00,\
    138. ef,be,02,00,46,00,38,00,45,00,35,00,35,00,35,00,46,00,39,00,2d,00,34,00,43,\
    139. 00,30,00,30,00,2d,00,31,00,31,00,44,00,33,00,2d,00,38,00,30,00,42,00,43,00,\
    140. 2d,00,30,00,30,00,31,00,30,00,35,00,41,00,36,00,35,00,33,00,33,00,37,00,39,\
    141. 00,00,00,1a,00,00,00,9e,00,00,00,1c,00,00,00,01,00,00,00,1c,00,00,00,34,00,\
    142. 00,00,00,00,00,00,9d,00,00,00,18,00,00,00,03,00,00,00,e5,fc,85,ea,10,00,00,\
    143. 00,57,69,6e,64,6f,77,73,00,43,3a,5c,55,73,65,72,73,5c,62,2e,77,61,6c,64,5c,\
    144. 41,70,70,44,61,74,61,5c,52,6f,61,6d,69,6e,67,5c,4d,69,63,72,6f,73,6f,66,74,\
    145. 5c,49,6e,74,65,72,6e,65,74,20,45,78,70,6c,6f,72,65,72,5c,51,75,69,63,6b,20,\
    146. 4c,61,75,6e,63,68,5c,55,73,65,72,20,50,69,6e,6e,65,64,5c,54,61,73,6b,42,61,\
    147. 72,5c,53,77,79,78,49,74,21,2e,6c,6e,6b,00,00,60,00,00,00,03,00,00,a0,58,00,\
    148. 00,00,00,00,00,00,74,68,69,6e,6b,70,61,64,2d,30,30,31,00,00,00,00,3c,31,a9,\
    149. 83,e8,04,62,42,bb,bb,87,c0,08,15,a7,23,b6,18,b2,73,43,0a,e8,11,84,62,54,e1,\
    150. ad,08,b8,a9,3c,31,a9,83,e8,04,62,42,bb,bb,87,c0,08,15,a7,23,b6,18,b2,73,43,\
    151. 0a,e8,11,84,62,54,e1,ad,08,b8,a9,45,00,00,00,09,00,00,a0,39,00,00,00,31,53,\
    152. 50,53,b1,16,6d,44,ad,8d,70,48,a7,48,40,2e,a4,3d,78,8c,1d,00,00,00,68,00,00,\
    153. 00,00,48,00,00,00,3c,61,67,3f,40,c1,02,44,a5,3f,d6,c1,1c,65,b2,34,00,00,00,\
    154. 00,00,00,00,00,00,00,00,00,13,03,00,00,4c,00,00,00,01,14,02,00,00,00,00,00,\
    155. c0,00,00,00,00,00,00,46,83,00,80,00,20,00,00,00,20,e3,d5,da,85,b4,d3,01,20,\
    156. e3,d5,da,85,b4,d3,01,7d,18,a9,80,4d,f6,d2,01,05,0a,00,00,00,00,00,00,01,00,\
    157. 00,00,00,00,00,00,00,00,00,00,00,00,00,00,76,01,3a,00,1f,80,c8,27,34,1f,10,\
    158. 5c,10,42,aa,03,2e,e4,52,87,d6,68,26,00,01,00,26,00,ef,be,12,00,00,00,b7,f3,\
    159. 55,31,7e,6a,d3,01,40,e0,d3,35,7e,6a,d3,01,40,e0,d3,35,7e,6a,d3,01,14,00,56,\
    160. 00,31,00,00,00,00,00,65,4c,70,6a,11,00,54,61,73,6b,42,61,72,00,40,00,09,00,\
    161. 04,00,ef,be,81,4b,6c,43,65,4c,70,6a,2e,00,00,00,79,3c,01,00,00,00,07,00,00,\
    162. 00,00,00,00,00,00,00,00,00,00,00,00,00,25,01,bf,00,54,00,61,00,73,00,6b,00,\
    163. 42,00,61,00,72,00,00,00,16,00,e4,00,32,00,05,0a,00,00,e6,4a,ce,5d,20,00,50,\
    164. 4f,57,45,52,50,7e,31,2e,4c,4e,4b,00,00,58,00,09,00,04,00,ef,be,65,4c,90,6b,\
    165. 65,4c,90,6b,2e,00,00,00,59,e9,00,00,00,00,e6,00,00,00,00,00,00,00,00,00,00,\
    166. 00,00,00,00,00,83,a9,14,00,50,00,6f,00,77,00,65,00,72,00,50,00,6f,00,69,00,\
    167. 6e,00,74,00,20,00,32,00,30,00,31,00,36,00,2e,00,6c,00,6e,00,6b,00,00,00,1c,\
    168. 00,22,00,00,00,1e,00,ef,be,02,00,55,00,73,00,65,00,72,00,50,00,69,00,6e,00,\
    169. 6e,00,65,00,64,00,00,00,1c,00,4e,00,00,00,1d,00,ef,be,02,00,4d,00,69,00,63,\
    170. 00,72,00,6f,00,73,00,6f,00,66,00,74,00,2e,00,4f,00,66,00,66,00,69,00,63,00,\
    171. 65,00,2e,00,50,00,4f,00,57,00,45,00,52,00,50,00,4e,00,54,00,2e,00,45,00,58,\
    172. 00,45,00,2e,00,31,00,35,00,00,00,1c,00,00,00,a6,00,00,00,1c,00,00,00,01,00,\
    173. 00,00,1c,00,00,00,34,00,00,00,00,00,00,00,a5,00,00,00,18,00,00,00,03,00,00,\
    174. 00,e5,fc,85,ea,10,00,00,00,57,69,6e,64,6f,77,73,00,43,3a,5c,55,73,65,72,73,\
    175. 5c,62,2e,77,61,6c,64,5c,41,70,70,44,61,74,61,5c,52,6f,61,6d,69,6e,67,5c,4d,\
    176. 69,63,72,6f,73,6f,66,74,5c,49,6e,74,65,72,6e,65,74,20,45,78,70,6c,6f,72,65,\
    177. 72,5c,51,75,69,63,6b,20,4c,61,75,6e,63,68,5c,55,73,65,72,20,50,69,6e,6e,65,\
    178. 64,5c,54,61,73,6b,42,61,72,5c,50,6f,77,65,72,50,6f,69,6e,74,20,32,30,31,36,\
    179. 2e,6c,6e,6b,00,00,60,00,00,00,03,00,00,a0,58,00,00,00,00,00,00,00,74,68,69,\
    180. 6e,6b,70,61,64,2d,30,30,31,00,00,00,00,3c,31,a9,83,e8,04,62,42,bb,bb,87,c0,\
    181. 08,15,a7,23,af,94,01,4c,73,20,e8,11,84,6c,54,e1,ad,08,b8,a9,3c,31,a9,83,e8,\
    182. 04,62,42,bb,bb,87,c0,08,15,a7,23,af,94,01,4c,73,20,e8,11,84,6c,54,e1,ad,08,\
    183. b8,a9,45,00,00,00,09,00,00,a0,39,00,00,00,31,53,50,53,b1,16,6d,44,ad,8d,70,\
    184. 48,a7,48,40,2e,a4,3d,78,8c,1d,00,00,00,68,00,00,00,00,48,00,00,00,3c,61,67,\
    185. 3f,40,c1,02,44,a5,3f,d6,c1,1c,65,b2,34,00,00,00,00,00,00,00,00,00,00,00,00")
    186. 'Key Setzen *
    187. My.Computer.Registry.SetValue("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Taskband", "Favorites", FavoritesResoveKey, Microsoft.Win32.RegistryValueKind.Binary)



    Es wird Zwar ein Binärer Schlüssel erzeugt, doch der Hex wert wird noch einmal in Binär Konvertiert. Anders bekomme ich es nicht hin, Strings werden nicht akzeptiert.

    Hat jemand eine Idee?

    Also aus dem wer oo,63 usw wird 101100110 ..
    Zur Info: Mit deinem Code funktioniert der vbnet-BBCode nicht, habe daraus "code" gemacht.
    Besucht auch mein anderes Forum:
    Das Amateurfilm-Forum
    @Blackn0va Zunächst solltest Du die Probleme trennen.
    • Wie erzeuge ich ein Byte-Array aus numerischen Werten:

      VB.NET-Quellcode

      1. Dim FavoritesResoveKey() As Byte = {&H8, &H3, &H0, &H0, &H4C, &H0, &H0, &H0, &H1, &H14, &H2, &H0, &H0, &H0, &H0, &H0, &HC0, &H0}

    • Wie schreibe ich einen Binärwert in die Registry:
      msdn.microsoft.com/de-de/library/k23f0345(v=vs.110).aspx

      VB.NET-Quellcode

      1. Imports Microsoft.Win32
      2. '--------------------
      3. Dim FavoritesResoveKey() As Byte = {&H8, &H3, &H0, &H0, &H4C, &H0, &H0, &H0, &H1, &H14, &H2, &H0, &H0, &H0, &H0, &H0, &HC0, &H0}
      4. Dim keyName = "Software\Microsoft\Windows\CurrentVersion\Explorer\Taskband"
      5. Dim key As RegistryKey = Registry.CurrentUser.OpenSubKey(keyName, True)
      6. key.SetValue("Favorites2", FavoritesResoveKey, RegistryValueKind.Binary)
      Ich hab einen anderen Namen genommen, um den vorhandenen Schlüssel nicht zu überschreiben.
    Falls Du diesen Code kopierst, achte auf die C&P-Bremse.
    Jede einzelne Zeile Deines Programms, die Du nicht explizit getestet hast, ist falsch :!:
    Ein guter .NET-Snippetkonverter (der ist verfügbar).
    VB-Fragen über PN / Konversation werden ignoriert!

    Blackn0va schrieb:

    VB.NET-Quellcode

    1. System.Text.Encoding.ASCII.GetBytes("08,03,00,00,4c,00,00,00,01,14,
    2. ...

    Und warum geht das nicht? Ganz einfach: Du machst aus einem String ein Byte-Array. Also "0" wird zu 48, "8" wird zu 56, "," wird zu 44, "0" wird zu 48, "3" wird zu 51, und so weiter.

    Denkfehler erkannt?
    Weltherrschaft erlangen: 1%
    Ist dein Problem erledigt? -> Dann markiere das Thema bitte entsprechend.
    Waren Beiträge dieser Diskussion dabei hilfreich? -> Dann klick dort jeweils auf den Hilfreich-Button.
    Danke.
    Oh okay, ja erkannt, bedeutet das ich aus einem vermeintlichem Byte Array noch einmal Bytes Convertiert werden.. ich hab das jetzt etwas anders gelöst. Ich habe die reg File als Ressource aufgenommen, diese wird zur Laufzeit in den temp Ordner geschrieben und ausgeführt.
    Danke für den Stubser :)!


    Was ich halt nicht verstehe ist, ich habe ja den Binären wert aus der Registry Kopiert, dieser sollte auf einer 2. Maschine Deployt werden.
    Wenn ich von Haus aus ein Byte Array nehme funktionuiert es nicht, eben nur wenn ich das ByteArray noch einmal Konvertiere, wie also könnte ich diesen wert in die registry setzen?

    Spoiler anzeigen

    Quellcode

    1. ​00,6e,01,00,00,3a,00,1f,80,c8,27,34,1f,10,5c,10,42,aa,03,2e,e4,\
    2. 52,87,d6,68,26,00,01,00,26,00,ef,be,12,00,00,00,b7,f3,55,31,7e,6a,d3,01,40,\
    3. e0,d3,35,7e,6a,d3,01,40,e0,d3,35,7e,6a,d3,01,14,00,56,00,31,00,00,00,00,00,\
    4. 81,4b,a1,45,11,00,54,61,73,6b,42,61,72,00,40,00,09,00,04,00,ef,be,81,4b,6c,\
    5. 43,81,4b,a1,45,2e,00,00,00,79,3c,01,00,00,00,07,00,00,00,00,00,00,00,00,00,\
    6. 00,00,00,00,00,00,6b,79,2c,00,54,00,61,00,73,00,6b,00,42,00,61,00,72,00,00,\
    7. 00,16,00,dc,00,32,00,ac,09,00,00,e6,4a,ce,5d,20,00,4f,55,54,4c,4f,4f,7e,31,\
    8. 2e,4c,4e,4b,00,00,52,00,09,00,04,00,ef,be,81,4b,a1,45,81,4b,a1,45,2e,00,00,\
    9. 00,c5,38,01,00,00,00,0e,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,71,e1,\
    10. 15,00,4f,00,75,00,74,00,6c,00,6f,00,6f,00,6b,00,20,00,32,00,30,00,31,00,36,\
    11. 00,2e,00,6c,00,6e,00,6b,00,00,00,1c,00,22,00,00,00,1e,00,ef,be,02,00,55,00,\
    12. 73,00,65,00,72,00,50,00,69,00,6e,00,6e,00,65,00,64,00,00,00,1c,00,4c,00,00,\
    13. 00,1d,00,ef,be,02,00,4d,00,69,00,63,00,72,00,6f,00,73,00,6f,00,66,00,74,00,\
    14. 2e,00,4f,00,66,00,66,00,69,00,63,00,65,00,2e,00,4f,00,55,00,54,00,4c,00,4f,\
    15. 00,4f,00,4b,00,2e,00,45,00,58,00,45,00,2e,00,31,00,35,00,00,00,1c,00,00,00,\
    16. 00,68,01,00,00,3a,00,1f,80,c8,27,34,1f,10,5c,10,42,aa,03,2e,e4,52,87,d6,68,\
    17. 26,00,01,00,26,00,ef,be,12,00,00,00,b7,f3,55,31,7e,6a,d3,01,40,e0,d3,35,7e,\
    18. 6a,d3,01,40,e0,d3,35,7e,6a,d3,01,14,00,56,00,31,00,00,00,00,00,5c,4c,01,48,\
    19. 11,00,54,61,73,6b,42,61,72,00,40,00,09,00,04,00,ef,be,81,4b,6c,43,5c,4c,01,\
    20. 48,2e,00,00,00,79,3c,01,00,00,00,07,00,00,00,00,00,00,00,00,00,00,00,00,00,\
    21. 00,00,33,c5,d7,00,54,00,61,00,73,00,6b,00,42,00,61,00,72,00,00,00,16,00,d6,\
    22. 00,32,00,1e,0a,00,00,e6,4a,ce,5d,20,00,57,4f,52,44,32,30,7e,31,2e,4c,4e,4b,\
    23. 00,00,4c,00,09,00,04,00,ef,be,5c,4c,08,48,5c,4c,08,48,2e,00,00,00,cc,b7,02,\
    24. 00,00,00,0a,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,6d,74,0f,00,57,00,\
    25. 6f,00,72,00,64,00,20,00,32,00,30,00,31,00,36,00,2e,00,6c,00,6e,00,6b,00,00,\
    26. 00,1c,00,4c,00,00,00,1d,00,ef,be,02,00,4d,00,69,00,63,00,72,00,6f,00,73,00,\
    27. 6f,00,66,00,74,00,2e,00,4f,00,66,00,66,00,69,00,63,00,65,00,2e,00,57,00,49,\
    28. 00,4e,00,57,00,4f,00,52,00,44,00,2e,00,45,00,58,00,45,00,2e,00,31,00,35,00,\
    29. 00,00,1c,00,22,00,00,00,1e,00,ef,be,02,00,55,00,73,00,65,00,72,00,50,00,69,\
    30. 00,6e,00,6e,00,65,00,64,00,00,00,1c,00,00,00,00,66,01,00,00,3a,00,1f,80,c8,\
    31. 27,34,1f,10,5c,10,42,aa,03,2e,e4,52,87,d6,68,26,00,01,00,26,00,ef,be,12,00,\
    32. 00,00,b7,f3,55,31,7e,6a,d3,01,40,e0,d3,35,7e,6a,d3,01,40,e0,d3,35,7e,6a,d3,\
    33. 01,14,00,56,00,31,00,00,00,00,00,5c,4c,08,48,11,00,54,61,73,6b,42,61,72,00,\
    34. 40,00,09,00,04,00,ef,be,81,4b,6c,43,5c,4c,08,48,2e,00,00,00,79,3c,01,00,00,\
    35. 00,07,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,1d,ea,5e,00,54,00,61,00,\
    36. 73,00,6b,00,42,00,61,00,72,00,00,00,16,00,d4,00,32,00,1a,0a,00,00,e6,4a,ce,\
    37. 5d,20,00,45,58,43,45,4c,32,7e,31,2e,4c,4e,4b,00,00,4e,00,09,00,04,00,ef,be,\
    38. 5c,4c,0a,48,5c,4c,0a,48,2e,00,00,00,c2,b7,02,00,00,00,0d,00,00,00,00,00,00,\
    39. 00,00,00,00,00,00,00,00,00,66,08,32,00,45,00,78,00,63,00,65,00,6c,00,20,00,\
    40. 32,00,30,00,31,00,36,00,2e,00,6c,00,6e,00,6b,00,00,00,1c,00,48,00,00,00,1d,\
    41. 00,ef,be,02,00,4d,00,69,00,63,00,72,00,6f,00,73,00,6f,00,66,00,74,00,2e,00,\
    42. 4f,00,66,00,66,00,69,00,63,00,65,00,2e,00,45,00,58,00,43,00,45,00,4c,00,2e,\
    43. 00,45,00,58,00,45,00,2e,00,31,00,35,00,00,00,1c,00,22,00,00,00,1e,00,ef,be,\
    44. 02,00,55,00,73,00,65,00,72,00,50,00,69,00,6e,00,6e,00,65,00,64,00,00,00,1c,\
    45. 00,00,00,00,3e,01,00,00,3a,00,1f,80,c8,27,34,1f,10,5c,10,42,aa,03,2e,e4,52,\
    46. 87,d6,68,26,00,01,00,26,00,ef,be,12,00,00,00,b7,f3,55,31,7e,6a,d3,01,40,e0,\
    47. d3,35,7e,6a,d3,01,40,e0,d3,35,7e,6a,d3,01,14,00,56,00,31,00,00,00,00,00,86,\
    48. 4b,eb,70,11,00,54,61,73,6b,42,61,72,00,40,00,09,00,04,00,ef,be,81,4b,6c,43,\
    49. 86,4b,eb,70,2e,00,00,00,79,3c,01,00,00,00,07,00,00,00,00,00,00,00,00,00,00,\
    50. 00,00,00,00,00,15,b3,2f,01,54,00,61,00,73,00,6b,00,42,00,61,00,72,00,00,00,\
    51. 16,00,ac,00,32,00,df,08,00,00,6f,4b,87,54,20,00,47,4f,4f,47,4c,45,7e,31,2e,\
    52. 4c,4e,4b,00,00,54,00,09,00,04,00,ef,be,86,4b,eb,70,86,4b,eb,70,2e,00,00,00,\
    53. f9,e3,00,00,00,00,19,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,b5,cf,92,\
    54. 00,47,00,6f,00,6f,00,67,00,6c,00,65,00,20,00,43,00,68,00,72,00,6f,00,6d,00,\
    55. 65,00,2e,00,6c,00,6e,00,6b,00,00,00,1c,00,1a,00,00,00,1d,00,ef,be,02,00,43,\
    56. 00,68,00,72,00,6f,00,6d,00,65,00,00,00,1c,00,22,00,00,00,1e,00,ef,be,02,00,\
    57. 55,00,73,00,65,00,72,00,50,00,69,00,6e,00,6e,00,65,00,64,00,00,00,1c,00,00,\
    58. 00,00,6c,01,00,00,3a,00,1f,80,c8,27,34,1f,10,5c,10,42,aa,03,2e,e4,52,87,d6,\
    59. 68,26,00,01,00,26,00,ef,be,12,00,00,00,b7,f3,55,31,7e,6a,d3,01,40,e0,d3,35,\
    60. 7e,6a,d3,01,40,e0,d3,35,7e,6a,d3,01,14,00,56,00,31,00,00,00,00,00,45,4c,54,\
    61. 39,11,00,54,61,73,6b,42,61,72,00,40,00,09,00,04,00,ef,be,81,4b,6c,43,45,4c,\
    62. 54,39,2e,00,00,00,79,3c,01,00,00,00,07,00,00,00,00,00,00,00,00,00,00,00,00,\
    63. 00,00,00,d3,e5,2e,00,54,00,61,00,73,00,6b,00,42,00,61,00,72,00,00,00,16,00,\
    64. da,00,32,00,3c,08,00,00,46,4b,d7,48,20,00,53,77,79,78,49,74,21,2e,6c,6e,6b,\
    65. 00,48,00,09,00,04,00,ef,be,45,4c,54,39,45,4c,54,39,2e,00,00,00,94,4c,00,00,\
    66. 00,00,4b,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,04,e9,ec,00,53,00,77,\
    67. 00,79,00,78,00,49,00,74,00,21,00,2e,00,6c,00,6e,00,6b,00,00,00,1a,00,56,00,\
    68. 00,00,1d,00,ef,be,02,00,46,00,38,00,45,00,35,00,35,00,35,00,46,00,39,00,2d,\
    69. 00,34,00,43,00,30,00,30,00,2d,00,31,00,31,00,44,00,33,00,2d,00,38,00,30,00,\
    70. 42,00,43,00,2d,00,30,00,30,00,31,00,30,00,35,00,41,00,36,00,35,00,33,00,33,\
    71. 00,37,00,39,00,00,00,1a,00,22,00,00,00,1e,00,ef,be,02,00,55,00,73,00,65,00,\
    72. 72,00,50,00,69,00,6e,00,6e,00,65,00,64,00,00,00,1a,00,00,00,00,76,01,00,00,\
    73. 3a,00,1f,80,c8,27,34,1f,10,5c,10,42,aa,03,2e,e4,52,87,d6,68,26,00,01,00,26,\
    74. 00,ef,be,12,00,00,00,b7,f3,55,31,7e,6a,d3,01,40,e0,d3,35,7e,6a,d3,01,40,e0,\
    75. d3,35,7e,6a,d3,01,14,00,56,00,31,00,00,00,00,00,65,4c,70,6a,11,00,54,61,73,\
    76. 6b,42,61,72,00,40,00,09,00,04,00,ef,be,81,4b,6c,43,65,4c,70,6a,2e,00,00,00,\
    77. 79,3c,01,00,00,00,07,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,25,01,bf,\
    78. 00,54,00,61,00,73,00,6b,00,42,00,61,00,72,00,00,00,16,00,e4,00,32,00,05,0a,\
    79. 00,00,e6,4a,ce,5d,20,00,50,4f,57,45,52,50,7e,31,2e,4c,4e,4b,00,00,58,00,09,\
    80. 00,04,00,ef,be,65,4c,90,6b,65,4c,90,6b,2e,00,00,00,59,e9,00,00,00,00,e6,00,\
    81. 00,00,00,00,00,00,00,00,00,00,00,00,00,00,83,a9,14,00,50,00,6f,00,77,00,65,\
    82. 00,72,00,50,00,6f,00,69,00,6e,00,74,00,20,00,32,00,30,00,31,00,36,00,2e,00,\
    83. 6c,00,6e,00,6b,00,00,00,1c,00,4e,00,00,00,1d,00,ef,be,02,00,4d,00,69,00,63,\
    84. 00,72,00,6f,00,73,00,6f,00,66,00,74,00,2e,00,4f,00,66,00,66,00,69,00,63,00,\
    85. 65,00,2e,00,50,00,4f,00,57,00,45,00,52,00,50,00,4e,00,54,00,2e,00,45,00,58,\
    86. 00,45,00,2e,00,31,00,35,00,00,00,1c,00,22,00,00,00,1e,00,ef,be,02,00,55,00,\
    87. 73,00,65,00,72,00,50,00,69,00,6e,00,6e,00,65,00,64,00,00,00,1c,00,00,00,ff


    Also exakt so steht der Schlüssel in der Registry.

    Der Umkehrschluss für mich wäre der, das ich das ByteArray in einen String Konvertiere, und dann wieder Per Code rückwärts das StringArray in ein ByteArray Konvertiere und dann ins System schreibe?

    Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von „Blackn0va“ ()

    @Blackn0va Den Post #3 mit der getesteten Lösung Deines Problems hätte ich auch ignoriert. X(
    Falls Du diesen Code kopierst, achte auf die C&P-Bremse.
    Jede einzelne Zeile Deines Programms, die Du nicht explizit getestet hast, ist falsch :!:
    Ein guter .NET-Snippetkonverter (der ist verfügbar).
    VB-Fragen über PN / Konversation werden ignoriert!
    Nein, ignoriert habe ich es keinesfalls @RodFromGermany !
    Ich weiß nur leider nicht wie ich das angehen soll, wenn ich eben aus der Registry Binäre werte bekomme, weiß ich deinen Code leider nicht einzusetzen. Ich übersehe die Logik ein wenig..

    Hier mal eine Zeile vom Binären wert der Registry:

    Quellcode

    1. 08,03,00,00\


    Wenn ich :

    VB.NET-Quellcode

    1. Dim FavoritesResoveKey() As Byte = {&H0, &H8,&H0, &H3,&H0, &H0,&H0, &H0}


    Nehme, wir ja etwas vollkommen anderes daraus. Oder?



    Ok habs nun Verstanden, vielen dank für die Stütze !


    Jetzt habe ich doch noch eine Frage, da der Key an sich recht groß ist, gibt es eine möglichkeit aus
    Spoiler anzeigen

    Quellcode

    1. ​08,03,00,00,4c,00,00,00,01,14,02,00,00,00,00,00,c0,00,\
    2. 00,00,00,00,00,46,83,00,80,00,20,00,00,00,95,81,24,ad,80,6a,d3,01,95,81,24,\
    3. ad,80,6a,d3,01,8f,e0,a7,80,4d,f6,d2,01,ac,09,00,00,00,00,00,00,01,00,00,00,\
    4. 00,00,00,00,00,00,00,00,00,00,00,00,6e,01,3a,00,1f,80,c8,27,34,1f,10,5c,10,\
    5. 42,aa,03,2e,e4,52,87,d6,68,26,00,01,00,26,00,ef,be,12,00,00,00,b7,f3,55,31,\
    6. 7e,6a,d3,01,40,e0,d3,35,7e,6a,d3,01,40,e0,d3,35,7e,6a,d3,01,14,00,56,00,31,\
    7. 00,00,00,00,00,81,4b,a1,45,11,00,54,61,73,6b,42,61,72,00,40,00,09,00,04,00,\
    8. ef,be,81,4b,6c,43,81,4b,a1,45,2e,00,00,00,79,3c,01,00,00,00,07,00,00,00,00,\
    9. 00,00,00,00,00,00,00,00,00,00,00,6b,79,2c,00,54,00,61,00,73,00,6b,00,42,00,\
    10. 61,00,72,00,00,00,16,00,dc,00,32,00,ac,09,00,00,e6,4a,ce,5d,20,00,4f,55,54,\
    11. 4c,4f,4f,7e,31,2e,4c,4e,4b,00,00,52,00,09,00,04,00,ef,be,81,4b,a1,45,81,4b,\
    12. a1,45,2e,00,00,00,c5,38,01,00,00,00,0e,00,00,00,00,00,00,00,00,00,00,00,00,\
    13. 00,00,00,71,e1,15,00,4f,00,75,00,74,00,6c,00,6f,00,6f,00,6b,00,20,00,32,00,\


    das hier generieren kann?

    VB.NET-Quellcode

    1. ​&H8, &H3, &H0, &H0, &H4C, &H0, &H0, &H0, &H1,&H14, &H2,&H0,&H0

    Dieser Beitrag wurde bereits 3 mal editiert, zuletzt von „Blackn0va“ ()

    Blackn0va schrieb:

    wenn ich eben aus der Registry Binäre werte bekomme
    Geht aus Deiner Problembeschreibung nicht hervor.
    Ich gehe mal davon aus, dass Du den Wert auslesen, bearbeiten und wieder reinschreiben willst.
    Du bekommst ein Byte-Array.
    Falls Du das in einen String konvertieren willst:

    VB.NET-Quellcode

    1. Dim by() As Byte = CType(key.GetValue("Favorites2"), Byte())
    2. Dim txt = System.Text.Encoding.ASCII.GetString(by)
    3. by(2) = 123 ' editieren
    und dann weiter wie oben.
    Falls Du diesen Code kopierst, achte auf die C&P-Bremse.
    Jede einzelne Zeile Deines Programms, die Du nicht explizit getestet hast, ist falsch :!:
    Ein guter .NET-Snippetkonverter (der ist verfügbar).
    VB-Fragen über PN / Konversation werden ignoriert!
    Danke für die Antwort, aber:
    nein ich möchte nichts auslesen sondern ohne fragen einen binary Key in die registry schreiben, ich habe die Key.value in binärer Form und möchte diesen exakt so in der registry ablegen.

    Also dieses zeugs, so wie es ist in die registry schreiben
    @Blackn0va Was hindert Dich daran, den Code von Post #3 zu verwenden?
    Falls Du diesen Code kopierst, achte auf die C&P-Bremse.
    Jede einzelne Zeile Deines Programms, die Du nicht explizit getestet hast, ist falsch :!:
    Ein guter .NET-Snippetkonverter (der ist verfügbar).
    VB-Fragen über PN / Konversation werden ignoriert!

    Blackn0va schrieb:

    daher frage ich nach einer einfacheren methode
    Das ist die einfache Methode.
    Und wenn Dir der Quelltext zu lang ist, mach ne Region drumherun, die kannst Du zusammenklappen:

    VB.NET-Quellcode

    1. #Region "Hex-Dump"
    2. ' Dein Code
    3. #End Region
    Falls Du diesen Code kopierst, achte auf die C&P-Bremse.
    Jede einzelne Zeile Deines Programms, die Du nicht explizit getestet hast, ist falsch :!:
    Ein guter .NET-Snippetkonverter (der ist verfügbar).
    VB-Fragen über PN / Konversation werden ignoriert!
    Hm, okay, ja das ist nicht so gut , aber das mit der Region ist schon mal was. Vielen Dank :)

    Jetzt habe ich noch eine Frage das dieses Thema betrifft.

    Also dieser Reg Key den ich in die Registry schreiben möchte, sind die an der Taskleiste Fixierten Anwendungen (Word , Excel usw).
    Ich suche erst die Programm Pfade und lege eine .lnk Verknüpfung in das "%AppData% Roaming\Microsoft\Internet Explorer\Quick Launch\User Pinned\TaskBar" Verzeichnis.
    Der Key dient dazu das diese Verknüpfung eben auch im System Registriert wird.

    Meine Idee und Frage : Ist es denn möglich direkt auf die Taskleiste zuzugreifen? Also das ich nach dem Pfad von Word suche und die Verknüpfung direkt in der Taskleiste angeheftet wird, denn da würde der Key ja selbstständig generiert werden, was für mich einfacher wäre.


    Dazu habe ich folgenden Code gefunden, aber er funktioniert leider nicht:
    Spoiler anzeigen

    VB.NET-Quellcode

    1. ​Option Strict On
    2. Imports Shell32
    3. Public Class Form1
    4. Public Enum Where
    5. Startmenü
    6. Taskleiste
    7. End Enum
    8. Public Sub PinUnpin(ByVal filePath As String, ByVal pin As Boolean, ByVal Where As Where)
    9. If Not IO.File.Exists(filePath) Then
    10. Throw New IO.FileNotFoundException(filePath)
    11. End If
    12. ' erstelle ein shell object
    13. Dim shellApplication As Shell = CType(Activator.CreateInstance(Type.GetTypeFromProgID("Shell.Application")), Shell)
    14. Dim path1 As String = IO.Path.GetDirectoryName(filePath)
    15. Dim fileName As String = IO.Path.GetFileName(filePath)
    16. Dim directory As Folder = shellApplication.[NameSpace](path1)
    17. Dim link As FolderItem = directory.ParseName(fileName)
    18. Dim verbs As Shell32.FolderItemVerbs = link.Verbs()
    19. For i As Integer = 0 To verbs.Count() - 1
    20. Dim verbName As String = verbs.Item(i).Name.Replace("&", String.Empty).ToLower()
    21. If Where = Form1.Where.Taskleiste Then
    22. 'If (pin AndAlso verbName.Equals("pin to taskbar")) OrElse (Not pin AndAlso verbName.Equals("unpin from taskbar")) Then
    23. If (pin AndAlso verbName.Equals("an taskleiste anheften")) OrElse (Not pin AndAlso verbName.Equals("von taskleiste lösen")) Then
    24. verbs.Item(i).DoIt()
    25. Exit For
    26. End If
    27. ElseIf Where = Form1.Where.Startmenü Then
    28. If (pin AndAlso verbName.Equals("an startmenü anheften")) OrElse (Not pin AndAlso verbName.Equals("vom startmenü lösen")) Then
    29. '"an startmenü anheften"
    30. verbs.Item(i).DoIt()
    31. Exit For
    32. End If
    33. End If
    34. Next i
    35. shellApplication = Nothing
    36. End Sub
    37. Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
    38. PinUnpin("C:\windows/notepad.exe", False, Where.Taskleiste)
    39. End Sub
    40. End Class

    Dieser Beitrag wurde bereits 2 mal editiert, zuletzt von „Blackn0va“ ()

    @Blackn0va Befasse Dich mal mit diesem Link: pinvoke.net/default.aspx/shell32.ITaskbarList
    Das ist etwas tricky.
    TaskbarList 1.cs
    TaskbarList 2.cs
    Falls Du diesen Code kopierst, achte auf die C&P-Bremse.
    Jede einzelne Zeile Deines Programms, die Du nicht explizit getestet hast, ist falsch :!:
    Ein guter .NET-Snippetkonverter (der ist verfügbar).
    VB-Fragen über PN / Konversation werden ignoriert!

    Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von „RodFromGermany“ ()

    Uff, danke für den Tipp rod, ich denke das ist das was ich suche, aber sieht recht komplex aus.
    Das ging früher leichter hab ich gelesen.

    frage noch zu Microsoft: was für Technologie oder Methoden werden genutzt, um die Informationen von z.B Word Form , also die Buttons handler.zu verstecken, denn ich kann nichts auslesen mit spy ++
    @Blackn0va Ggf. WPF, davon hab ich allerdings keine Ahnung.
    Falls Du diesen Code kopierst, achte auf die C&P-Bremse.
    Jede einzelne Zeile Deines Programms, die Du nicht explizit getestet hast, ist falsch :!:
    Ein guter .NET-Snippetkonverter (der ist verfügbar).
    VB-Fragen über PN / Konversation werden ignoriert!