Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

55 lines
823 B

  1. {
  2. printf "HKLM,";
  3. if (substr($2, 1, 19) == "HKEY_LOCAL_MACHINE\\")
  4. {
  5. $2 = substr($2, 20);
  6. }
  7. printf $2;
  8. if (NF == 2)
  9. {
  10. print "\\,,,";
  11. continue;
  12. }
  13. else if ( substr($3,1,2) == "@=" )
  14. {
  15. $3 = substr($3,4,length($3)-3);
  16. start = 3;
  17. printf ",,";
  18. }
  19. else
  20. {
  21. if (index($3, "=") == 0)
  22. {
  23. print "ERROR";
  24. }
  25. else
  26. {
  27. printf ","substr($3, 2, index($3, "=")-3)",";
  28. $3 = substr($3, index($3, "=")+2);
  29. }
  30. start = 3;
  31. }
  32. for (i = start; i <= NF; i++)
  33. {
  34. if (i == start)
  35. {
  36. printf ",\"";
  37. }
  38. if (substr($i, length($i), 1)=="\"")
  39. {
  40. printf substr($i, 1, length($i)-1);
  41. }
  42. else
  43. {
  44. printf $i;
  45. }
  46. if (i < NF)
  47. {
  48. printf " ";
  49. }
  50. else
  51. {
  52. printf "\"";
  53. }
  54. }
  55. print "";
  56. }