Open Microsoft Scan App Topic is solved

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
bobthesmartypants
Posts: 4
Joined: 17 Sep 2016, 23:32

Open Microsoft Scan App

Post by bobthesmartypants » 20 Sep 2016, 23:55

Hello,

I intend to create a simple program where CTRL+SHIFT+S will automatically scan something that is inside my scanner. I've figured out that to do this, I need to use the "Run" keyword, but now I'm having trouble finding what the microsoft scan app's executable is called and where it is. This isn't very appropriate for this forum (I suppose it should more suitably be posted in a Microsoft forum) so sorry for asking you guys to do the dirty work, but can someone please tell me the correct code I should use to open the scanner app? I think I can figure out the rest myself.

I am using Windows 10.
~btsp

User avatar
Almost_there
Posts: 404
Joined: 30 Sep 2014, 10:32

Re: Open Microsoft Scan App

Post by Almost_there » 21 Sep 2016, 01:21

Hi.

Look for any desktop shortcut to the program. Open the shortcut properties (normally by right-click the shortcut and choose "properties"). In "target" field you should find the complete file path. It should look something like this:
C:\program files\vendor of the program\program name\filename.exe

So your run command would look something like this:

Code: Select all

Run, C:\program files\vendor of the program\program name\filename.exe

bobthesmartypants
Posts: 4
Joined: 17 Sep 2016, 23:32

Re: Open Microsoft Scan App

Post by bobthesmartypants » 22 Sep 2016, 00:24

Hi, thanks for the reply!

I'm embarrassed to admit though that I can't find any sort of desktop shortcut for the program. The only way I know how to access it is through the search bar and nothing along that process allows me to open properties or even open file location. I tried searching online for the location but all I am receiving are websites that detail how to use the scanner itself.

Sorry for the trouble!
~btsp

User avatar
Grendahl
Posts: 170
Joined: 30 Sep 2013, 08:21

Re: Open Microsoft Scan App

Post by Grendahl » 22 Sep 2016, 07:35

It is most likely at C:\WINDOWS\system32\WFS.exe

punchin
Posts: 439
Joined: 17 Jan 2014, 17:54

Re: Open Microsoft Scan App

Post by punchin » 22 Sep 2016, 17:11

Grendahl wrote:It is most likely at C:\WINDOWS\system32\WFS.exe
You might also want to look up command line options for the program to get even more optimized control.

bobthesmartypants
Posts: 4
Joined: 17 Sep 2016, 23:32

Re: Open Microsoft Scan App

Post by bobthesmartypants » 22 Sep 2016, 21:11

Grendahl wrote:It is most likely at C:\WINDOWS\system32\WFS.exe
Your path does give a fax/scan program but it doesn't seem to be the right one. What I am looking for is this one: https://www.microsoft.com/en-us/store/p ... zdncrfj3pv Thanks anyways though, if I can't get the one I want to work then I can gladly use that as a replacement.

I think it should be in the hidden folder WindowsApps. However, by default this folder cannot even be accessed by Admin. There is a way around it (e.g. here: https://www.maketecheasier.com/access-w ... indows-10/) but I was wondering whether said accessibility (or lack thereof) would affect the ability of AHK to access the program. I'll give it a try ASAP and report back, but in the meantime does anyone already know the answer?
~btsp

User avatar
Grendahl
Posts: 170
Joined: 30 Sep 2013, 08:21

Re: Open Microsoft Scan App

Post by Grendahl » 23 Sep 2016, 07:36

Here's the path as it sits on my computer...

C:\Program Files\WindowsApps\Microsoft.WindowsScan_6.3.9654.17133_x64__8wekyb3d8bbwe\scanapp.exe

Note, even though that's where the .exe is located, the exe cannot be run as one would expect.

ocelot0
Posts: 2
Joined: 27 Jun 2022, 04:16

Re: Open Microsoft Scan App

Post by ocelot0 » 27 Jun 2022, 04:27

I use Windows 10 and I tried to use this script

Code: Select all

^+s::run C:\Windows\System32\wfs.exe
but it doesn't work (scan program doesn't open) and Autohotkey produces this error message

Error: Failed attempt to launch program or document:
Action: <c:1Windows\System32\wfs.exe>
Params: <>

Specifically: Impossibile trovare il file specificato.

Line#
...
---> nnn:run C:\Windows\System32\wfs.exe
...

The current thread will exit.


It is strange. If I replace wfs.exe with notepad.exe (or calc.exe, write.exe,...), the script works regularly and notepad opens.

If I copy wfs.exe file in an other folder (i.e. C:\Users\Mike) and I change the script in this way

Code: Select all

^+s::run C:\Users\Mike\wfs.exe
scanner utility opens regularly.
Why in ahk script I have to use a copy of wfs.exe in an other folder? And why only for wfs.exe (notepad, calc, write,... open regularly in system32 folder)?
Last edited by ocelot0 on 27 Jun 2022, 10:34, edited 2 times in total.

BoBo
Posts: 6564
Joined: 13 May 2014, 17:15

Re: Open Microsoft Scan App

Post by BoBo » 27 Jun 2022, 06:25

JFTR, and yes it's a German AHK thread: viewtopic.php?t=83817 ;)

User avatar
JoeWinograd
Posts: 2198
Joined: 10 Feb 2014, 20:00
Location: U.S. Central Time Zone

Re: Open Microsoft Scan App

Post by JoeWinograd » 27 Jun 2022, 10:10

If you did a standard install of Windows Scan from the app store, this will work:

Code: Select all

Run,C:\Windows\explorer.exe shell:AppsFolder\Microsoft.WindowsScan_8wekyb3d8bbwe!App
Regards, Joe

ocelot0
Posts: 2
Joined: 27 Jun 2022, 04:16

Re: Open Microsoft Scan App  Topic is solved

Post by ocelot0 » 28 Jun 2022, 08:22

ocelot0 wrote:
27 Jun 2022, 04:27
I use Windows 10 and I tried to use this script

Code: Select all

^+s::run C:\Windows\System32\wfs.exe
but it doesn't work (scan program doesn't open) and Autohotkey produces this error message

Error: Failed attempt to launch program or document:
Action: <c:1Windows\System32\wfs.exe>
Params: <>

Specifically: Impossibile trovare il file specificato.

Line#
...
---> nnn:run C:\Windows\System32\wfs.exe
...

The current thread will exit.


It is strange. If I replace wfs.exe with notepad.exe (or calc.exe, write.exe,...), the script works regularly and notepad opens.

If I copy wfs.exe file in an other folder (i.e. C:\Users\Mike) and I change the script in this way

Code: Select all

^+s::run C:\Users\Mike\wfs.exe
scanner utility opens regularly.
Why in ahk script I have to use a copy of wfs.exe in an other folder? And why only for wfs.exe (notepad, calc, write,... open regularly in system32 folder)?
I removed AutoHotkey and reinstalled new version (1.1.34.03).
Now my script works well.
Problem solved.

Post Reply

Return to “Ask for Help (v1)”