Share via

Shell in Windows 10

Anonymous
2016-07-14T10:26:07+00:00

After upgrading to Windows 10, I can no longer start Registry Editor fra VBA with:

Shell "RegEdit.EXE"

All my old macros, using that call, no longer works!

If I try to open Notepad with

Shell "NotePad.EXE"

...which is located in the same folder (C:\Windows) as RegEdit.EXE there's no problem.

What has changed from win7 to Win10 ???

How do I make all my macros work again?!?

Microsoft 365 and Office | Excel | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

4 answers

Sort by: Most helpful
  1. Anonymous
    2016-07-16T08:19:27+00:00

    Yes, I can do that too...

    ...just not using 'Shell' from within Excel VBA.

    Was this answer helpful?

    0 comments No comments
  2. Jay Freedman 207.7K Reputation points Volunteer Moderator
    2016-07-16T01:05:15+00:00

    I can run regedit.exe in Windows 10 perfectly well in a standard user profile without elevation. The elevation is needed only if I want to make changes in the HKEY_CLASSES_ROOT or HKEY_LOCAL_MACHINE hives.

    Was this answer helpful?

    0 comments No comments
  3. Anonymous
    2016-07-15T06:31:05+00:00

    Nope - I found the reason...

    #¤%"#¤¤##" Microsoft strikes again, by changing things without warning and without any immediate way of settings things back!!!

    God, I hate them more and more !!!

    Using their position to force stuff on people!

    Phew, felt good to get that rant of my shoulders...

    Apparrently, in Windows 10, 'RegEdit.EXE' must be run in elevated mode ('Administrator mode') - once I found that out, everything works again...

    Was this answer helpful?

    0 comments No comments
  4. Jay Freedman 207.7K Reputation points Volunteer Moderator
    2016-07-15T01:48:23+00:00

    As far as I know, nothing has changed. However, the Shell function has (and has always had) an optional second parameter named WindowStyle that defaults to the value vbMinimizedFocus. Both of your examples should start the named program minimized to the taskbar, and with the focus -- if you aren't looking for the icon there, you might think the command did nothing. To make the program visible, you would have to use the commands

    Shell "RegEdit.EXE", vbNormalFocus

    and

    Shell "NotePad.EXE", vbNormalFocus

    Was this answer helpful?

    0 comments No comments