Home | Blog | Software | Reviews and Features | Forum | Help | Donate | About us
topbanner_forum
  *

avatar image

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

Login with username, password and session length
  • December 03, 2016, 03:38:16 AM
  • Proudly celebrating 10 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: Lunch DOS commands directly  (Read 848 times)

craziedde

  • Participant
  • Joined in 2015
  • *
  • default avatar
  • Posts: 3
    • View Profile
    • Donate to Member
Lunch DOS commands directly
« on: September 20, 2015, 06:59:00 AM »
Good morning,

How to launch DOS commands directly from FARR?
Example: shutdown /l

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 36,405
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: Lunch DOS commands directly
« Reply #1 on: September 20, 2015, 07:12:34 AM »
This isn't exactly what you were asking, but the nircmd alias is a great one for things like shutting down pc and other system functions:
http://www.donationc...index.php?topic=9365

In general you can put any dos commands in a .bat file and put that batch file someplace that FARR can find it and launch it.

craziedde

  • Participant
  • Joined in 2015
  • *
  • default avatar
  • Posts: 3
    • View Profile
    • Donate to Member
Re: Lunch DOS commands directly
« Reply #2 on: September 20, 2015, 07:29:15 AM »
This isn't exactly what you were asking, but the nircmd alias is a great one for things like shutting down pc and other system functions:
http://www.donationc...index.php?topic=9365
while "nircmd" is interesting it's less powerful then "cmd"

Quote
In general, you can put any dos commands in a .bat file and put that batch file someplace that FARR can find it and launch it.
This is also a viable option, but yet defeats this particular purpose → "quick and dirty" command run at any time.

In fact, if "shell runned commands" were runned in current directory this would make it even sweater :)

skajfes

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 231
    • View Profile
    • Donate to Member
Re: Lunch DOS commands directly
« Reply #3 on: September 21, 2015, 02:54:07 AM »
There is an option for that in FARR.
Go to options -> Launching files. At the bottom, there is a Misc section, enter shellexec $$1 and you're good to go.
Screenshot

You then just type in your command in farr and press enter. The trick is that if there is no results FARR will launch the search string using cmd.

Usually when you type in a shell command with parameters etc it will not match any documents so you're good to go. For example ping google.com, shutdown /l etc

If you execute commands that match some files you can use an alias. For example, create an alias with regular expression ^cn (.*) and result shellexec $$1, then you type in cn <your command with arguments> and it should execute.
It is impossible to make anything foolproof because fools are so ingenious.

craziedde

  • Participant
  • Joined in 2015
  • *
  • default avatar
  • Posts: 3
    • View Profile
    • Donate to Member
Re: Lunch DOS commands directly
« Reply #4 on: September 21, 2015, 09:13:33 AM »
There is an option for that in FARR.
Go to options -> Launching files. At the bottom, there is a Misc section, enter shellexec $$1 and you're good to go.
Screenshot

You then just type in your command in farr and press enter. The trick is that if there is no results FARR will launch the search string using cmd.

Usually when you type in a shell command with parameters etc it will not match any documents so you're good to go. For example ping google.com, shutdown /l etc
This option was a little unpredictable as was picking up other programs


Quote
If you execute commands that match some files you can use an alias. For example, create an alias with regular expression ^cn (.*) and result shellexec $$1, then you type in cn <your command with arguments> and it should execute.

Yes, this option worked for me, with a little option. Thank you
2015-09-21_10h11_30.pngLunch DOS commands directly