[Fedora-directory-commits] windowsautoenroll aep.nsi, NONE, 1.1 windowsautoenroll.sln, NONE, 1.1

Steven W Parkinson (sparkins) fedora-directory-commits at redhat.com
Tue Mar 13 01:36:12 UTC 2007


Author: sparkins

Update of /cvs/dirsec/windowsautoenroll
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv24806

Added Files:
	aep.nsi windowsautoenroll.sln 
Log Message:
0.9.1: new since last release:
running as a service, CA failover, support for ICertRequestD2 (IFDEFed),
using C++ strings instead of char[], support for additional domain controllers
in a forest, decoding PKCS#10 request to find Cert template name, installer,
new base 64 decoder, profile mapper



--- NEW FILE aep.nsi ---
; Generated NSIS script file (generated by makensitemplate.phtml 0.21)
; by 66.187.237.200 on Jul 09 06 @ 17:08

; NOTE: this .NSI script is designed for NSIS v1.8+

Name "AEP"
OutFile "aep-0.9.1-1.win32.i386.exe"

; Some default compiler settings (uncomment and change at will):
; SetCompress auto ; (can be off or force)
; SetDatablockOptimize on ; (can be off)
; CRCCheck on ; (can be off)
; AutoCloseWindow false ; (can be true for the window go away automatically at end)
; SetDateSave off ; (can be on to have files restored to their orginal date)

InstallDir "$PROGRAMFILES\RHCSProxy"
InstallDirRegKey HKEY_LOCAL_MACHINE "SOFTWARE\Red Hat\RHCSProxy" ""
; DirShow show
; (make this hide to not let the user change it)
DirText "Select the directory to install RHCSProxy in:"


!define BUILDTYPE "Release"
#!define BUILDTYPE "Debug"



Section "" ; (default section)
SetOutPath "$INSTDIR"

IfFileExists $SYSDIR\mscoree.dll dotnetpresent dotnetnotpresent
dotnetnotpresent:
MessageBox MB_OK "$SYSDIR\mscoree.dll not found. You must install the .NET 1.1 runtime before proceeding"
Quit

dotnetpresent:


file /oname=$INSTDIR\rhcsproxy.exe "proxy\${BUILDTYPE}\rhcsproxy.exe"
file /oname=$INSTDIR\messages.dll  "proxy\${BUILDTYPE}\messages.dll"
file /oname=$INSTDIR\panel.exe "panel\bin\${BUILDTYPE}\panel.exe"

createDirectory "$SMPROGRAMS\Red Hat Auto Enrollment Proxy"
createShortCut  "$SMPROGRAMS\Red Hat Auto Enrollment Proxy\Auto Enrollment Proxy Options.lnk" "$INSTDIR\panel.exe"

; Uninstall stuff..
WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\RHCSProxy" "DisplayName" "RHCSProxy 0.9.1"
WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\RHCSProxy" "UninstallString" '"$INSTDIR\uninst.exe"'
WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\RHCSProxy" "Publisher" "Red Hat"
WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\RHCSProxy" "URLInfoAbout" "http://directory.fedora.redhat.com/wiki/aep"
WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\RHCSProxy" "DisplayVersion"  "0.9.1"
WriteRegDWORD HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\RHCSProxy" "VersionMajor" 0
WriteRegDWORD HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\RHCSProxy" "VersionMinor" 9
; write out uninstaller
WriteUninstaller "$INSTDIR\uninst.exe"



ReadRegStr $1 HKEY_LOCAL_MACHINE "SOFTWARE\Red Hat\RHCSProxy" ""
StrCmp $1 "" noexistingconfig existingconfig

existingconfig:
MessageBox MB_YESNO "Do you want to erase the existing configuration?" IDYES erase IDNO donterase

noexistingconfig:
erase:

;;;;;;;;;;;;  COPIED FROM UNINSTALL SECTION BELOW
DeleteRegKey HKEY_LOCAL_MACHINE "SOFTWARE\Red Hat\RHCSProxy"
DeleteRegKey HKEY_CLASSES_ROOT "CLSID\{D99E6E74-FC88-11D0-B498-00A0C90312F3}"
DeleteRegKey HKEY_CLASSES_ROOT "AppID\{D99E6E74-FC88-11D0-B498-00A0C90312F3}"
DeleteRegKey HKEY_LOCAL_MACHINE "SYSTEM\CurrentControlSet\Services\Eventlog\Application"
DeleteRegKey HKEY_LOCAL_MACHINE "SYSTEM\CurrentControlSet\Services\rhcsproxy"
Exec "sc stop rhcsproxy"
Exec "sc delete rhcsproxy"
;;;;;;;;;;;;;;; COPIED FROM UNINSTALL SECTION BELOW


WriteRegStr   HKEY_LOCAL_MACHINE "SOFTWARE\Red Hat\RHCSProxy" "" "$INSTDIR"
WriteRegStr   HKEY_LOCAL_MACHINE "SOFTWARE\Red Hat\RHCSProxy\Config"        "RequestType"        "PKCS10"
WriteRegStr   HKEY_LOCAL_MACHINE "SOFTWARE\Red Hat\RHCSProxy\Config"        "LogOptions"         "7"
WriteRegDWORD HKEY_LOCAL_MACHINE "SOFTWARE\Red Hat\RHCSProxy\Config"        "ICertRequestD2" 0x00
WriteRegDWORD HKEY_LOCAL_MACHINE "SOFTWARE\Red Hat\RHCSProxy\Config"        "RetryInterval" 0x1e
WriteRegStr   HKEY_LOCAL_MACHINE "SOFTWARE\Red Hat\RHCSProxy\Config\CertificateAuthorities"  "" ""
WriteRegStr   HKEY_LOCAL_MACHINE "SOFTWARE\Red Hat\RHCSProxy\Config\ProfileMap\WebServer"    "CAProfileName" "caAgentServerCert" 

WriteRegStr HKEY_CLASSES_ROOT "CLSID\{D99E6E74-FC88-11D0-B498-00A0C90312F3}"               ""  "CertSrv Request"
WriteRegStr HKEY_CLASSES_ROOT "CLSID\{D99E6E74-FC88-11D0-B498-00A0C90312F3}" "AppID"       "{D99E6E74-FC88-11D0-B498-00A0C90312F3}"
WriteRegStr HKEY_CLASSES_ROOT "CLSID\{D99E6E74-FC88-11D0-B498-00A0C90312F3}\LocalServer32" ""  "$INSTDIR\rhcsproxy.exe"
WriteRegStr HKEY_CLASSES_ROOT "CLSID\{D99E6E74-FC88-11D0-B498-00A0C90312F3}\ProgID"        ""  "CertSrv.Request.1"
WriteRegStr HKEY_CLASSES_ROOT "CLSID\{D99E6E74-FC88-11D0-B498-00A0C90312F3}\VersionIndependentProgID" ""  "CertSrv.Request"


; AppID entry describes how the imeplementation is run (what user to run as, permissions,
; whether to run as a service or not
WriteRegStr HKEY_CLASSES_ROOT "AppID\{D99E6E74-FC88-11D0-B498-00A0C90312F3}" ""  "Red Hat Auto Enrollment Proxy"
WriteRegBin HKEY_CLASSES_ROOT "AppID\{D99E6E74-FC88-11D0-B498-00A0C90312F3}" "AccessPermission"  01000480340000005000000000000000140000000200200001000000000018000100000001010000000000010000000000000000010500000000000515000000a065cf7e784b9b5fe77c877036bb0000010500000000000515000000a065cf7e784b9b5fe77c877036bb0000
WriteRegBin HKEY_CLASSES_ROOT "AppID\{D99E6E74-FC88-11D0-B498-00A0C90312F3}" "LocalPermission"   01000480800000009c000000000000001400000002006c0004000000000018000100000001020000000000052000000020020000000024000100000001050000000000051500000024ba75ff215749d4762dbdcf540400000000140001000000010100000000000504000000000014000100000001010000000000051200000001050000000000051500000024ba75ff215749d4762dbdcff401000001050000000000051500000024ba75ff215749d4762dbdcf01020000
WriteRegStr HKEY_CLASSES_ROOT "AppID\{D99E6E74-FC88-11D0-B498-00A0C90312F3}" "LocalService" "rhcsproxy"
; 2= 'connect'
WriteRegDWORD HKEY_CLASSES_ROOT "AppID\{D99E6E74-FC88-11D0-B498-00A0C90312F3}" "AuthenticationLevel" 0x2
 

; Set up as a service
;WriteRegStr HKEY_CLASSES_ROOT "AppID\{D99E6E74-FC88-11D0-B498-00A0C90312F3}" "LocalServer"  "rhcsproxy"
;WriteRegStr HKEY_LOCAL_MACHINE "SYSTEM\CurrentControlSet\Services\rhcsproxy" "DisplayName" "Red Hat Auto Enrollment Proxy"
;WriteRegStr HKEY_LOCAL_MACHINE "SYSTEM\CurrentControlSet\Services\rhcsproxy" "Description" "Forwards Certificate Requests from the domain to a Red Hat Certicate Authority"
;WriteRegStr HKEY_LOCAL_MACHINE "SYSTEM\CurrentControlSet\Services\rhcsproxy" "ImagePath"   "$INSTDIR\rhcsproxy.exe"
;WriteRegDWORD HKEY_LOCAL_MACHINE "SYSTEM\CurrentControlSet\Services\rhcsproxy" "Start"  0x3
;WriteRegDWORD HKEY_LOCAL_MACHINE "SYSTEM\CurrentControlSet\Services\rhcsproxy" "Type"  0x10
;WriteRegDWORD HKEY_LOCAL_MACHINE "SYSTEM\CurrentControlSet\Services\rhcsproxy" "ErrorControl"  0x1

Exec 'sc create rhcsproxy start= demand type= own error= normal binPath= "$INSTDIR\rhcsproxy.exe -s" DisplayName= "Red Hat Auto Enrollment Proxy"'
WriteRegStr HKEY_LOCAL_MACHINE "SYSTEM\CurrentControlSet\Services\rhcsproxy" "Description" "Forwards Certificate Requests from the domain to a Red Hat Certicate Authority"


; Event log messages
WriteRegStr HKEY_LOCAL_MACHINE "SYSTEM\CurrentControlSet\Services\Eventlog\Application" "" "RHCSProxy"
WriteRegStr HKEY_LOCAL_MACHINE "SYSTEM\CurrentControlSet\Services\Eventlog\Application\RHCSProxy" "EventMessageFile" "$INSTDIR\messages.dll"
WriteRegDWORD HKEY_LOCAL_MACHINE "SYSTEM\CurrentControlSet\Services\Eventlog\Application\RHCSProxy" "TypesSupported" 0x0f

donterase:
SetDetailsView show
DetailPrint ""
DetailPrint "Installation Completed."
DetailPrint ""
DetailPrint "Be sure to choose the user the service will run as:"
DetailPrint "In the services control panel, right click on 'Red Hat Auto Enrollment Proxy'"
DetailPrint "service, select the Log On tab, and enter the user's credentials under"
DetailPrint "'This account' (e.g. Administrator)"
DetailPrint ""
DetailPrint "Also, start dcomcnfg and change the run identity of the Red Hat"
DetailPrint "Auto Enrollment Proxy DCOM component to match the service credentials."

SectionEnd ; end of default section




; begin uninstall settings/section
UninstallText "This will uninstall Red Hat Auto Enrollment Proxy from your system. All configuration will be erased."


Section Uninstall

;;;;;;;;;;;;;;;;;;;;;;;;;;;    COPY THIS INTO REMOVECONFIG SECTION ABOVE
DeleteRegKey HKEY_LOCAL_MACHINE "SOFTWARE\Red Hat\RHCSProxy"
DeleteRegKey HKEY_CLASSES_ROOT "CLSID\{D99E6E74-FC88-11D0-B498-00A0C90312F3}"
DeleteRegKey HKEY_CLASSES_ROOT "AppID\{D99E6E74-FC88-11D0-B498-00A0C90312F3}"
DeleteRegKey HKEY_LOCAL_MACHINE "SYSTEM\CurrentControlSet\Services\Eventlog\Application\RHCSProxy"
DeleteRegKey HKEY_LOCAL_MACHINE "SYSTEM\CurrentControlSet\Services\rhcsproxy"
Exec "sc stop rhcsproxy"
Exec "sc delete rhcsproxy"
;;;;;;;;;;;;;;;;;;;;;;;;;;;   end of cut and paste section

Delete "$INSTDIR\uninst.exe"
Delete "$INSTDIR\rhcsproxy.exe"
Delete "$SMPROGRAMS\Red Hat Auto Enrollment Proxy\Auto Enrollment Proxy Options.lnk"
Delete /REBOOTOK "$INSTDIR\messages.dll"
Delete "$INSTDIR\ProxyPanel.exe"
RMDir /REBOOTOK "$INSTDIR"

DeleteRegKey HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\RHCSProxy"
RMDir "$INSTDIR"
SectionEnd ; end of uninstall section

; eof

--- NEW FILE windowsautoenroll.sln ---
Microsoft Visual Studio Solution File, Format Version 8.00
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "panel", "panel\panel.csproj", "{8BCDD8FE-11BC-4CC0-A66C-03DF9C746A91}"
	ProjectSection(ProjectDependencies) = postProject
	EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "proxy", "proxy\proxy.vcproj", "{BCE7AE2E-C0C2-4B5A-B05C-02DF16CC9F70}"
	ProjectSection(ProjectDependencies) = postProject
	EndProjectSection
EndProject
Global
	GlobalSection(SolutionConfiguration) = preSolution
		Debug = Debug
		Release = Release
	EndGlobalSection
	GlobalSection(ProjectConfiguration) = postSolution
		{8BCDD8FE-11BC-4CC0-A66C-03DF9C746A91}.Debug.ActiveCfg = Debug|.NET
		{8BCDD8FE-11BC-4CC0-A66C-03DF9C746A91}.Debug.Build.0 = Debug|.NET
		{8BCDD8FE-11BC-4CC0-A66C-03DF9C746A91}.Release.ActiveCfg = Release|.NET
		{8BCDD8FE-11BC-4CC0-A66C-03DF9C746A91}.Release.Build.0 = Release|.NET
		{BCE7AE2E-C0C2-4B5A-B05C-02DF16CC9F70}.Debug.ActiveCfg = Debug|Win32
		{BCE7AE2E-C0C2-4B5A-B05C-02DF16CC9F70}.Debug.Build.0 = Debug|Win32
		{BCE7AE2E-C0C2-4B5A-B05C-02DF16CC9F70}.Release.ActiveCfg = Release|Win32
		{BCE7AE2E-C0C2-4B5A-B05C-02DF16CC9F70}.Release.Build.0 = Release|Win32
	EndGlobalSection
	GlobalSection(ExtensibilityGlobals) = postSolution
	EndGlobalSection
	GlobalSection(ExtensibilityAddIns) = postSolution
	EndGlobalSection
EndGlobal




More information about the Fedora-directory-commits mailing list