Skip to content Skip to content


How to integrate NirCmd with Launchy to enhance productivity Kā integrēt NirCmd ar Launchy produktivitātes paaugstināšanai

Logi

NirCmd NirCmd is a freeware utility that allows you to perform tasks from the command line, .bat files, desktop shortcuts and even ir freeware utilīta, kas ļauj veikt uzdevumus no komandrindas,. bat failus, darbvirsmas saīsnes un pat Launchy Launchy . . There's a large list of commands on the NirCmd website. Tur ir liels saraksts ar komandas NirCmd mājas lapā. 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. Esmu izraudzījās maz, ka es esmu atradis noderīgi, bet jūs varat atrast citu plaši izmantos NirCmd pēc iepazīšanās ar piemēriem. This was written and tested in WindowsXP but it should also work in other versions of Windows. Tas bija rakstīts un pārbaudīta WindowsXP bet arī strādāt citās Windows versijām.

To get started download Lai sāktu lejupielādi NirCmd NirCmd , the link is all the way at the bottom of the page. , Saite ir visu ceļu pie apakšā lapā. 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\ Blakus unzip uz mapes saturu, es ieteiktu kaut ko vienkāršu, piemēram, C: \ NirCmd \ ja izmantojat kaut kas cits, aizvietojuma ka visur, kur tu redzi 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. Piezīme: NirCmd var parādīt, kā vīrusu, spiegprogrammatūru vai potenciāli nevēlamu programmu par dažu anti-virus, anti-spyware programmām (Sophos ir viens), tas ir, jo daži vīrusi un spyware ietver un izmanto NirCmd veikt darbības lietotāju PC. 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. Tomēr to izmanto arī daudzas labas programmas, kā arī, piemēram, UBCD (kas man var attiekties vēlāk), un pats par sevi tas nerada risku.

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. Vienkāršākais veids, kā izmantot NirCmd ir komandrindas, tomēr šis raksts tiks vērsts uz to rakstveidā komandas noteikti failu un izmantojot darbvirsmas saīsnes un Launchy to vada. For a simple test, open up Notepad or your text-editor of choice and type in (or copy and paste): Par vienkāršu pārbaudi, atver Notepad vai jūsu teksta redaktora izvēli un veidu (vai kopēt un ielīmēt):

C:\nircmd\nircmd.exe monitor off C: \ nircmd \ nircmd.exe kontrolēt 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. Saglabāt failu C: \ NirCmd \ mapē, MonitorOff.bat precīzs nosaukums nav nozīmes, bet tam vajadzētu aprakstīt to, ko tā dara.


click to enlarge Uzklikšķiniet, lai palielinātu

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). Tagad jums ir jābūt MonitorOff.bat sēdes in C: \ NirCmd \ mapi, veiciet dubultklikšķi uz tā, lai jūsu monitoru elektroenerģijas taupīšanas režīms (vari pārvietot peli vai nospiediet taustiņu, lai ieslēgtu to atpakaļ). 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) . Jūs varat vieta saīsni MonitorOff.bat uz darbvirsmas, to darīt labo pogu noklikšķiniet uz MonitorOff.bat un izvēlieties Sūtīt Kam un noklikšķiniet uz Darbvirsma (izveidot saīsni). 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. Vēl viena metode, es vēlos izmantot, ir vienkārši izvēlieties MonitorOff.bat ar vienu klikšķi turot nospiestu taustiņu ALT un velciet failu uz darbvirsmu.


click to enlarge Uzklikšķiniet, lai palielinātu

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. Ja jūs uzmanīgi ar iepriekš screenshot, Jūs pamanīsiet citu. Bat faila nosaukumu wait2 screenshot.bat šis ir arī divu komandu jāgaida divas sekundes, un tad screenshot, kas tiek saglabāta kā shot.png in C: \ Nircmd tas nāk ērts iekarot screenshot, ja jūs nevarat vienkārši hit Ctrl + Print Screen, kuru es, ko es parasti izmantot ekrānšāviņi. Here is what the file contains: Šeit ir tas fails satur:

C:\nircmd\nircmd.exe cmdwait 2000 savescreenshot “C:\Nircmd\shot.png” C: \ nircmd \ nircmd.exe cmdwait 2.000 savescreenshot "C: \ Nircmd \ shot.png"

Next up is a useful desktop shortcut to mute and un-mute the sound. Nākamā ir noderīgs darbvirsmas saīsni mēms un ANO izslēgtu skaņu. In a new file enter: Ar jaunu failu ieraksta:

C:\nircmd\nircmd.exe cmdshortcut “~$folder.desktop$” “Mute Unmute” mutesysvolume 2 C: \ nircmd \ nircmd.exe cmdshortcut "~ $ folder.desktop $" Mute Ieslēgt mikrofonu "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 . Saglabāt failu C: \ NirCmdMute Unmute.bat jūs varat piezvanīt arī mainīt "Mute Ieslēgt mikrofonu" virs pēdiņās, lai kaut ko citu (piemēram, tīmekļa vietnē ir "Switch Volume"), tas mainīs nosaukumu desktop īsceļu, varat mainīt jebkuru shortcut nosaukumu vēlāk ar peles labo pogu noklikšķinot uz tā un izvēloties Rename. 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. Tagad divreiz uzklikšķiniet uz Mute Unmute.bat izveidot jaunu saīsni darbvirsmā, ka, ja izslēgtu skaņu pirmo reizi tas ir dubultās uzklikšķināt un ANO izslēgtu to nākamo. 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. Ja default ikonas pārāk garlaicīgi tas ir par jums, ar peles labo pogu noklikšķiniet Mute Ieslēgt mikrofonu saīsni uz darbvirsmas un izvēlieties Properties, izvēlieties Ātrais cilni augšpusē un noklikšķiniet uz Change Icon pogu. I personally like the speaker and music note icon as seen in the screenshot below. Es personīgi kā runātāja un mūzikas atzīmēt ikona kā redzams attēlā zemāk.


click to enlarge Uzklikšķiniet, lai palielinātu

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. Jautājums, kas sākotnēji lika man NirCmd bija kāds vēlas ātrs veids, lai pārslēgtos rezolūcijām, jo viņa gribēja mazāku rezolūciju vecākas programmas. 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. Šajā piemērā es izmantošu 800 × 600 ar 32 bitu krāsām, jo zemāku izšķirtspēju un 1280 × 1024 ar 32 bitu krāsām, jo lielāka izšķirtspēja, lai gan jūs varat aizvietot citas rezolūcijas, piemēram, 1024 × 768 vai platekrāna rezolūcijām, kā 1.440 × 900 un 1680 × 1050. The last number, color depth should be 32 unless you are running very old programs and want 16 bit colors. Pēdējais numurs, krāsu dziļums ir 32, ja jūs strādājat ar ļoti vecu programmu un gribu 16 bitu krāsām. First, for the lower resolution file enter: Pirmkārt, zemāku izšķirtspēju failu ieraksta:

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 un saglabājiet to in C: \ NirCmd800 × 600 Resolution.bat


click to enlarge Uzklikšķiniet, lai palielinātu

Moving on to the larger resolution, make a new file with: Pāriešanas uz lielāku rezolūciju, lai jaunu failu ar:

C:\nircmd\nircmd.exe cmdshortcut “~$folder.desktop$” “1280×1024″ setdisplay 1280 1024 32 C: \ nircmd \ nircmd.exe cmdshortcut "~ $ folder.desktop $" "1280 × 1024" setdisplay 1.280 1.024 32

and save it in C:\NirCmd as 1280×1024 Resolution.bat un saglabājiet to in C: \ NirCmd1280 × 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. Tagad jūs varat veikt dubultklikšķi uz katru no šiem padarītu darbvirsmas saīsnes nosaukumu 800 × 600 un 1280 x 1024, divreiz uzklikšķiniet uz darbvirsmas īsceļus, lai ātri mainītu izmēru darbvirsmas. 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. Kā Mute Ieslēgt mikrofonu Piemēram, jūs varat nomainīt ikonas, lai kāds jums justies kā, šeit ir divi es paņēmu no saistību nepildīšanas, kas, man būs jāatceras darīt pastu par pasūtījuma ikonas nākotnē.

Before moving into some more advanced command sets, I'll explain how this can work with Launchy. Pirms pārceļas daži spēcīgākās komandas noteikti, es ņemšu paskaidrojiet, kā tas var strādāt ar Launchy. Launchy should already scan the desktop for shortcuts and therefore find the examples that created desktop shortcuts. Launchy jau scan Desktop saīsnes un tādēļ ir jāatrod piemēri, kas izveidoti darbvirsmas saīsnes. However, you may not want to have all commands as desktop shortcuts, or you may want to type up commands on the fly. Tomēr, iespējams, nevēlaties, lai visas darbvirsmas saīsnes komandas, vai jūs varat ierakstīt līdz pat komandas lidot. To do either of these, the C:\NirCmd folder should be added to Launchy's catalog. Darīt kādu no šīm, C: \ NirCmd mape jāpievieno Launchy's katalogu. Bring up Launchy, Right-Click on it and select Options . Audzināt Launchy ar peles labo pogu uz to un izvēlieties Iespējas. 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. Šeit noklikšķiniet uz Catalog tab un hit + (plus) pogu zem Katalogi pievienot C: \ Nircmd, kamēr tā ir atzīmēta ierakstiet *. LPTP teksta ievades lodziņā zem failu tipu un nospiediet + pogu pa labi zem tā. Do the same thing for *.exe, then make sure the box next to Executables is checked. Vai pats par *. exe, tad pārliecinieties, rūtiņu blakus izpildāma tiek pārbaudīta.


click to enlarge Uzklikšķiniet, lai palielinātu

Now click Rescan Catalog and Launchy should add all of your .bat files in the folder as well as nircmd.exe . Tagad noklikšķiniet Pārskenēt Katalogs un Launchy vajadzētu pievienot visus jūs. Sikspārņu failus mapē, kā arī nircmd.exe. To try this, bring up Launchy and type: Izmēģināt šo, uzpilda līdz Launchy un tips:

MonitorOff MonitorOff

It should find the MonitorOff.bat before you finish typing, hit Enter to run it and it should turn off your monitor. Tā jāatrod MonitorOff.bat pirms esat pabeidzis rakstīt, hit Enter palaist to un to vajadzētu izslēgt monitoru. All of the other .bat files created in C:\Nircmd should also be accessible by typing their filename in Launchy. Visi citi. Bat failus, kas izveidoti in C: \ Nircmd arī būtu pieejama ierakstot savu filename in Launchy.

You can also enter an NirCmd command directly from Launchy, in the Launchy box type: Jūs varat arī ievadīt NirCmd komandu tieši no Launchy, jo Launchy lodziņā veids:

nircmd nircmd

Next hit the Tab key and you should get nircmd -> in the launchy window. Next hit Tab taustiņu un jums vajadzētu saņemt nircmd -> in launchy logā. You can then type any Nircmd command after the -> Jūs varat Ierakstiet Nircmd komanda pēc ->

nircmd -> screensaver nircmd -> ekrānsaudzētājs

will turn on the screensaver. kļūs par ekrānsaudzētājs.

There are a lot of commands and examples to try out, especially since you can have multiple commands in a single .bat file. Ir daudz komandu un piemērus izmēģināt, jo īpaši tādēļ jums var būt vairākas komandas single. Bat failu. Next up is a quick set of commands to tidy up Windows and logoff (good for a computer that has multiple users): Nākamā ātri noteikt komandu uzkopt Logi un logoff (labu datoru, ir vairākiem lietotājiem):

C:\nircmd\nircmd.exe emptybin C: \ nircmd \ nircmd.exe emptybin
C:\nircmd\nircmd.exe clipboard clear C: \ nircmd \ nircmd.exe starpliktuves skaidrs
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. Saglabāt kā Logoff.bat in C: \ NirCmd \ un ja esat gatavs, darbojas tā būs tukša visus pārstrādes tvertnes, skaidri datoru un atsakieties pašreizējam lietotājam, pārliecinieties, ka tikai pārbauda šoreiz vēlaties logoff kā tas aizvērt visas jūsu logiem, ieskaitot nesaglabātu dokumentu.

Note: Depending on your Launchy settings you may have to Rescan Catalog after making new .bat files or desktop shortcuts. Piezīme: atkarībā no jūsu Launchy iestatījumiem var būt Pārskenēt Catalog pēc tam, kad jauns. Bat failus vai darbvirsmas saīsnes. This option is on the General tab on the bottom as Minutes between catalog updates . Šis variants ir uz cilnes Vispārīgi par grunts, kā protokola starp katalogā atjauninājumi. 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. Ja Jums tā ir iestatīts uz 0, kas ir fiziska atjauninājumi tikai tad jums būs Pārskenēt katalogā kad vien vēlaties, jaunas komandas un saīsnes jāpievieno Launchy.

There are many more commands to cover, including ones that manipulate files, enter text, or even move and click the mouse. Ir daudz vairāk komandu, lai segtu izdevumus, ieskaitot tos, kas manipulēt failus, ievadiet tekstu vai pat pārvietoties un noklikšķināt peli. Please feel free to leave a comment requesting additional help or examples. Lūdzu, jūtieties brīvi atstāt komentāru lūdz papildu palīdzību vai piemērus.

Posted in Iesūtīts Guest Blogger Viesu Blogger , , Windows Logi . .

Related Posts: Related Posts:

Launchy – basic Weby tricks and appending to a text file Launchy - pamata Weby trikiem un pievienojot to teksta failu
5 Desktop Wallpapers that will increase your productivity 5 Desktop Wallpapers, kas palielinās produktivitāti
How to Enhance Video with the FFDShow Decoder Kā uzlabot Video ar FFDShow Decoder
10 Windows Application Launchers compared and reviewed 10 Windows Application palaišanas salīdzināt un jāpārskata
How to post to Twitter from the Linux command line Kā izlikt čivināt no Linux komandrindas

7 Responses 7 Atbildes

Stay in touch with the conversation, subscribe to the Uzturēt kontaktus ar sarunu, abonēt RSS feed for comments on this post RSS barību komentārus par šo ziņu . .

  1. Peter Gadd says Peter Gadd saka

    Haven't had a good look at this yet, but I think it would be more useful with AutoHotKey than Launchy. Nav bijis labs apskatīt šo vēl, bet es domāju, ka tas būtu noderīgi, nekā Launchy AutoHotKey.

  2. Enrique Enrique says saka

    Great tuto man!! Great tuto man!
    Thanks! Pateicība!

  3. colin says Colin saka

    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 hey liels pat strādā ar manu sākt app sauc par galveno uzsākšanas, bet es varu tikai iegūt kontrolēt off un tukša recycl, e bin strādāt par iemesliem, kāpēc nevaru saņemt vienu rezolūciju darbu un jūs varat likt lielāku par ;)

  4. Ian says Ian saka

    Good tutorial, but is there any way to Switch User? Laba pamācība, bet nav nekādā veidā Switch User? Launchy itself will only allow you to Log Off so hoping NirCmd can add this. Launchy pats tikai ļauj Log Off tā cerot NirCmd var pievienot to.

  5. Scott Strain says Scott Celma saka

    Colin: 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). Es neesmu pārliecināts, off-roku kāpēc kontrolēt skripts nedarbojas, es gribētu pārbaudīt, kuri rezolūcijās jūs varat izmantot jūsu monitora displeja iestatījumus (labo pogu noklikšķiniet uz darbvirsmas un izvēlieties īpašības un izvēlieties iestatījumu 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. Tad mēģināt noteikt tā, lai viens no tiem ar komandu C: \ NirCmd \ nircmd.exe setdisplay 1024 768 32 vai kāds rezolūcija jums rezolūcijas.

    Ian: 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. Es neredzēju visus komandas, lai pārslēgtos lietotājam NirCmd dokumentāciju, tomēr tas darbojas projekts, kurā viņi pievienot jaunas komandas ar katru jauno versiju, tāpēc es sazināsies dev komandu par panākt, lai to pievienot nākamo versiju. http://www.nirsoft.net/contact-new.html http://www.nirsoft.net/contact-new.html

  6. Keba says Keba saka

    I just configured launchy to use the killprocess command, on a window I specify in launchy. Es tikai konfigurēts launchy izmantot killprocess komandu, par logu es precizēt launchy.
    I used the 'runner' plugin for this. I izmantoti "runner" spraudnis uz to.
    I entered: I reģistrēta:

    “C:\WINDOWS\system32\nircmd.exe” "C: \ WINDOWS \ system32 \ nircmd.exe"
    and un
    ” 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. Izmantojot šo, es varu diezgan daudz darīt jebko, istead par pienākumu rakstīt jaunu sērijveida par katru mainīgo i need mainījusies.

    (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). (oh, un btw, iemesls, kāpēc man nircmd in system32, ir tāpēc, ka es nevaru palaist nircmd komandu vieglāk no "palaist", bez tipam, ja tas ir saglabāts).

  7. dangage says dangage saka

    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 bueno el programa pero le faltan mas Commandos que los que muestra el Archivo de ayuda tengo un desantnieks que es muy util es para borrar los documentos recientes (Jaunākās)

    nircmd execmd del “~$folder.recent$\*.lnk*” nircmd execmd del "~ $ folder.recent $ \ *. LNK *

    copien y peguen y lo guardan como limpiar.bat y listo yo lo probe y funciona. copien y peguen y lo guardan como limpiar.bat y listo yo lo zondi y funciona. suerte!!! suerte!



Some HTML is OK Daži HTML ir OK

or, reply to this post via vai, atbildot uz šo ziņu izmantojot trackback Trackback . .