I am planning to use ShellExecute for the updater of an application written in delphi 2007, I was wondering if ShellExecute will work on most computers with Win or if it can easly fail because of some user permission or something like that.
3
votes
2 Answers
1
votes
I believe shellExecute does require admin. You didn't mention the OS. If it is Vista+ then UAC comes in to play. see this explanation
0
votes
From MSDN
Remarks
Because ShellExecute can delegate execution to Shell extensions (data sources, context menu handlers, verb implementations) that are activated using Component Object Model (COM), COM should be initialized before ShellExecute is called. Some Shell extensions require the COM single-threaded apartment (STA) type. In that case, COM should be initialized as shown here:
CoInitializeEx(NULL, COINIT_APARTMENTTHREADED | COINIT_DISABLE_OLE1DDE)
And as Ken Lange alread suggested, deppending on what you want to execute, you may need administrative rights.