Advertisement
npocmaka

PrintUnicodeString

May 15th, 2013
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /*&cls
  2. @echo off
  3.  
  4. if "%~2" equ ""  %~n0 unucode_string outfile&&exit /b 0
  5. mofcomp  %~dpf0
  6. del /s /q %temp%\str.mof  >nul 2>&1
  7. rem ---------------------------------
  8. echo #pragma namespace("\\\\.\\root\\cimv2") >%temp%\str.mof
  9. echo instance of UStr { >>%temp%\str.mof
  10. echo id=1;>>%temp%\str.mof
  11. echo STR="\n%~1";>>%temp%\str.mof
  12. echo }; >>%temp%\str.mof
  13. rem --------------------------------
  14. mofcomp "%temp%\str.mof"
  15. rem del /s /q %temp%\str.mof>nul
  16.  
  17. echo.
  18. echo.
  19. rem wmic path UStr get STR /format:csv | more +3
  20. rem call cmd /u /c "wmic path UStr get STR /format:csv | more +3 ">%2
  21. echo.
  22. echo.
  23. wmic path UStr get STR /format:list  >%2.tmp
  24.  
  25. echo.
  26. echo.
  27. echo delete
  28. echo.
  29. echo.
  30. wmic path UStr where id=1 delete
  31. goto :eof
  32. */
  33.  
  34. #pragma namespace("\\\\.\\root\\cimv2")
  35. //need this to made changes permanent
  36. //#PRAGMA AUTORECOVER
  37.  
  38. class UStr
  39. {
  40.     [key]  Uint32 id;
  41.     String STR;
  42. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement