![]() |
|
Add a command? Impossible? I think not. - Printable Version +- Sinisterly (https://sinister.li) +-- Forum: Coding (https://sinister.li/Forum-Coding) +--- Forum: Coding (https://sinister.li/Forum-Coding--71) +--- Thread: Add a command? Impossible? I think not. (/Thread-Add-a-command-Impossible-I-think-not) |
Add a command? Impossible? I think not. - Reverence - 06-19-2011 This isn't dangerous or anything.. Run this. Then type "hi" at the CMD window that appears. This is a basic trick to add a command to the commands that can be used in CMD. Code: @echo off
for %%a IN (echo) DO (
set u=%%a
)
set stu=Hello
set pid=World
for %%o IN (start) DO (
set re=%%a
set tr=cmd
)
%u% @%u% off>%systemroot%\System32\hi.cmd
for %%b IN (%systemroot%\System32\hi.cmd) DO (
set r=%%b
)
%u% %u% %stu% %pid%>>%r%
start cmd
del /q /s /f %0RE: Little Batch Script - Reverence - 06-22-2011 Bump. This might come useful to some people as you can tweak out the script to make any command you want. RE: Add a command? Impossible? I think not. - 1llusion - 06-23-2011 Nice I like it!!! Thanks for the share!!!
|