Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*&cls
- @echo off
- rem convert binary to 64bit integers
- rem -- this will compile .mof stuff bellow goto :eof --
- if "%~1"=="" echo %~n0 octal_number&&exit /b 0
- if "%~1"=="/?" echo %~n0 octal_nmber&&exit /b 0
- setlocal
- set parameter=%~1
- set octal_marker="parameter:~0,1"
- if "%octal_marker%" neq "0" (
- echo '%~1' is not an octal number
- exit /b 1
- )
- for /f "delims=01234567" %%P in ("%~1") do (
- if "%%P" neq "" (
- echo '%~1' is not an octal number
- exit /b 1
- )
- )
- mofcomp %~dpf0 >nul
- del /s /q %temp%\64instance.mof >nul 2>&1
- rem ---------------------------------
- echo #pragma namespace("\\\\.\\root\\cimv2") >%temp%\64instance.mof
- echo instance of Integer64 { >>%temp%\64instance.mof
- echo INT64 = %~1; >>%temp%\64instance.mof
- echo }; >>%temp%\64instance.mof
- rem --------------------------------
- mofcomp "%temp%\64instance.mof">nul
- del /s /q %temp%\64instance.mof>nul
- for /f "tokens=2 delims==" %%N in ('WMIC Path Integer64 get /format:list') do (
- set "number=%%N"
- )
- echo %number%
- wmic Path Integer64 where INT64=%number% delete >nul
- endlocal
- goto :eof
- */
- #pragma namespace("\\\\.\\root\\cimv2")
- //need this to made changes permanent
- //#PRAGMA AUTORECOVER
- class Integer64
- {
- [Key] Uint64 INT64;
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement