File tree Expand file tree Collapse file tree 2 files changed +15
-5
lines changed Expand file tree Collapse file tree 2 files changed +15
-5
lines changed Original file line number Diff line number Diff line change 22using chocolatey . infrastructure . logging ;
33using System ;
44using System . Diagnostics ;
5+ using System . Linq ;
56using System . Reflection ;
67using System . Security . Principal ;
78
@@ -25,10 +26,8 @@ static void Main(string[] args)
2526 var choco = Lets . GetChocolatey ( ) ;
2627 choco . SetCustomLogging ( new NullLog ( ) ) ;
2728
28- choco . Set ( conf => conf . CommandName = "upgrade" ) ;
29- choco . RunConsole ( new string [ ] { "-y" , "--force" , "chocolatey" } ) ;
30- choco . Set ( conf => conf . CommandName = "upgrade" ) ;
31- choco . RunConsole ( new string [ ] { "-y" , "--force" , "chocolateygui" } ) ;
29+ choco . Set ( conf => conf . CommandName = args . FirstOrDefault ( ) ) ;
30+ choco . RunConsole ( args . Skip ( 1 ) . ToArray ( ) ) ;
3231 }
3332
3433 static bool IsAdministrator ( )
Original file line number Diff line number Diff line change @@ -31,10 +31,21 @@ DisableDirPage=yes
3131[Languages]
3232Name : " english" ; MessagesFile : " compiler:Default.isl"
3333
34+ [Types]
35+ Name : " full" ; Description : " Full installation"
36+ Name : " custom" ; Description : " Custom installation" ; Flags : iscustom
37+
38+ [Components]
39+ Name : " chocolatey" ; Description : " Chocolatey" ; Types : custom full ; Flags : fixed
40+ Name : " chocolateygui" ; Description : " Graphical Interface for Chocolatey" ; Types : custom full
41+
3442[Files]
3543Source : " {#BuildDirectory}/bootstrapper.exe" ; DestDir : " {app} " ; Flags : ignoreversion
3644Source : " {#BuildDirectory}/chocolatey.dll" ; DestDir : " {app} " ; Flags : ignoreversion
3745Source : " {#BuildDirectory}/log4net.dll" ; DestDir : " {app} " ; Flags : ignoreversion
3846
3947[Run]
40- Filename : " {app} \bootstrapper.exe" ; Flags : runascurrentuser runhidden
48+ Filename : " {app} \bootstrapper.exe" ; Parameters : " upgrade -y --force chocolatey" ; \
49+ Flags : runascurrentuser runhidden ; Components : chocolatey
50+ Filename : " {app} \bootstrapper.exe" ; Parameters : " upgrade -y --force chocolateygui" ; \
51+ Flags : runascurrentuser runhidden ; Components : chocolateygui
You can’t perform that action at this time.
0 commit comments