Taking over the Windows Run command on 'File not found' - windows

When you hit the WIN+R (Run command) in windows, you get the Run Box:
How can I get a handle to this command incase an entry for what I am typing is not found?
For example, this works great when you type cmd or calc.
But when you type: thisawesomething and hit the return key, you are greeted with this:
What I want to do is either of these two:
Whenever the file, folder or resource is not found via RUN, a default program (which I specify) is fired.
OR
If I can have a program running in the background which listens to an event raised by Windows when it can't find a file, what event am I looking for?
Is this even possible?
I have tried searching for this quite a bit but have hit a wall. Any help or a push in the right direction would be appreciated.
Note:
This article mentions that if I fire the RUN command programatically, there is a way to handle the notification of which program is about to be run. However, I am looking to modify (or patch) the default Windows Run functionality and not fire this programatically from another app. Thanks.

Related

Run a hidden cmd on click

This is driving me crazy. I have a pretty application that does.. well, things. To start it up, some start.cmd needs to be executed. What start.cmd does is to set up some environment variables, check a few things and then start my main GUI program.
Now, everything works fine: when I click on my start.cmd everything gets launched properly. However, clicking on start.cmd causes an ugly, ugly cmd.exe to appear for an instant and then disappear. This is unacceptable!
I started looking around and I found this. It suggests to use some wscript invisible.vbsto run my start.cmd. This, however, works fine from the terminal, but I can't click on invisible.vbs directly to get what I need.
This is where I thought that I could use shortcut with the wscript invisible.vbs start.cmd command in it. However, you cannot make relative path shortcuts in Windows, which means that if I use a shortcut I will never be able to move my folder again, which is pretty bad if I need to install it around my users' computers.
So I really have no clue on how to get this apparently trivial thing done: how can I get a start.cmd batch file executed without anything showing and without having to launch anything from the terminal, and in a way that will allow me to move my folder around?
Check the hidder.bat . You can use it to wrap a .bat or .exe file into iexpress executable file that will be ran in hidden mode.To use you need:
hidder.bat example.bat hiddenExample.exe
this line will create a hiddenExample.exe which clicked will start your bat in hidden/background mode.You can also take a look at this question

Parse.exe crashing and no creating necessary files

I'm trying to start learning parse cloud code. When I launch the parse.exe via my command line, various terrible things happen. For example, if I try to launch it using any kind of a command, but it's not set to "launch as administrator", I will see no text from the program(it will expect me to input my email and password, yet I will see no text I would see if I launched it as administrator). If I run it as administrator, it ends up consistently crashing during any activity. For example, if I try to go for >parse list, I will get to login, the list of apps appears and then the window instantly closes. Strictly following the tutorial(https://www.parse.com/apps/quickstart#cloud_code/windows) crashes midway as well. Doing >parse new for my existing app creates parse.local and parse.project files in the specified directory, but none of the rest files expected. I cannot seem to find the I'm pretty much lost here. Am I doing something wrong? I have the latest parse.exe thing, redownloaded it from multiple locations provided by parse.

How do I pause a vlc process from the command line? [duplicate]

Well i have an adobe air which runs vlc-player at background as service. i check that in Windows Task Manager , the service runs when air application launches.
here is the code
processArgs.push("--extraintf");
processArgs.push("rc"); //Remote control
processArgs.push("--rc-fake-tty"); //Use terminal as output
processArgs.push("screen://");
processArgs.push(":screen-fps=15");
processArgs.push(":screen-caching=100");
processArgs.push(":sout=#transcode{venc=x264{bframes=0,nocabac,ref=1,nf,level=13,crf=24,partitions=none},vcodec=h264,fps=15,vb=3000,width=800,height=600,acodec=none}:duplicate{dst=std{mux=mp4,access=file,dst='"+targetFile.nativePath+"'}}");
startupInfo.arguments = processArgs;
p = new NativeProcess();
p.addEventListener(ProgressEvent.STANDARD_OUTPUT_DATA, onOutputData);
p.addEventListener(ProgressEvent.STANDARD_ERROR_DATA, onErrorData);
p.addEventListener(NativeProcessExitEvent.EXIT, onExit);
now i want to close vlc-player on the button click event and i have searched the vlc- documents and found quit command and its syntax, it does not work as i have tried that syntax from windows command prompt also..
Which are the vlc-player commands that can pause,stop and close vlc-player??
Any useful link will be much helpful to me..
I've had quite a look around and looks like this (--rc-fake-tty) can't be done from Windows command line. Which means your current approach is out.
I don't no anything about Adobe but I have done some searching around and this guy has something written in C using the libVLC. Not sure if that will help or point you in the right direction.
The other thing I found was this post Adobe Air and VLC player which mentions that you should be able to use javascript and ActiveX controls on Windows. A guy in this forum has a javascript script which uses an ActiveX control to start, stop, pause etc.
There is a VLC command that you can send to override or set certain hotkeys. Search for next, prev, stop, quit, vol-up, etc in this document.
That's the best of my Googling abilities, hope it helps.
I dont want to agree that your code runs well on windows, becasue --rc-fake-tty will not run on windows, to hide the entire vlc window (it will be listed among the processes in Windows Task Manager) use --rc-quiet but to see command window use --no-rc-quiet.
To stop and quit using p.standardInput.writeUTFBytes("stop" + "\n"); is not working for me as well.

My Ruby files don't run correctly

When i click on a .rb file to run it a CMD window pops up for a brief second and then closes again. This is probably a really nooby question thats easily fixed but i've looked everywhere for help. But like i said it pops up for a brief second and i THINK while its up its executing the code but when the codes done it closes so i don't know if i'm making mistakes in code or other important things like that.
Run the program through the command prompt (CMD), that way you can see the result, otherwise the window closes when the program exits.
Alternatively, you can prevent the program from exiting by putting some sort of blocking instruction at the end of the script, such that the program waits for user input before exiting.
Press Windows_Key+R and then type CMD. Browse to the location of the file and then type ruby your_ruby_file.rb. The program is running, but Windows automatically closes the window upon completion of the command.
To get Windows to run your *.rb files through Ruby when you click on them in the UI, you have to associate the .rb extension with the ruby.exe executable. Such an association is called a "Windows File Association." Here's a Microsoft Knowledge Base article that'll tell you how to create such a thing.
http://support.microsoft.com/kb/307859

Do webdevelopers need "confim resend" protection?

I use firefox for my web development and I bet most of you guys too. I've been doing a lot of form development recently and this annoying message
"To display this page, Firefox must send information that will repeat any action (such as a search or order confirmation) that was performed earlier."
is just beginning to piss me off.. I mean, come on! I don't need protection on my localhost, thank you! So, my question is: are you aware of any config, hack, plugin to suppress it? If not, how do you live with it?
Apparently there is neither configuration option nor extension to turn off this annoying confirmation window.
However, the workaround I use is as follows.
Download and install application AutoHotkey from: http://www.autohotkey.com/
Create the following script:
^f5::
Send {f5}
sleep 100
Send {enter}
Save with .ahk extension.
Double click to run it (a new icon should show up in the system tray).
Now every time you press Ctrl+F5, the script presses F5 and then Enter. Voila, the confirmation window supressed.
Here's an equivalent of Patrick's answer for Linux users (Ubuntu in my case).
Install autokey (it's in the repos). Add this python script:
import time
keyboard.send_keys("<f5>")
time.sleep(0.5)
keyboard.send_keys("<enter>")
Hook this script to f5 and you will never see the confirm message again. Tested with latest firefox.

Resources