[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[virt-tools-list] [PATCH virt-viewer 2/5] nsis: IE policy to launch silentely remote-viewer



Add IE ElevationPolicy for the remote-viewer client.

http://msdn.microsoft.com/en-us/library/bb250462%28v=vs.85%29.aspx
---
 data/virt-viewer.nsis.in |    6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/data/virt-viewer.nsis.in b/data/virt-viewer.nsis.in
index 1908d26..68a6a21 100644
--- a/data/virt-viewer.nsis.in
+++ b/data/virt-viewer.nsis.in
@@ -22,6 +22,7 @@ Page directory
 Page instfiles
 
 !define REG_UNINSTALL "Software\Microsoft\Windows\CurrentVersion\Uninstall\virt-viewer"
+!define REG_IEPOLICY  "Software\Microsoft\Internet Explorer\Low Rights\ElevationPolicy\{96190E9D-6FBB-64DB-9095-29F6FDE0B897}"
 
 Function RegisterApplication
     ;Register uninstaller into Add/Remove panel (for local user only)
@@ -38,6 +39,10 @@ Function RegisterApplication
     WriteRegDWord HKCU "${REG_UNINSTALL}" "NoRepair" 1
     WriteRegStr HKCU "${REG_UNINSTALL}" "UninstallString" "$\"$INSTDIR\Uninstall.exe$\""
     WriteRegStr HKCU "${REG_UNINSTALL}" "Comments" "Uninstalls VirtViewer."
+
+    WriteRegStr HKCU "${REG_IEPOLICY}" "AppPath" "$INSTDIR\bin"
+    WriteRegStr HKCU "${REG_IEPOLICY}" "AppName" "remote-viewer.exe"
+    WriteRegDWord HKCU "${REG_IEPOLICY}" "Policy" 3
 FunctionEnd
 
 Section "VirtViewer"
@@ -205,6 +210,7 @@ Section "Uninstall"
   DeleteRegKey /ifempty HKCU "Software\spice-space.org"
   DeleteRegKey HKCU "Software\virt-viewer"
   DeleteRegKey HKCU "${REG_UNINSTALL}"
+  DeleteRegKey HKCU "${REG_IEPOLICY}"
 
   RMDir /r "$INSTDIR\lib\pango"
 
-- 
1.7.10.1


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]