Find the path of notepad.exe and mspaint.exe

前端 未结 11 1289
后悔当初
后悔当初 2021-01-31 09:45

What is the best way to find out where notepad.exe and mspaint.exe are that will work across various versions of Windows?

Should I get the Windows directory via SHGetFol

11条回答
  •  没有蜡笔的小新
    2021-01-31 10:22

    I think to start off small you should get the windir environment variable and look in the subfolders %windir%\system32\ for mspaint and notepad. Most likely they will be there.

    However if that fails, well then resort to a more brute force search.

提交回复
热议问题