topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Tuesday March 19, 2024, 2:55 am
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Author Topic: Farr Alias: nircmd alias  (Read 32191 times)

jgpaiva

  • Global Moderator
  • Joined in 2006
  • *****
  • Posts: 4,727
    • View Profile
    • Donate to Member
Farr Alias: nircmd alias
« on: July 27, 2007, 08:48 AM »
Here's an alias that uses nircmd to do several useful functions :)

ws-jgpaiva-cmd-alias-1.png

Here's the table describing this alias:

CommandDescriptionExample
cmdList all the commandscmd
ScreensaverStart your Screensaverscreensaver
MonitorTurn your monitor on or offMonitor on or Monitor off
LockPcLock your computer (the same as pressing windows+L)LockPc
Set ResolutionSet the resolution of your computer (width, height and depth)SetRes 800 600 32
ChangeVolumeIncrease or Decrease the master volume of your computer (varies from 0 to 65)ChangeVol +10 or ChangeVol -10
MuteToggle the mute status the computer soundmute or unmute
RebootRestart the computerReboot or Restart
ShutdownShutdown computerShutdown or PowerOff
StandbyGet the computer in standby stateStandby
LogoffLogoff from the current sessionLogoff

Note: Everything assigned in bold is a farr keyword. If you find any keyword is too long, just type part of it, then when it's the first result, press tab to autocomplete.
« Last Edit: November 01, 2009, 09:48 AM by jgpaiva »

lanux128

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 6,277
    • View Profile
    • Donate to Member
Re: Farr Alias: nircmd alias
« Reply #1 on: July 28, 2007, 03:04 AM »
nice work, jgp.. :up: i also would like to propose that a child board for Farr's aliases & plugins would make it easier to locate them.. :)

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,896
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: Farr Alias: nircmd alias
« Reply #2 on: July 28, 2007, 03:09 AM »
good point lanux, though i am in the process of building a new farr2 page, and here is one of the subpages:
https://www.donation...user/findrun/addons/

probably still a good idea to make a child board dedicated to such things.

lanux128

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 6,277
    • View Profile
    • Donate to Member
Re: Farr Alias: nircmd alias
« Reply #3 on: July 28, 2007, 03:27 AM »
i forgot that you're in the midst of building a Farr2 page, mouser.. btw, that page looks cool.. :)

davidma22

  • Supporting Member
  • Joined in 2008
  • **
  • default avatar
  • Posts: 20
    • View Profile
    • Donate to Member
Re: Farr Alias: nircmd alias
« Reply #4 on: May 29, 2008, 12:21 PM »
Sorry, I know this thread is kind of old, but could someone please explain how to install this plugin? It would really help if these things came with readme's...

Thanks.

tomos

  • Charter Member
  • Joined in 2006
  • ***
  • Posts: 11,958
    • View Profile
    • Donate to Member
Re: Farr Alias: nircmd alias
« Reply #5 on: May 29, 2008, 02:54 PM »
Sorry, I know this thread is kind of old, but could someone please explain how to install this plugin? It would really help if these things came with readme's...

unzip - the zip has a nircmd folder already in it,
copy that folder into the AliasGroups/Installed directory plugin folder in the FindandRunRobot install folder
hope that makes sense!
Tom
Tom
« Last Edit: May 29, 2008, 03:42 PM by tomos »

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,896
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: Farr Alias: nircmd alias
« Reply #6 on: May 29, 2008, 03:34 PM »
Not in the plugin directory, in the Aliases/Installed directory.

tomos

  • Charter Member
  • Joined in 2006
  • ***
  • Posts: 11,958
    • View Profile
    • Donate to Member
Re: Farr Alias: nircmd alias
« Reply #7 on: May 29, 2008, 03:44 PM »
Not in the plugin directory, in the Aliases/Installed directory.

sry, just read "plugin" & started typing :)
Tom

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,896
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: Farr Alias: nircmd alias
« Reply #8 on: May 29, 2008, 04:16 PM »
in reality it will work in the Plugins directory too, but the proper place for it is as a subdirectory of AliasGroups/Installed.

davidma22

  • Supporting Member
  • Joined in 2008
  • **
  • default avatar
  • Posts: 20
    • View Profile
    • Donate to Member
Re: Farr Alias: nircmd alias
« Reply #9 on: May 29, 2008, 08:54 PM »
Thanks guys. That's perfect. Easy enough. Like I said though it might not hurt for plugin writers to include a little readme file with the simple instructions. (Though it should also mention that you need to restart FARR for the plugin to take effect.)

Thanks again. Love this program.

EDIT: Quick question about this plugin. It has standby, but it seems to be missing a command to put the computer in Hibernate (which I use far more often.) Is there any way for me to add that myself? Thanks.
« Last Edit: May 29, 2008, 08:57 PM by davidma22 »

nitrix-ud

  • Charter Member
  • Joined in 2005
  • ***
  • default avatar
  • Posts: 560
    • View Profile
    • Donate to Member
Re: Farr Alias: nircmd alias
« Reply #10 on: May 30, 2008, 02:00 AM »
it is not a plugin per se
it is only an alias ;)

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,896
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: Farr Alias: nircmd alias
« Reply #11 on: May 30, 2008, 02:06 AM »
it seems to be missing a command to put the computer in Hibernate (which I use far more often.) Is there any way for me to add that myself?

Yes.

This alias pack uses the commandline tool NirCmd from Nirsoft.
That tool does have support for sending the computer into hibernate mode.

So, all you need to do is add a new alias to the pack which calls NirCmd with commandline parameter to hibernate.

See if you can figure out how to do that yourself, since it would be a good learning experience -- if you can't, come back and we will help.

(ps. one way to make your life easier is to move the alias pack from the AliasGroups/Installed to AliasGroups/MyCustom while you edit it since that will allow you to edit it from within FARR).

And if you figure it out, please share it so we can add the new hibernation alias to the official alias pack.  :Thmbsup:

davidma22

  • Supporting Member
  • Joined in 2008
  • **
  • default avatar
  • Posts: 20
    • View Profile
    • Donate to Member
Re: Farr Alias: nircmd alias
« Reply #12 on: May 30, 2008, 02:36 AM »
I did it!  ;D

Not exactly sure what the format for this should be, so I'll just copy/paste what I did. I copied the line for Standby, changed the right places so they said hibernate, used the same image (since windows uses the same one, it's just a slightly darker color), and changed the windows cmd command to Hibernate. Simple enough. (Tested it too, just in case. It works fine.) Thanks for the help and the push Mouser.

EDIT: Forgot to say what I named the Alias, but I guess people can name it whatever they want. Personally I prefer using "Sleep" since it's shorter and easier to type than "Hibernate".

Hibernate Computer | %ALIASDIR%nircmd.exe qboxcom "Do you want to Hibernate the computer?" "question" Hibernate /ICON=nircmd_icons\Standby.ico
« Last Edit: May 30, 2008, 02:38 AM by davidma22 »

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,896
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: Farr Alias: nircmd alias
« Reply #13 on: May 30, 2008, 02:37 AM »
good work and welcome to the FARR customization club  :up:

davidma22

  • Supporting Member
  • Joined in 2008
  • **
  • default avatar
  • Posts: 20
    • View Profile
    • Donate to Member
Re: Farr Alias: nircmd alias
« Reply #14 on: May 30, 2008, 02:55 AM »
Thanks. Another question for ya. I added an alias that uses nircmd's emptybin function to empty my recycling bin, but I can't find the recycling bin image on my computer anywhere... any idea where I would look for that? Thanks.

Grorgy

  • Supporting Member
  • Joined in 2007
  • **
  • default avatar
  • Posts: 821
    • View Profile
    • Donate to Member
Re: Farr Alias: nircmd alias
« Reply #15 on: May 30, 2008, 03:23 AM »
you can find most of the standard icons in windows\system32\shell.dll  at least thats where i found 'em  ;)

tomos

  • Charter Member
  • Joined in 2006
  • ***
  • Posts: 11,958
    • View Profile
    • Donate to Member
Re: Farr Alias: nircmd alias
« Reply #16 on: May 30, 2008, 03:34 AM »
Thanks. Another question for ya. I added an alias that uses nircmd's emptybin function to empty my recycling bin, but I can't find the recycling bin image on my computer anywhere... any idea where I would look for that? Thanks.

is it under
C:\WINDOWS\system32\shell32.dll  [missed your reply there Grorgy]
(I've messed around with my icons -got the Tango pack to replace all windows icons :-* so not quite sure if that correct location)

I'm afraid the hibernate alias doesnt show for me -
I tried it in FARR as you recommended mouser
Duplicated Standby, changed name and added your alias David

I notice FARR options show Reboot & a bunch of others under the nircmd alias that dont show in FARR window - anyone got any ideas there?
Tom
« Last Edit: May 30, 2008, 03:36 AM by tomos »

Grorgy

  • Supporting Member
  • Joined in 2007
  • **
  • default avatar
  • Posts: 821
    • View Profile
    • Donate to Member
Re: Farr Alias: nircmd alias
« Reply #17 on: May 30, 2008, 03:35 AM »
oooops yeah like tomos says shell32   sorry  :-[

tomos

  • Charter Member
  • Joined in 2006
  • ***
  • Posts: 11,958
    • View Profile
    • Donate to Member
Re: Farr Alias: nircmd alias
« Reply #18 on: May 30, 2008, 03:36 AM »
oooops yeah like tomos says shell32   sorry  :-[

noo nooo, you got there first  :D
Tom

davidma22

  • Supporting Member
  • Joined in 2008
  • **
  • default avatar
  • Posts: 20
    • View Profile
    • Donate to Member
Re: Farr Alias: nircmd alias
« Reply #19 on: May 30, 2008, 05:57 AM »
Hm. Did you move the nirCMD folder into your custom alias folder before you edited? Here's what I did exactly. I moved the folder over to my custom aliases (and then restarted FARR), chose the NirCMD aliases from the list (where Reboot, Standy etc are listed). Right-clicked, selected Add New Alias, called it "Sleep", used the result from my previous post, and restarted FARR again. After that it worked fine.

EDIT: Okay, I know what the problem is. I added my alias to the list without adding it to the CMD group. So when you type CMD, it doesn't show up, but if you just type "Sleep" or whatever you call it, it will still show up and run fine.
« Last Edit: May 30, 2008, 05:58 AM by davidma22 »

davidma22

  • Supporting Member
  • Joined in 2008
  • **
  • default avatar
  • Posts: 20
    • View Profile
    • Donate to Member
Re: Farr Alias: nircmd alias
« Reply #20 on: May 30, 2008, 06:02 AM »
Okay here's how to add it so that it shows up when you type CMD. In the list of NirCMD aliases, edit CMD. Down at the bottom, add this line.

Hibernate Computer | restartsearch Hibernate /ICON=nircmd_icons\Standby.ico

After that it will show up and run if you type CMD first. But like I said, it's much quicker just to type the alias name rather than type CMD first.

tomos

  • Charter Member
  • Joined in 2006
  • ***
  • Posts: 11,958
    • View Profile
    • Donate to Member
Re: Farr Alias: nircmd alias
« Reply #21 on: May 30, 2008, 06:22 AM »
Okay here's how to add it so that it shows up when you type CMD. In the list of NirCMD aliases, edit CMD. Down at the bottom, add this line.

Hibernate Computer | restartsearch Hibernate /ICON=nircmd_icons\Standby.ico

After that it will show up and run if you type CMD first. But like I said, it's much quicker just to type the alias name rather than type CMD first.

got that, thanks :up:
Tom

delwoode

  • Supporting Member
  • Joined in 2008
  • **
  • Posts: 146
    • View Profile
    • Donate to Member
Re: Farr Alias: nircmd alias
« Reply #22 on: November 01, 2009, 07:51 AM »
why all the files in the zipped folder?
apart from the nircmd.exe  there were 4 alias files
nircmd.alias
nircmd.alias~
nircmd.alias.bak
nircmd.alias.bak~
do I need all these?
also my antimalware program didnt like nircmdc.exe and removed it but it thought nircmd.exe was fine

jgpaiva

  • Global Moderator
  • Joined in 2006
  • *****
  • Posts: 4,727
    • View Profile
    • Donate to Member
Re: Farr Alias: nircmd alias
« Reply #23 on: November 01, 2009, 09:49 AM »
You're right, delwoode. I have removed the superfluous files, and removed the nircmdc.exe file (which wasn't being used anyway).

koro

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 7
    • View Profile
    • Donate to Member
Re: Farr Alias: nircmd alias
« Reply #24 on: December 13, 2009, 12:00 PM »
For those of you having problems with hibernate instead of suspend, I'd like to point out that you don't need nircmd to do this.
You can just create a new shortcut called "hibernate" and place it anywhere in the search path of FARR.
The command to be executed by the shortcut is the following:

%windir%\System32\rundll32.exe powrprof.dll,SetSuspendState Hibernate

For other options, you can create shortcuts like this:

For Shutdown: %windir%\System32\shutdown.exe -s
For Reboot: %windir%\System32\shutdown.exe -r
For Logoff: %windir%\System32\shutdown.exe -l
For Standby: %windir%\System32\rundll32.exe powrprof.dll,SetSuspendState Standby