NirCmd NirCmd is a freeware utility that allows you to perform tasks from the command line, .bat files, desktop shortcuts and even це безкоштовна утиліта, яка дозволяє виконувати завдання з командного рядка. BAT файли ярлики робочого столу і навіть Launchy Launchy . . There's a large list of commands on the NirCmd website. Там такий великий список команд на NirCmd сайті. I've picked out a few that I've found useful, but you may find another great use for NirCmd after reading through the examples. Я вибрав кілька, які я знайшов корисними, але ви можете знайти іншу велику користь NirCmd після прочитання через приклади. This was written and tested in WindowsXP but it should also work in other versions of Windows. Це було написано і випробувана в WindowsXP, але він має також працювати в інших версіях Windows.
To get started download Для початку завантаження NirCmd NirCmd , the link is all the way at the bottom of the page. , Посилання всю дорогу в нижній частині сторінки. Next unzip the contents to a folder; I would suggest something simple such as C:\NirCmd\ if you use something else, substitute that wherever you see C:\NirCmd\ Наступний розпакувати вміст в папку, я хотів би запропонувати що-небудь просте таких як C: \ NirCmd \, якщо ви використовуєте щось інше, що, де б замінити увазі C: \ NirCmd \
Note: NirCmd may display as a virus, spyware, or potentially unwanted program on some anti-virus and anti-spyware programs (Sophos is one) this is because certain viruses and spyware include and use NirCmd to perform actions on the users PC. Примітка: NirCmd можуть відображатися у вигляді вірусів, шпигунського ПЗ і потенційно небажаних програм на деякі антивірусні та антишпигунські програми (Sophos є одним), це відбувається тому, що деякі віруси і шпигунські програми включають і використання NirCmd виконувати наступні дії на комп'ютері користувача. However it is also used by many good programs as well, such as UBCD (which I may cover later), and by itself it poses no risk. Проте вона також використовується багато хороших програм, наприклад, такі як UBCD (яку я може охоплювати пізнішої версії), і сам по собі він не представляє ніякої небезпеки.
The simplest way to use NirCmd is in the command line, however this article will concentrate on writing commands out in a file and using desktop shortcuts and Launchy to run them. Найпростіший спосіб використання NirCmd до командного рядка, однак ця стаття буде зосереджена на письмовому з команд у файл і використовувати ярлики робочого столу і Launchy для їх роботи. For a simple test, open up Notepad or your text-editor of choice and type in (or copy and paste): Для простого тесту, відкрийте Блокнот або ваш текстовий редактор вибору та введіть (або скопіюйте і вставте):
C:\nircmd\nircmd.exe monitor off C: \ NirCmd \ nircmd.exe контролю Off
Save the file in your C:\NirCmd\ folder as MonitorOff.bat the exact name does not matter, but it should describe what it does. Збережіть файл на диску С: \ NirCmd папці \ MonitorOff.bat як точна назва не має значення, але вони повинні описати, що він робить.
Now you should have MonitorOff.bat sitting in the C:\NirCmd\ folder, double-click on it to put your monitor into power save mode (you can move the mouse or hit a key to turn it back on). Тепер ви повинні мати MonitorOff.bat сиділа в C: \ NirCmd \ папці, двічі клацніть на нього, щоб покласти свій монітор в режимі економії енергії (ви можете переміщати мишу або натисніть клавішу, щоб включити його назад). You can then place a shortcut to MonitorOff.bat on your desktop, to do so Right-Click on MonitorOff.bat and select Send To and click Desktop (Create Shortcut) . Потім Ви можете розмістити посилання на MonitorOff.bat на робочому столі, для цього правою кнопкою миші по MonitorOff.bat і виберіть Надіслати та натисніть кнопку Робочий стіл (створити ярлик). Another method I like to use is to simply select MonitorOff.bat with a single-click then hold down Alt and drag the file onto the desktop. Іншим способом я хотів би використовувати це, просто виберіть MonitorOff.bat з однією кнопкою потім, утримуючи клавішу Alt і перетягніть файл на робочому столі.
If you look carefully in the above screenshot, you'll notice another .bat file titled wait2 screenshot.bat this one is a set of two commands to wait two seconds and then take a screenshot which is saved as shot.png in C:\Nircmd this comes in handy to capture a screenshot when you can't just hit Ctrl + Print Screen which I what I normally use for screenshots. Якщо ви подивіться уважно на скріншоті вище, ви побачите іншу. Командний файл під назвою wait2 screenshot.bat ця являє собою набір з двох команд чекати дві секунди, а потім зробити скріншот, який зберігається як shot.png в C: \ NirCmd Це дуже зручно для захоплення екрану, коли ви не можете просто натиснути Ctrl + Print Screen, який я, що я зазвичай використовуєте для зняття скріншотів. Here is what the file contains: Ось що файл містить:
C:\nircmd\nircmd.exe cmdwait 2000 savescreenshot “C:\Nircmd\shot.png” C: \ NirCmd \ nircmd.exe cmdwait 2000 savescreenshot "C: \ NirCmd \ shot.png"
Next up is a useful desktop shortcut to mute and un-mute the sound. Наступним є корисним ярлика на робочому столі німим і знову включити звук. In a new file enter: У новому файлі, введіть:
C:\nircmd\nircmd.exe cmdshortcut “~$folder.desktop$” “Mute Unmute” mutesysvolume 2 C: \ NirCmd \ nircmd.exe cmdshortcut "~ $ folder.desktop $" "Mute Увімкнути звук" mutesysvolume 2
Save the file in C:\NirCmd as Mute Unmute.bat you can also call change the “Mute Unmute” above in quotes to something else (the example on the website has “Switch Volume”), this will change the name of the desktop shortcut, you can also change any shortcut name later by right-clicking on it and selecting Rename . Збережіть файл в C: \ NirCmd як Mute Unmute.bat Ви також можете зателефонувати змінити "Mute Увімкнути звук" вище в лапках, щоб щось інше (наприклад, на веб-сайт "Switch Volume"), то це змінить ім'я на робочому столі ярлика, ви також можете змінити будь-яке ім'я ярлика пізніше правою кнопкою миші і вибравши команду Перейменувати. Now double-click on Mute Unmute.bat to create a new shortcut on your desktop that should mute the sound the first time it is double-clicked and un-mute it the next. Тепер зробіть подвійне клацання на Mute Unmute.bat створити новий ярлик на робочому столі, який повинен вимкнути звук перший раз це подвійне натискання і ООН-ньому в наступний. If the default icon for this is too boring for you, right-click the Mute Unmute shortcut on your desktop and select Properties , select the Shortcut tab on top and click the Change Icon button. Якщо значок за замовчуванням для цього занадто нудно для Вас, клацніть правою кнопкою миші контекстне Mute Увімкнути звук на вашому робочому столі і виберіть Властивості, перейдіть на вкладку Ярлик на верхньому та натисніть кнопку "Змінити значок. I personally like the speaker and music note icon as seen in the screenshot below. Особисто мені подобається динаміка і значок музику до відома, як показано на скріншоті нижче.
The question that originally led me to NirCmd was someone wanting a quick way to switch resolutions, as she wanted a lower resolution for older programs. Питання, який спочатку привів мене до NirCmd був хтось бажаючі швидко переключатися резолюції, як вона хотіла низьким дозволом для старих програм. For this example I will use 800×600 with 32 bit colors as the lower resolution and 1280×1024 with 32 bit colors as the higher resolution, although you can substitute other resolutions such as 1024×768 or widescreen resolutions such as 1440×900 and 1680×1050. Для цього прикладу я буду використовувати 800 × 600 з 32-бітний колір як більш низька роздільна здатність і 1280 × 1024 з 32-розрядний колір як більш високий дозвіл, однак, можна замінити іншими резолюціями, такими як 1024 × 768 або широкоекранний такі резолюції, як 1440 × 900 і 1680 × 1050. The last number, color depth should be 32 unless you are running very old programs and want 16 bit colors. Останній номер, глибина кольору має бути 32, якщо ви працюєте в дуже старі програми і хочете квітами 16 біт. First, for the lower resolution file enter: По-перше, в низькому дозволі файлу введіть:
C:\nircmd\nircmd.exe cmdshortcut “~$folder.desktop$” “800×600″ setdisplay 800 600 32 C: \ NirCmd \ nircmd.exe cmdshortcut "~ $ folder.desktop $" "800 × 600" setdisplay 800 600 32
and save it in C:\NirCmd as 800×600 Resolution.bat і зберегти його в C: \ NirCmd як 800 × 600 Resolution.bat
Moving on to the larger resolution, make a new file with: Переходячи до великих дозволом, створіть новий файл з:
C:\nircmd\nircmd.exe cmdshortcut “~$folder.desktop$” “1280×1024″ setdisplay 1280 1024 32 C: \ NirCmd \ nircmd.exe cmdshortcut "~ $ folder.desktop $" "1280 × 1024" setdisplay 1280 1024 32
and save it in C:\NirCmd as 1280×1024 Resolution.bat і зберегти його в C: \ NirCmd як 1280 × 1024 Resolution.bat
Now you can double-click each of these to make desktop shortcuts called 800×600 and 1280×1024, double-click on the desktop shortcuts to quickly resize the desktop. Тепер ви можете двічі клацніть на кожному з них зробити ярлики на робочому столі називаються 800 × 600 і 1280 × 1024, двічі клацніть значок на робочому столі ярлики для швидкого зміни розміру робочого столу. As in the Mute Unmute example, you can change the icons to whatever you feel like, here are two I picked out of the default set, I'll have to remember to do a post on custom icons in the future. Як і в прикладі Mute Увімкнути звук, ви можете змінювати іконки, щоб всі ви відчуваєте, як тут два я вибрав за замовчуванням встановлено, мені доведеться пам'ятати зробити пост на користувацькі значки в майбутньому.
![]()
Before moving into some more advanced command sets, I'll explain how this can work with Launchy. До переїзду в більш розширені набори команд, я поясню, як це може працювати з Launchy. Launchy should already scan the desktop for shortcuts and therefore find the examples that created desktop shortcuts. Launchy вже повинні сканувати робочому столі ярлики і, отже, знайти приклади, які створені ярлики робочого столу. However, you may not want to have all commands as desktop shortcuts, or you may want to type up commands on the fly. Однак, ви не хочете, щоб всі команди, як ярлики на робочому столі, або ви можете ввести до команд "на льоту". To do either of these, the C:\NirCmd folder should be added to Launchy's catalog. Щоб зробити одну з них, C: \ NirCmd папка повинна бути додана в каталог Launchy's. Bring up Launchy, Right-Click on it and select Options . Виховуйте Launchy, клацніть правою кнопкою на неї і виберіть Опції. Here click on the Catalog tab and hit the + (plus) button under Directories to add C:\Nircmd while it is selected type *.bat in the text-entry box under file types and hit the + button right underneath it. Тут натисніть на вкладку каталогу й натиснути + (плюс), розташовану під Довідники додати C: \ NirCmd Хоча вибраного типу *. BAT в текстовому полі введення під типи файлів і натисніть кнопку "+ права під ним. Do the same thing for *.exe, then make sure the box next to Executables is checked. Зробіть те ж саме для *. EXE, то переконайтеся, що прапорець на виконувані перевіряється.
Now click Rescan Catalog and Launchy should add all of your .bat files in the folder as well as nircmd.exe . Тепер натисніть кнопку Сканувати каталогу й Launchy слід додати всі ваші. BAT файли в папці, а також nircmd.exe. To try this, bring up Launchy and type: Щоб спробувати це довести до Launchy і наберіть:
MonitorOff MonitorOff
It should find the MonitorOff.bat before you finish typing, hit Enter to run it and it should turn off your monitor. Воно повинно знайти MonitorOff.bat перш ніж ви закінчите друкувати, натисніть Введення, щоб запустити його і він повинен вимкнути монітор. All of the other .bat files created in C:\Nircmd should also be accessible by typing their filename in Launchy. Всі інші. Бат-файлами, створеними в C: \ NirCmd повинна бути також доступна, набравши їх ім'я файлу в Launchy.

You can also enter an NirCmd command directly from Launchy, in the Launchy box type: Ви також можете ввести NirCmd команду прямо з Launchy, в полі Тип Launchy:
nircmd NirCmd
Next hit the Tab key and you should get nircmd -> in the launchy window. Наступний натиснете клавішу Tab, і ви повинні отримати NirCmd -> У вікні Launchy. You can then type any Nircmd command after the -> Потім можна ввести будь-яку команду після NirCmd ->
nircmd -> screensaver NirCmd -> Screensaver
will turn on the screensaver. вмикається заставка.
There are a lot of commands and examples to try out, especially since you can have multiple commands in a single .bat file. Є багато команд і приклади, щоб спробувати, тим більше, що ви можете мати декілька команд в одну. BAT файлу. Next up is a quick set of commands to tidy up Windows and logoff (good for a computer that has multiple users): Наступним є швидкий набір команд, прибирати і виходу з системи Windows (добре для комп'ютера, який має кілька користувачів):
C:\nircmd\nircmd.exe emptybin C: \ NirCmd \ nircmd.exe emptybin
C:\nircmd\nircmd.exe clipboard clear C: \ NirCmd \ nircmd.exe буфер Відкритий
C:\nircmd\nircmd.exe exitwin logoff C: \ NirCmd \ nircmd.exe exitwin Logoff
Save this as Logoff.bat in C:\NirCmd\ and when you are ready , running it will empty all of the recycling bins, clear the computer and log off the current user, be sure to only test this once you want to logoff as it will close all of your windows including unsaved documents. Зберегти як Logoff.bat в C: \ NirCmd \ і коли ви будете готові, працює воно буде порожнім все рециркуляції бункери, чітко комп'ютер і вихід з поточного користувача, переконайтеся, що це єдине випробування, коли ви хочете, щоб як вихід із системи вона буде закривати всі вікна, включаючи не збережені документи.
Note: Depending on your Launchy settings you may have to Rescan Catalog after making new .bat files or desktop shortcuts. Примітка: В залежності від налаштувань Launchy вам доведеться Пересканіровать каталогу після прийняття нового. Bat файли або ярлики на робочому столі. This option is on the General tab on the bottom as Minutes between catalog updates . Цей параметр знаходиться на вкладці "Загальні" на дно, протоколі між каталозі оновлень. If you have it set to 0 which is for manual updates only , then you will have to rescan the catalog whenever you want new commands and shortcuts added to Launchy. Якщо у вас є це встановлено в 0, що призначений для ручного оновлення тільки тоді ви будете мати для повторного пошуку в каталозі, коли ви хочете нові команди і додати ярлики для Launchy.
There are many more commands to cover, including ones that manipulate files, enter text, or even move and click the mouse. Є багато інших команд для покриття, у тому числі ті, які маніпулювати файлами, введення тексту, або навіть перемістити, і клацніть мишею. Please feel free to leave a comment requesting additional help or examples. Будь ласка, не соромтеся залишити коментар з проханням надати додаткову допомогу або приклади.



























Haven't had a good look at this yet, but I think it would be more useful with AutoHotKey than Launchy. Не мав гарний погляд на це, але я думаю, було б більш корисно, ніж з AutoHotKey Launchy.
Great tuto man!! Великий Tuto людиною!
Thanks! Спасибо!
hey great even works with my launch app called key launch but i can only get monitor off and empty recycl;e bin to work any reasons why i cant get the resolution one to work and can you put more on Ей більше працює навіть з моєю запуск App звані ключові запуску, але я можу отримати тільки від контролю і порожні recycl; електронна бен працювати будь-якої причини, чому я нахиляє отримати дозволи для роботи і можна помістити більше уваги
Good tutorial, but is there any way to Switch User? Гарний підручник, але чи є спосіб перемикання користувачів? Launchy itself will only allow you to Log Off so hoping NirCmd can add this. Launchy сама тільки дозволить Вам вийти так сподівався NirCmd можна додати.
Colin: Колін:
I'm not sure off-hand why the monitor script is not working, I would check which resolutions you can use in your monitor's display settings (right-click on the desktop and select properties and select the settings tab). Я не впевнений, безцеремонний, чому скрипт не працює, я б перевірити, які резолюції можна використовувати на дисплеї Вашого монітора настройках (правою кнопкою миші на робочому столі і виберіть пункт Властивості і виберіть вкладку налаштувань). Then try to set it to one of those resolutions with the command C:\NirCmd\nircmd.exe setdisplay 1024 768 32 or whatever resolution you need. Потім спробуйте встановити її на один з цих резолюцій за допомогою команди C: \ NirCmd \ nircmd.exe setdisplay 1024 768 32 або будь-якій резолюції вам потрібно.
Ian: Йєн:
I didn't see any commands to switch user in the NirCmd documentation, however it is an active project where they will add new commands with each new version, so I would contact the dev team about getting it added for the next version. Я не бачу ніяких команд для перемикання користувачів в NirCmd документації, однак він є активним проектом, в якому вони будуть додавати нові команди, з кожною новою версією, тому я хотів би звернутися до Dev Team про отримання Вона додала, для наступної версії. http://www.nirsoft.net/contact-new.html http://www.nirsoft.net/contact-new.html
I just configured launchy to use the killprocess command, on a window I specify in launchy. Я тільки що налаштували Launchy використовувати KillProcess команди, на вікні вказати в Launchy.
I used the 'runner' plugin for this. Я використав модуль 'доріжка' для цього.
I entered: Я увійшов:
“C:\WINDOWS\system32\nircmd.exe” "C: \ WINDOWS \ system32 \ nircmd.exe"
and і
” killprocess $$.exe” "KillProcess $ $. EXE"
By using this, i can pretty much do anything, istead of having to write a new batch file for every variable i need changed. Необхідно змінити за допомогою цього, я можу дуже багато чого зробити нічого, istead того, щоб записати новий пакетний файл для кожного змінного я.
(oh, and btw, the reason why I put nircmd in system32, is because I can run nircmd command easier from 'run', without having to type where it is stored). (Так, і до речі, причина, чому я поклав NirCmd в system32, тому що я можу запустити NirCmd команді легше від "Run", без необхідності вводити де вона зберігається).
Esta bueno el programa pero le faltan mas comandos que los que muestra el archivo de ayuda tengo un comando que es muy util es para borrar los documentos recientes ( Recent ) Esta El Bueno програма Перу Faltan Le Mas Que командос Los Que muestra Ель Archivo Допомоги Tengo Un Commando QUE ES Muy Util ес пункт Стерти Лос Documentos Recientes (останні)
nircmd execmd del “~$folder.recent$\*.lnk*” NirCmd execmd справі "~ $ folder.recent $ \ *. LNK *"
copien y peguen y lo guardan como limpiar.bat y listo yo lo probe y funciona. copien у peguen Y Lo guardan корисне limpiar.bat у Listo років ось зонд у Funciona. suerte!!! Suerte!