Programmatically launch sfx archive on Windows 7 (using _execv)? (C++)
Question
My (MS Windows) application can update itself over the internet by download a self extracting archive and launching it via _execv (C++). Now while launching the sfx archive works fine on Windows XP, it doesn't on Windows 7. I guess it has to do with UAC, but even turning UAC off didn't cure this problem. The downloaded sfx archive has the same owner and full access rights as other executables on my computer I can run via _execv. What do I have to do to make this work?
Solution
Windows 7 is able to detect installers based on file name and file content and requires additional privilege to start such files. As far as I know Administrator has no such additional privilege. Try to use ShellExecuteEx
with runas
parameter. It should show you dialog with request for permission to start installer.