I have created the installer exe file using BA using wix.I want to force the user to open the exe as RUN as Administrator
.To do this,I want to show a MessageBox
with OK
button to user if user double-click or right click and hit->Open
.On clicking OK
button on MessageBox
should Exit
the installation.I don't want to open the installer until the user open the file as Run as Administrator
.
I want to know
1.Is the above behaviour is possible in wix using custom action or something.
2.Is it possible to detect exe double-click and right-click->Open in c#.
Update:
I have bundled all my two .msi using Wix bootstraper application into single EXE
file.
One msi is with per user context
which uninstall a application with per user context
and install own.
second one is with per machine context
and this also installs the files in windows drive.I have bundled both MSI as single EXE
.
Now if i open the EXE as Run as Administrator
,the EXE is uninstalling the per user package
and installation happens successfully. If i directly double click the EXE package
, during the removal of per user package
i am getting the following exception "Error 1001.An exception occured during uninstalling....->Requested registry access is not allowed
". and installation failed.
I tried adding a manifest
file in Post Build
of BA to include in to EXE package
to prompt the administrator privilege
during double click. After doing this and building in VS2010, all other two package are not included in EXE file and if i double click the EXE it is showing the UAC and close without installing.
Is any way there to include the two msi and manifest file in bundle.wxs
Thanks