Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*&cls
- @echo off
- if "%~2" equ "" %~n0 unucode_string outfile&&exit /b 0
- mofcomp %~dpf0
- del /s /q %temp%\str.mof >nul 2>&1
- rem ---------------------------------
- echo #pragma namespace("\\\\.\\root\\cimv2") >%temp%\str.mof
- echo instance of UStr { >>%temp%\str.mof
- echo id=1;>>%temp%\str.mof
- echo STR="\n%~1";>>%temp%\str.mof
- echo }; >>%temp%\str.mof
- rem --------------------------------
- mofcomp "%temp%\str.mof"
- rem del /s /q %temp%\str.mof>nul
- echo.
- echo.
- rem wmic path UStr get STR /format:csv | more +3
- rem call cmd /u /c "wmic path UStr get STR /format:csv | more +3 ">%2
- echo.
- echo.
- wmic path UStr get STR /format:list >%2.tmp
- echo.
- echo.
- echo delete
- echo.
- echo.
- wmic path UStr where id=1 delete
- goto :eof
- */
- #pragma namespace("\\\\.\\root\\cimv2")
- //need this to made changes permanent
- //#PRAGMA AUTORECOVER
- class UStr
- {
- [key] Uint32 id;
- String STR;
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement