Click here to Skip to main content
15,891,657 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I want to search for a software, example:Microsoft Word, and open it by using a windows forms application in C++ CLR.

Please help me...

What I have tried:

C++

Process::Start("%STARTMENU%//notepad.exe");
Posted
Updated 5-Mar-18 0:03am
v2

1 solution

That's harder than you might think: executing the app is simple - as you've seen it's just a case of providing Process::Start with a path to the Exe file.

The problem is searching - not all app EXE's have the same name as the executable. For example, "Microsoft Word" is in the file "WinWord.exe", and "Visual Studio" is "devenv.exe". And quite a lot of "built in" apps are in the hidden folder "Windows Apps" under "Program files", which also requires Admin access permissions to read, so you app would need elevation to search in there at all.

So depending on what you want to allow the user to search for it might be simpler to just have a list of "known apps" that he can access - depends on what exactly you are trying to do.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900