Disable OSP System Beep (PC Speaker) - okuma

The control screen beeps when I type or touch anything. Every key stroke.
How can I disable this? Is there a way to do this by command line interface?

I was able to temporarily disable the beep with net command.
C:\Users\Administrator>net stop halbeep
The HalBeep service was stopped successfully.

I bet most Okuma users don't even hear the beep, seeing as how noisy a lot of factory floors are.
In a lab environment though, it can be quite annoying.
Thankfully, turning it off is easy.
Open the start menu (CTRL + ⎚ OR CTRL+ESC)
Type "CMD" + ⎆ To open the Command Prompt
Type "sc stop halbeep" to disable the beep
Type "sc config halbeep start= disabled" to stop the service from starting again

Related

Avoid pausing tasks when select something on PowerShell and Command Prompt

When I click and select texts on PowerShell and Command Prompt, running tasks always be paused. How can I avoid this?
I'd like to avoid accidental stopping tasks by unexpected mouse control. ( I just need normal selecting behaviors with no side effects like mac or linux terminal. )
I tend to like this feature or maybe I am just use to it. Sometimes it is nice to pause a task.
i hit one of the arrow keys to "unpause" something when I want it to continue.
https://www.vistax64.com/threads/script-pauses-when-you-click-in-the-powershell-text-window.112032/
The only method I know of changing this is the "Quick Edit" setting, via the registry
HKCU\Console\QuickEdit 0x1 (on) 0x0 (off)
Or by going to the properties of the console windows (right click on title bar, Properties) to change the setting:

Windows 10 Search after first press of Control-Escape not working, Cortana disabled in policy/registry

This is a unique problem I have and I've searched and am unable to find a solution. This is on Windows 10, with latest updates, as of up to 9/28/2017, for the past few months. I have disabled Cortana via registry and policy. If after using system for a bit (say, 10+ seconds), and I hit Control-Escape, it brings up the start menu. Search never works. I'm a touch typist so this is really annoying. I want to hit Control-Escape and start typing my search, which works fine on other people's computers.
For example, to run cmd.exe, my typing is "Control-Esc,c,m,d,Enter". On my system, search doesn't come up and my c,m,d keystrokes don't go anywhere. I have to wait a second, then redo this, and it will work. I don't have a Run key, and I'm really used to this Control-Escape, then start typing method, and ideally would like to keep using it.
One "solution" I've found is that if I taskkill Cortana, it stays killed for a bit (like 10-15 seconds?), then comes back. If I taskkill Cortana, then hit control-esc within a few seconds, search always works. My temporary "solution" is to use auto-hotkey, and this script:
^Esc::
Process,Close,SearchUI.exe
KeyWait Esc
KeyWait Ctrl
Send {LWin}
Return
This intercepts the control-esc sequence, and kills Cortana instead, then waits until control and escape keys are released, then presses windows key (found this tip in another stackoverflow question/answer).
Anyone have any other ideas how to fix this, or what causes it? My guess is Cortana is somehow trying to do something and it's timing causes search to fail. Thanks!

Custom Keyboard Shortcut Service Not Working 10.11 (el capitan)

I've seen a few questions dealing with this issue but nothing recently. I'm not sure if El Capitan (10.11) is breaking something, and I'm an AppleScript (and Automator) newbie.
I just want to have the basic functionality where a keyboard shortcut opens a new terminal window in the space I'm in. After doing the following things, absolutely nothing happens when I trigger the keyboard shortcut
1. Create an Automator Service
Open Automator and choose Service for my document type.
Set Service recieves selected to no input
Drag a Run AppleScriptaction into my workflow.
on run {input, parameters}
tell application "Terminal"
do script ""
activate
end tell
return input
end run
(At this point, running the workflow from automator by pressing Play opens a new terminal window correctly).
Save the service as Launch New Terminal Window
2. Assign a Keyboard Shortcut
Open System Preferences -> Keyboard -> Shortcuts -> Services
Assign Shift Command T to Launch New Terminal Window
When I try my new command, nothing happens.
Note, I tried to delete the service and retrace my steps. When I recreated a new service with the same name, the keyboard shortcut was remembered by the system. Does anyone know which .plist/where these keyboard shortcuts are saved?
If anyone can help me out, that would be great. A 30 second project has turned into 30 minutes of hair pulling.
I also encountered a similar problem. The issue is that, most probably some other application is using the key combination that you tried. You can check by using a bizarre key combination and check whether it works and then modify it. Try using something like Shift + alt + command + G. Or something like this ( use at least 4 keys ). It worked for me. Hope it helps you.
For future reference, since it seems a very common question, I think the only reason why a shortcut won't work is that it's being used by other application, as 2XSamurai said.
You can have quick feedback if the shortcut is going to work or not by navigating to Finder and then Services.
If your brand new shortcut is showing next to the service you created, that means is going to work, otherwise, it won't.
No need to perform other actions, you just need to pick a good shortcut. Somewhere on the web, you may also read that you must include the command key to make your shortcut work. That's also not necessary (see the screenshot with just ctrl + T combination working just fine).
PS I can't post pictures on answers yet so StackOverflow generated links to the images instead, but this caused the answer to broke (I was getting a message error stating there was code in my answer (??), so no screenshots, sorry, I hope the answer is clear enough even without them :)
I did exactly what you've described (Automator Service, no entry, only one Applescript Action, and assign the Automator Service to short cut key (in my case command shift Y).
All is working OK on my ElCapitain with bellow script in Automator action : (I mean the short cut opens a new Terminal window as expected)
tell application "Terminal" to activate
tell application "System Events"
tell process "Terminal"
keystroke "n" using {command down}
end tell
end tell
But I still ask myself the basic question : what do you really want to achieve ? usually the bash instruction could be done in do shell script command...no need for Terminal window... may be you have an other constraint.
I had the same problem before, solved it somehow, forgot about it and ran into it again when setting up a new MacBook today.
This solution works for me on several Macs:
Instead of using System Preferences -> Keyboard -> Shortcuts -> Services (screenshot 1 - for some reason I'm not allowed to insert pictures directly into posts) you can use
System Preferences -> Keyboard -> Shortcuts -> App Shortcuts (screenshot 2).
There you have to spell out the name of your service.
There are some issues with the App Shortcuts menu as well. For example a shortcut for the "Tags..." menu in Finder simply won't work but for services it works for me.

Command prompt gets stuck and continues on enter key press

Does anyone come across a scenario when the command prompt is running a process and then it gets stuck and the process is also sleeping.
Then when we press Enter key in the cmd window the process continues.
Is there any way to avoid this?
or can this be handled??
The other answers are wrong! The Windows console has a separate mode called "mark mode" for selecting text. In that mode the screen will be frozen, texts will go into the buffer and if the buffer is full the running process will be blocked
If quick edit mode is enabled (by default it's disabled in older Windows but enabled in Windows 10) then clicking inside the console window will activate mark mode and result in what you observed
It's very easy to accidentally click the console and stop the command. When you press Enter or Esc the selected text will be copied to clipboard and mark mode will be exited, therefore the process will run again. Priority is absolutely irrelevant here because if the buffer is full then the process is blocked forever until you exit mark mode, regardless of the priority. The console does nothing to change the priority when there are some inputs. Try opening an app that outputs a lot of data in the highest priority and click the console, the app will still be blocked indefinitely even if the CPU is in idle
Here's an example of QuickEdit mode setting in Windows 8 console:
To fix this you can disable QuickEdit mode if you don't need it. In this case copying will be more troublesome because you must open the context menu, select Edit > Mark. You can also disable QuickEdit mode by setting ENABLE_QUICK_EDIT_MODE with SetConsoleMode() if you're writing your own console application
See also
How and why does QuickEdit mode in Command Prompt freeze applications?
What does it do exactly if I click in the window of cmd?
Turn off Windows 10 console "Mark" mode from my application
If other processes are sucking all the cycles and have a higher prio, then your process might be stopped. A user input might just give it a prio boost, so it starts again. See Microsoft Docs at https://learn.microsoft.com/en-us/windows/win32/procthread/priority-boosts for more information.
It happened to me today while executing a batch file that includes TFSBuild.
I already received email notification from TFSBuild that it is successful, but somehow the batch file did not proceed to the next line.
I waited 1 hour.
I pressed Enter, Mark for Edit etc. but none of that worked.
Then I hit Ctrl+C to try to terminate the batch file.
When asked if I want to terminate, i entered N.
Weirdly enough, the batch file continued after that.

Clearing the Windows "Run" dialog history without rebooting

I am currently working on a program to immediately clear the list of previously-run-commands which appears in the Windows Start -> Run dialog. The procedure for clearing this list by removing the HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\RunMRU key is well documented; however, before these changes take effect, it seems to be necessary to do one of the following:
Restart the computer
Select Start -> Shut down, and then select Cancel.
Neither of these is ideal for the task I am trying to accomplish: #1 is extremely disruptive to the user, and #2 appears to require additional user interaction.
Does anyone know how to immediately (and programmatically) force a reload of this information without requiring any user interaction, while also minimizing disruption of the user's other activities? I would like for the user's Run history to be cleared out immediately after executing my program, without requiring any further action on their part (such as using the "Shut Down" -> "Cancel" trick in #2 above) or forcing a reboot.
Or, to approach the problem from a different angle: When clicking Start -> Shut Down -> Cancel, Windows Explorer reloads the RunMUI key. Is there a way to force a similar reload without having the user select Shut Down and then Cancel?
Things I have already tried:
Monitoring the explorer.exe status using procmon while selecting Shutdown and then Cancel. I see Explorer writing to the RunMRU key, but have not been able to determine what triggers this.
Numerous Google searches along the lines of "reload runmru without reboot". Most results still recommend method #1 above, although a few suggest #2.
Limited MSDN API examination. The RegFlushKey call appears promising, but I haven't ever used it before, so I don't know if it will apply to registry information cached by different processes.
Any suggestions or other information would be greatly appreciated.
Have you tried ccleaner?
http://www.ccleaner.com/
Not a full answer to your question, but I did find a third way to trigger the clearing of the run command from this article in PC Mag.
Killing explorer.exe and then restarting it will also clear the run list after the registry modification.
I have a nasty hack for you. Show the window programatically, hide it immediately (programatically) and click cancel on it (well, you guessed, programmatically).
You might try looking for the icon cache flush API, or other ones, I wouldn't be too suprised if they had side effects like the one you are looking for.
I've seen instances where it actually works, even the F5 key doesn't work? Try this, ctrl>alt>delete then go to task manager, processes tab...end explorer.exe. Then click on file new task and type explorer.exe, then check...does that work?
Windows XP
Right click on the taskbar
Properties menu option
Start Menu tab
Customize button
Programs pane
Clear List
Click on OK
This calls a Windows API function that refreshes the explorere.exe taskbar process and also clears the list (no need for registry edits).
As far as I know, it relies on the explorer.exe process that hosts the start menu/taskbar/desktop being closed and reopened. There is no "clean" way to do this that I am aware of.
If you really need to do this without user interaction, you need to close all explorer.exe processes and relaunch one.
Here's a rudimentary C# program to do that;
using System.Diagnostics;
Process[] procs = Process.GetProcessesByName("explorer");
foreach (Process proc in procs)
{
proc.Kill();
}
Process.Start("explorer.exe");
Note that this will close all "Windows Explorer" windows open, and may or may not open an additional "Windows Explorer" afterwards.
I just tested that on Windows XP 32bit, and it did indeed clear the Run command cache.
HKEY_CURRENT_USER\ Software\ Microsoft\ Windows\ CurrentVersion\ Explorer\ RunMRU\

Resources