Category : command-line

I cannot figure out how to echo the date and time, with a zero padded hour, to insert a timestamp in my batch files. The following is the set command that I use to echo the date and time: set _DateTime=%DATE:~10,4%-%DATE:~4,2%-%DATE:~7,2%_%time:~0,2%-%time:~3,2% echo _DateTime=%_DateTime% The following is what the code above generated in the console window ..

Read more

I run my application in a windows cmd console. The problem is that sometimes the console dump is too big and causes a delay. The delay itself will cause a problem in the application. The cmd window is often in the background and I do not need to see immediate rendering. I mostly use it ..

Read more

I am trying to import below Echo off for /F "tokens=2" %%i in (‘whoami /user /fo table /nh’) do set usersid=%%i echo %usersid% #reg add HKU%usersid%SOFTWAREMicrosoftWindowsCurrentVersionPoliciesSystem /v DisableChangePassword /t REG_DWORD /d 0 /f but failing as it needs admin right, but when we use rights it changes MY userSID registry not the one who logged ..

Read more

I got an assignment from my school, I need to make a script for a management service, and it says 5 requirements: 1:Query regarding service management 2:Query service selection 3:Query regarding correctness of selection or new selection 4:Calibrates service and specifies possible parameters (start, stop,) 5:parameter can be selected, which is then applied to the ..

Read more