File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -114,18 +114,25 @@ int msiexec(int argc, char** argv) {
114114 SAFE_APPEND ("%s%s " , "/l*v" );
115115 SAFE_APPEND ("%s%s " , logPath );
116116
117+ char * verb = "open" ;
117118 if (strcmp (command , "--install" ) == 0 ) {
118119 SAFE_APPEND ("%s%s " , "/i" );
119120 } else if (strcmp (command , "--uninstall" ) == 0 ) {
120121 SAFE_APPEND ("%s%s " , "/x" );
122+ } else if (strcmp (command , "--elevated-install" ) == 0 ) {
123+ SAFE_APPEND ("%s%s " , "/i" );
124+ verb = "runas" ;
125+ } else if (strcmp (command , "--elevated-uninstall" ) == 0 ) {
126+ SAFE_APPEND ("%s%s " , "/x" );
127+ verb = "runas" ;
121128 } else {
122129 fprintf (stderr , "Command must be --install or --uninstall, got %s\n" , command );
123130 msibail ();
124131 }
125132
126133 SAFE_APPEND ("%s%s " , msiPath );
127134
128- return exec ("open" , "msiexec" , parameters );
135+ return exec (verb , "msiexec" , parameters );
129136}
130137
131138/**
You can’t perform that action at this time.
0 commit comments