0

I've follow this guide: https://msdn.microsoft.com/en-us/library/aa767914(v=vs.85).aspx which allowed me to run a .exe using a new uri scheme.

The only problem is that I need to run this .exe minimized, I still haven't found a way to do this. So the solution I found was to create a shortcut to this .exe which does make it run minimized. The problem now is that I can't seem to figure out how to make the registry link to the .lnk file.

So what I'm looking for is a way to run the .lnk file from the registry or how to run the .exe file minimized from the registry.

The file path is correct since I'm getting the error: "This app can't be opened on your pc" (or something like that, it's in a different language).

In the guide that I followed the part which "opens" the file is: shell -> open -> command. I couldn't find any documentation about this, but maybe there are more options than just the "open"?

I hope you guys can help me out, thanks in advance!

2
  • Would your exe run from an open cmd prompt? Or do you get an error message similar to This version of full\path\to\yourapp.exe is not compatible with the version of Windows that you're running. Check your computer's system information and then contact the software publisher.
    – JosefZ
    Jul 11, 2016 at 17:59
  • Hey Josef, Thanks for your response! Everything works fine from the cmd prompt, I guess what I'm looking for is the correct command to place in the registry. And that's indeed the error message I'm receiving!
    – Robin.v
    Jul 12, 2016 at 9:53

1 Answer 1

1

If you don't mind using a launcher script, try this:

Copy this line to notepad and save the file with .vbs extension, say runmin.vbs saved in the C:\Windows directory.

WScript.CreateObject("Wscript.Shell").Run "c:\windows\notepad.exe",2

Note: You can create the file in desktop and then move to C:\Windows. Or start Notepad as administrator to save the file to Windows directory directly.

Then, in the protocol registry key (under open\command), set the default value as follows:

wscript.exe c:\windows\runmin.vbs

The above example starts Notepad minimized; alter the program name and path accordingly.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.