3

I just upgraded from Windows 8.1 to Windows 10 Pro, and I'm really enjoying the new calculator application, except for the fact that it opens a new instance every time I use my keyboard's calculator key.

Is there a way to force it to be a single-instance application like the calculator in Windows 8.1 was without forcing me to use a different application?

Peter Mortensen
  • 12,090
  • 23
  • 70
  • 90
holiveira
  • 1,311
  • 3
  • 13
  • 15
  • If it is possible it would require third-party software to accomplish. – Ramhound Sep 16 '15 at 18:22
  • 1
    On my Windows 7 and 8.1 machines, Calc opens a new instance each time it's run (or I hit the calculator button on the keyboard). So the functionality you say you're missing from Windows 8.1 didn't actually exist (at least not without a custom solution of some kind). How does it act if you try to run multiple copies of the Calculator via a shortcut (or by running `calc` multiple times)? – Ƭᴇcʜιᴇ007 Sep 16 '15 at 18:26
  • What kind of Keyboard do you have, and do/did you have software utilities from the manufacturer loaded? Judging by this [SU question/answers](http://superuser.com/questions/230414/multiple-copies-of-windows-calculator) apparently the MS keyboard drivers/utilities can mess with this. – Ƭᴇcʜιᴇ007 Sep 16 '15 at 18:31
  • I only used the Microsoft Mouse and Keyboard Center in Windows 8.1 (I have the Microsoft Wireless Keyboard 2000 with mouse combo) and the calc key on the keyboard only opened one instance of the app. If I already had it open, the key would bring the app to the front and keep it in focus. – holiveira Sep 16 '15 at 18:33
  • [This thread might be helpful](http://superuser.com/questions/230414/multiple-copies-of-windows-calculator) – teikjoon Sep 17 '15 at 01:30
  • For the other way around, force open a new instance, see *[Always open new window from start screen](https://superuser.com/questions/479335)* (it's ***holding down Shift***). – Peter Mortensen May 21 '17 at 09:34

3 Answers3

3

Use AHK. Map your calculator key to the following script (This one is mapped to Windows-Z)

#z::
IfWinExist Calculator
WinActivate
else
Run calculator://
return
SuperMrBlob
  • 131
  • 4
  • Thx, I was going crazy with Windows 10 opening multiple instances of the calculator whenever I use the calculator button on my Microsoft keyboard. Since I am already using AHK for other things, this was the most simple solution for me. – fritzmg Aug 16 '16 at 17:45
  • Weirdly though, this isn't working on all my Windows 10 systems. If I ran the complied version of the script on another computer, it opens new instances every time. Do you know why this would happen? – fritzmg Aug 17 '16 at 13:52
  • Never mind, on one system (even though **both** are English) the calculator was English, on another the calculator was German - thus it was called `Rechner` instead of `Calculator` and I had to change the script accordingly. – fritzmg Aug 17 '16 at 14:03
  • Good to hear it's working! – SuperMrBlob Aug 18 '16 at 09:00
0

Just start the app and pin it to the Taskbar. Then you start it by clicking or by using shortcuts Win+1, Win+2 etc. Both clicking and using shortcut executes only one instance of the app. If the instance is already running and you repeat the shortcut you only call up the focus of the app.

If you ever decide to start another instance, just Right-click on the icon in Taskbar and click on the app name. In my opinion, using these shortcuts raises the work efficiency and lowers mental exhaustion distinctively.

screenshot of the calculator app

Markus Meyer
  • 1,370
  • 5
  • 11
  • 17
0

Method that doesn't involve AHK:

I went with another method, that involved putting a script somewhere visible to %PATH% and editing the registry to call the script.

That registry edit is as follows: Set key
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AppKey\18\ShellExecute
to value "scriptname.wsf" which is whatever you choose to name the script file.

The script I used was:

<package>
   <job id="vbs">
      <script language="VBScript">
         Set WshShell = WScript.CreateObject ("WScript.Shell")
         Set colProcessList = GetObject("Winmgmts:").ExecQuery ("Select * from Win32_Process")
         
         For Each objProcess in colProcessList
         If objProcess.name = "Calculator.exe" then
         vFound = True
         End if
         Next
         
         If vFound then
         WshShell.AppActivate "Calculator"
         Else
         WshShell.run "calc.exe", 5, false
         End If
      </script>
   </job>
</package>

This was based on an answer provided here:
https://stackoverflow.com/questions/36178745/how-to-run-single-instance-of-calculator-calc-exe-in-windows

But the script they wrote didn't work in Win10, so I combined some bits from other sources to make mine, which does. A miracle, since I know nothing about VBScript, but it's a functioning option, if you don't want to run AHK.