Message-Id: <494BCA08020000BC00074BD7@...1170...> Date: Fri, 19 Dec 2008 16:21:28 +0100 From: "Svein Hansen" Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="=__Part391136E8.0__=" Subject: Re: [Openvpn-devel] Building a Windows installer. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: openvpn-devel@lists.sourceforge.net This is a MIME message. If you are reading this text, you may want to consider changing to a mail reader or gateway that understands how to properly handle MIME multipart messages. --=__Part391136E8.0__= Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit >>> Den 19. desember 2008 kl. 15:27, i meldingen <494BAF50.5000306@...1172...>, skrev "Dennis P. Nikolaenko" : > Svein Hansen wrote: >> >>>>> Den 19. desember 2008 kl. 14:36, i meldingen >>>>> >> <494BA351.8060303@...1172...>, >> skrev "Dennis P. Nikolaenko" : >> >>> Svein Hansen wrote: >>> >>>> DetailPrint "We are running on a 64-bit system." >>>> + >>>> + SetRegView 64 >>>> + WriteRegStr HKLM "Software\Microsoft\Windows >>>> NT\CurrentVersion\AppCompatFlags\Layers" >>>> "$INSTDIR\bin\openvpn-gui-1.0.3.exe" "RUNASADMIN" >>>> + SetRegView 32 >>>> >>>> SetOutPath "$INSTDIR\bin" >>>> >>>> @@ -442,6 +446,8 @@ >>>> tap-32bit: >>>> >>>> DetailPrint "We are running on a 32-bit system." >>>> + WriteRegStr HKLM "Software\Microsoft\Windows >>>> NT\CurrentVersion\AppCompatFlags\Layers" >>>> "$INSTDIR\bin\openvpn-gui-1.0.3.exe" "RUNASADMIN" >>>> + >>>> >>>> SetOutPath "$INSTDIR\bin" >>>> File "${GEN}\tapinstall\i386\tapinstall.exe" >>>> >>>> This is maybe not the best way to do it...but it works.. >>>> >>> IMO a better option would be to include a manifest instead of >>> >> polluting >> >>> application compatibility database in registry. >>> -- >>> Dennis >>> >> >> I have tried to add a manifest, but that creates a new issue about >> signing. >> (I'm clearly not an expert on manifests...) >> >> * openvpn-gui-1.0.3.exe.manifest: >> Executable: openvpn-gui-1.0.3.exe >> Manifest:openvpn-gui-1.0.3.exe.manifest >> openvpn-gui manifest file: >> >> > manifestVersion="1.0"> >> >> >> >> > level="requireAdministrator" >> uiAccess="false"/> >> >> >> >> >> >> Then: >> C:\manifest>mt.exe -manifest openvpn-gui-1.0.3.exe.manifest >> -outputresource:openvpn-gui-1.0.3.exe >> Microsoft (R) Manifest Tool version 5.2.3790.2075 >> Copyright (c) Microsoft Corporation 2005. >> >> Now openvpn-gui-1.0.3.exe is elevated to "requireAdministrator". >> >> But, when starting the GUI I get: >> An unidentified program wants access to your computer >> Unidentified Publisher >> -> Cancel >> -> Allow > You should get the same (orange color) error, when building the binary > yourself, unless you take it from the official distribution and you seem > to have taken it from there... > If you sign the binary with a code signing certificate which is is in > turn signed by a trusted root CA, you would get a "good" UAC prompt for > a signed application. You have to buy a code signing certificate from a > preinstalled CA or install self-generated CA on all you client machines. > From a signing point view, yes app compat solution is better as it does > not require any additional "acrobatics". Just ensure that app compat > entry is removed when OpenVPN GUI is uninstalled. > -- > Dennis Thanks for the enlightenment :-) Maybe this is something for the OpenVPN developers to dive into? There must be several sysadmins that would like to see this included in the official distribution. Or? One vote from me.. Svein Hansen --=__Part391136E8.0__= Content-Type: text/html; charset="US-ASCII" Content-Transfer-Encoding: quoted-printable Content-Description: HTML
>>> Den 19. desember 2008 kl. = 15:27, i meldingen <
494BAF50.5000306@...1172...>,
skrev "Dennis P. Nikolaenko" <
dennis@...1172...>:
> Svein Hansen wrote= :
>>  
>>>>> Den 19. desember 2008 kl= . 14:36, i meldingen
>>>>>     &= nbsp;  
>> <
494BA351.8060303@...1172...>,
>> skrev "Dennis P. Nikola= enko" <
dennis@...1174...= .>:
&g= t;>  
>>> Svein Hansen wrote:
>>>&nbs= p;   
>>>>    DetailPrint "We= are running on a 64-bit system."
>>>> +
>>>>= +  SetRegView 64
>>>> +  WriteRegStr HKLM "Softwa= re\Microsoft\Windows
>>>> NT\CurrentVersion\AppCompatFlags\= Layers"
>>>> "$INSTDIR\bin\openvpn-gui-1.0.3.exe" "RUNASADM= IN"
>>>> +  SetRegView 32
>>>>
>&g= t;>>    SetOutPath "$INSTDIR\bin"
>>>><= BR>>>>> @@ -442,6 +446,8 @@
>>>> tap-32bit:
&= gt;>>>
>>>>    DetailPrint "We are r= unning on a 32-bit system."
>>>> +  WriteRegStr HKLM "S= oftware\Microsoft\Windows
>>>> NT\CurrentVersion\AppCompatF= lags\Layers"
>>>> "$INSTDIR\bin\openvpn-gui-1.0.3.exe" "RUN= ASADMIN"
>>>> +
>>>>
>>>> = ;   SetOutPath "$INSTDIR\bin"
>>>>  &nbs= p; File "${GEN}\tapinstall\i386\tapinstall.exe"
>>>>
>= >>> This is maybe not the best way to do it...but it works..
&g= t;>>>      
>>> IMO a b= etter option would be to include a manifest instead of
>>> = ;   
>> polluting
>>  
>= ;>> application compatibility database in registry.
>>> -= -
>>> Dennis
>>>    
>&g= t;
>> I have tried to add a manifest, but that creates a new issue= about
>> signing.
>> (I'm clearly not an expert on manif= ests...)
>>
>> * openvpn-gui-1.0.3.exe.manifest:
>&= gt; Executable: openvpn-gui-1.0.3.exe
>> Manifest:openvpn-gui-1.0= .3.exe.manifest
>> openvpn-gui manifest file:
>> <?xml= version=3D"1.0" encoding=3D"UTF-8" standalone=3D"yes"?>
>> <= ;assembly xmlns=3D"urn:schemas-microsoft-com:asm.v1"
>> manifestVe= rsion=3D"1.0">
>>   <trustInfo xmlns=3D"urn:schem= as-microsoft-com:asm.v2">
>>     <securi= ty>
>>       <requestedPrivile= ges>
>>         <req= uestedExecutionLevel
>>       &= nbsp;   level=3D"requireAdministrator"
>>  &nb= sp;        uiAccess=3D"false"/>
&g= t;>         </requestedPrivil= eges>
>>        </securit= y>
>>   </trustInfo>
>> </assembly&= gt;
>>
>> Then:
>> C:\manifest>mt.exe -manif= est openvpn-gui-1.0.3.exe.manifest
>> -outputresource:openvpn-gui-= 1.0.3.exe
>> Microsoft (R) Manifest Tool version 5.2.3790.2075
= >> Copyright (c) Microsoft Corporation 2005.
>>
>> = Now openvpn-gui-1.0.3.exe is elevated to "requireAdministrator".
>>= ;
>> But, when starting the GUI I get:
>> An unidentified= program wants access to your computer
>> Unidentified Publisher<= BR>>> -> Cancel
>> -> Allow
> You should get the= same (orange color) error, when building the binary
> yourself, unl= ess you take it from the official distribution and you seem
> to hav= e taken it from there...
> If you sign the binary with a code signing= certificate which is is in
> turn signed by a trusted root CA, you = would get a "good" UAC prompt for
> a signed application. You have t= o buy a code signing certificate from a
> preinstalled CA or install= self-generated CA on all you client machines.
>  From a signing= point view, yes app compat solution is better as it does
> not requ= ire any additional "acrobatics". Just ensure that app compat
> entry= is removed when OpenVPN GUI is uninstalled.
> --
> Dennis
<= BR>Thanks for the enlightenment :-)

Maybe this is something for the = OpenVPN developers to dive into?
There must be several sysadmins that wo= uld like to see this included in the
official distribution. Or?

= One vote from me..

Svein Hansen

--=__Part391136E8.0__=--