Friday, May 7, 2021

CMD magic for masses

 systeminfo > C:\temp\SystemID.txt

wmic /output:C:\temp\InstalledPrograms.txt product get name,version

rem --------------------

wmic memorychip list full

wmic diskdrive list full

wmic baseboard list full

wmic cdrom list full

pause

rem --------------------

path "C:\Program Files (x86)\Adobe\Acrobat Reader DC\Reader\"

acrord32 /p /h d:\20200122082625.pdf

rem --------------------

wmic /output:C:\temp\InstalledPrograms.txt product get name,version

rem --------------------

start iexplore "https://www.google.com/"

start msedge "https://www.google.com/"

start chrome "https://www.google.com/"

rem --------------------


C and Unicode:

#include <fcntl.h>
#include <io.h>
#include <stdio.h>

int main(void) {
    setmode(_fileno(stdout), _O_U16TEXT);
    wprintf(L"\x043a\x043e\x0448\x043a\x0430 \x65e5\x672c\x56fd\n");
    return 0;
}











No comments:

Post a Comment

Коментар: