Find the path of notepad.exe and mspaint.exe

前端 未结 11 1193
后悔当初
后悔当初 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:12

    Use the WinAPI function GetWindowsDirectory() to get the Windows folder, and GetSystemDirectory() to get the Windows\System folder. Thely're guaranteed to work with all Windows versions since at least Win95; I think they were available in Win 3.x as well.

提交回复
热议问题