-
Notifications
You must be signed in to change notification settings - Fork 19
feat(pedm): explicitly support elevating .msi files #1325
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wooohoo, you're making my day! good job!
Let maintainers know that an action is required on their side
|
cf8d7c5
to
956e945
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Left a few minor comments, feel free to address and merge! 🙂
956e945
to
5907767
Compare
5907767
to
14197e1
Compare
By inspecting elevated .msi files launched from Explorer, we see that Explorer invokes %systemroot%\system32\msiexec, with the command line
"%systemroot%\system32\msiexec" /i "{path-to-msi}"
.We achieve the same in the PEDM module by using the same command if the file extension is .msi. The .msi extension is already being trapped by the shell extension, but previously we would call
CreateProcess
on the .msi causing "file is not a valid Win32 executable".Additionally, I polished and added @awakecoding's original "ExplorerCommand.ps1" script. This is useful for debugging, where the installed shell extension can't be overwritten as it's in use by Explorer. Install Devolutions Agent with the PEDM feature; then use the PowerShell to unregistered the shell extension. Swap in your development or debug DLL, then re-register the shell extension. If you supply the .pdb file as well it's possible to attach the debugger to Explorer.exe and debug the shell extension code.