topbanner_forum
  *

avatar image

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

Login with username, password and session length
  • Friday April 19, 2024, 6:07 pm
  • 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: Lunch DOS commands directly  (Read 3722 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 AM »
Good morning,

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

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,900
    • 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 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:
https://www.donation...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 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:
https://www.donation...index.php?topic=9365
while "nircmd" is interesting it's less powerful then "cmd"

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: 267
    • View Profile
    • Donate to Member
Re: Lunch DOS commands directly
« Reply #3 on: September 21, 2015, 02:54 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 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


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