{"id":223373,"date":"2014-05-19T19:50:03","date_gmt":"2014-05-19T15:50:03","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=223373"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=223373","title":{"rendered":"<span class=\"post_title\">\u041f\u0438\u0448\u0435\u043c \u0441\u0432\u043e\u0439 \u043f\u0430\u043a\u0435\u0442 \u0434\u043b\u044f Chocolatey<\/span>"},"content":{"rendered":"<div class=\"content html_format\"> \t\t\t<img decoding=\"async\" src=\"http:\/\/habrastorage.org\/getpro\/habr\/post_images\/801\/f81\/26f\/801f8126f67c062423fe06719d7eb93b.png\"\/><\/p>\n<p>  <a href=\"http:\/\/chocolatey.org\/\">Chocolatey<\/a> \u2014 \u043f\u0430\u043a\u0435\u0442\u043d\u044b\u0439 \u043c\u0435\u043d\u0435\u0434\u0436\u0435\u0440 \u0434\u043b\u044f windows \u0441\u0438\u043b\u044c\u043d\u043e \u043e\u0431\u043b\u0435\u0433\u0447\u0430\u044e\u0449\u0438\u0439 \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u0443 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c, \u0430 \u0443\u0436 \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043e\u043d \u044d\u043a\u043e\u043d\u043e\u043c\u0438\u0442 \u0432\u0440\u0435\u043c\u0435\u043d\u0438. \u041f\u0440\u043e \u044d\u0442\u043e \u0447\u0443\u0434\u043e \u0443\u0436\u0435 \u043f\u0438\u0441\u0430\u043b\u0438 \u043d\u0430 \u0445\u0430\u0431\u0440\u0435 \u0438 \u0434\u0430\u0436\u0435 \u0431\u044b\u043b\u043e \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u043e \u043a\u0430\u043a \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0441\u0432\u043e\u0439 \u043f\u0430\u043a\u0435\u0442 \u0434\u043b\u044f \u043d\u0435\u0433\u043e, \u043d\u043e \u0442\u0430\u043c \u0431\u044b\u043b\u043e \u0431\u043e\u043b\u044c\u0448\u0435 \u0440\u0443\u0447\u043d\u043e\u0439 \u0440\u0430\u0431\u043e\u0442\u044b, \u044f \u0436\u0435 \u0445\u043e\u0447\u0443 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c \u043a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0443\u043f\u0440\u043e\u0441\u0442\u0438\u0442\u044c \u044d\u0442\u043e \u0434\u0435\u043b\u043e. <br \/>  <a name=\"habracut\"><\/a>  <\/p>\n<h4>\u041f\u0440\u0438\u0441\u0442\u0443\u043f\u0430\u0435\u043c<\/h4>\n<p>  \u0415\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u043d\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d \u0441\u0430\u043c chocolatey, \u0438\u0441\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u043c \u044d\u0442\u043e:<\/p>\n<pre><code class=\"bash\">@powershell -NoProfile -ExecutionPolicy unrestricted -Command &quot;iex ((new-object net.webclient).DownloadString('https:\/\/chocolatey.org\/install.ps1'))&quot; && SET PATH=%PATH%;%systemdrive%\\chocolatey\\bin <\/code><\/pre>\n<p>  \u0417\u0430\u043a\u0440\u044b\u0432\u0430\u0435\u043c \u0438 \u0441\u043d\u043e\u0432\u0430 \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u043c \u043a\u043e\u043d\u0441\u043e\u043b\u044c, \u0447\u0442\u043e\u0431\u044b \u043e\u0441\u0432\u0435\u0436\u0438\u043b\u0438\u0441\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u043f\u043e \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u043c.<\/p>\n<p>  Chocolatey \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043b\u0438, \u0442\u0435\u043f\u0435\u0440\u044c \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u043f\u0430\u043a\u0435\u0442\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0430\u043c \u043f\u0440\u0438\u0433\u043e\u0434\u044f\u0442\u0441\u044f:<\/p>\n<pre><code class=\"bash\">cinst warmup cinst git cinst nuget.commandline <\/code><\/pre>\n<p>  \u0417\u0430\u043a\u0440\u044b\u0432\u0430\u0435\u043c \u0438 \u0441\u043d\u043e\u0432\u0430 \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u043c \u043a\u043e\u043d\u0441\u043e\u043b\u044c, \u0447\u0442\u043e\u0431\u044b \u043e\u0441\u0432\u0435\u0436\u0438\u043b\u0438\u0441\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u043f\u043e \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u043c.<\/p>\n<p>  \u0418\u0434\u0435\u043c \u0432 \u043f\u0430\u043f\u043a\u0443 \u0441 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u043c \u0441hocolatey, \u043a\u043b\u043e\u043d\u0438\u0440\u0443\u0435\u043c \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439 \u0441 \u0448\u0430\u0431\u043b\u043e\u043d\u0430\u043c\u0438, \u0438 \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u043c \u043a \u043d\u0430\u0448\u0438\u043c \u0448\u0430\u0431\u043b\u043e\u043d\u0430\u043c.<\/p>\n<pre><code class=\"bash\">cd %ChocolateyInstall% git clone https:\/\/github.com\/chocolatey\/chocolateytemplates.git cd chocolateytemplates\\_templates <\/code><\/pre>\n<p>  <\/p>\n<h4>\u041f\u043e\u0434\u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u0443\u0435\u043c \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438<\/h4>\n<p>  <\/p>\n<ul>\n<li>\u0423\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0435 \u0441\u0432\u043e\u0435 \u0438\u043c\u044f, \u043e\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0430\u0432\u0442\u043e\u0440\u0430 \u043f\u0430\u043a\u0435\u0442\u0430\n<pre><code class=\"bash\">warmup addTextReplacement __CHOCO_PKG_OWNER_NAME__ &quot;Your Name&quot; <\/code><\/pre>\n<p>  <\/li>\n<li>\u0412\u0430\u0448 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439 \u0441 \u043f\u0430\u043a\u0435\u0442\u0430\u043c\u0438 \u043d\u0430 github. \u0423\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u0430\u043a\u0430\u0443\u043d\u0442\u0430 \u0438 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044f. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440: Claud\/chocolatey-packages\n<pre><code class=\"bash\">warmup addTextReplacement __CHOCO_PKG_OWNER_REPO__ &quot;Your Repository&quot; <\/code><\/pre>\n<p>  <\/li>\n<li>\u0414\u0430\u043b\u044c\u0448\u0435 \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0441\u0441\u044b\u043b\u043a\u0438 \u043d\u0430 \u043d\u0430\u0448\u0438 \u0448\u0430\u0431\u043b\u043e\u043d\u044b. \u041f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u043e\u043d\u0438 \u0441\u043e\u0437\u0434\u0430\u044e\u0442\u0441\u044f \u0432 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 <code>C:\\CODE\\_templates<\/code> \u043c\u043d\u0435 \u044d\u0442\u043e \u043d\u0435 \u043d\u0440\u0430\u0432\u0438\u0442\u0441\u044f, \u043f\u043e \u044d\u0442\u043e\u043c\u0443 \u044f \u043c\u0435\u043d\u044f\u044e \u0435\u0435 \u043d\u0430 \u0441\u0432\u043e\u044e. \u0415\u0441\u043b\u0438 \u0432\u044b \u0441\u043e \u043c\u043d\u043e\u0439 \u0441\u043e\u043b\u0438\u0434\u0430\u0440\u043d\u044b \u0432 \u044d\u0442\u043e\u043c \u0432\u043e\u043f\u0440\u043e\u0441\u0435, \u0442\u043e \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u043c \u043a\u043e\u043d\u0444\u0438\u0433, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0445\u0440\u0430\u043d\u0438\u0442\u0441\u044f \u0437\u0434\u0435\u0441\u044c: <br \/>  <code>c:\\Chocolatey\\lib\\warmup.*\\bin\\warmup.exe.Config<\/code> \u043d\u0430\u0445\u043e\u0434\u0438\u043c \u0442\u0430\u043c <code>C:\\CODE\\_templates<\/code> \u0438 \u043c\u0435\u043d\u044f\u0435\u043c \u043d\u0430 \u0441\u0432\u043e\u044e \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044e.  <\/li>\n<\/ul>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u043c\u043e\u0436\u043d\u043e \u0430\u043a\u0442\u0438\u0432\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0448\u0430\u0431\u043b\u043e\u043d\u044b, \u0438\u0437 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0434\u0435\u043b\u0430\u0442\u044c \u043d\u0430\u0448\u0438 \u043f\u0430\u043a\u0435\u0442\u044b (\u043f\u043e \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443 \u0441\u043e\u0437\u0434\u0430\u0435\u0442\u0441\u044f \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044e \u0441 \u043d\u0443\u0436\u043d\u044b\u043c \u0448\u0430\u0431\u043b\u043e\u043d\u043e\u043c). \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e, \u043d\u0430\u0445\u043e\u0434\u044f\u0441\u044c \u0432 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 <code>%ChocolateyInstall%\\chocolateytemplates\\_templates<\/code> \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u043c \u043a\u043e\u043c\u0430\u043d\u0434\u0443 (\u0443 \u043c\u0435\u043d\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u0438\u0437 \u043f\u043e\u0434 <code>admin<\/code>):<\/p>\n<pre><code class=\"bash\">warmup addTemplateFolder chocolatey &quot;%CD%\\chocolatey&quot; <\/code><\/pre>\n<p>  \u0418\u0434\u0435\u043c \u043d\u0430 \u0441\u0430\u0439\u0442 <a href=\"http:\/\/chocolatey.org\">chocolatey.org<\/a>, \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u0443\u0435\u043c\u0441\u044f, \u0437\u0430\u0445\u043e\u0434\u0438\u043c \u0432 \u0441\u0432\u043e\u0439 \u043f\u0440\u043e\u0444\u0438\u043b\u044c \u043d\u0430\u0436\u0438\u043c\u0430\u0435\u043c- <br \/>  <i>\u201cYour key is hidden for privacy, click to show.\u201c<\/i> \u0412\u0438\u0434\u0438\u043c \u0442\u0440\u0438 \u043a\u043e\u043c\u0430\u043d\u0434\u044b, \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u0435\u0440\u0432\u0443\u044e: \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c API Key.<\/p>\n<h4>\u041d\u0430 \u044d\u0442\u043e \u0441 \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u043e\u0439 \u0432\u0441\u0435, \u0442\u0435\u043f\u0435\u0440\u044c \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u0435\u0441\u0442\u0443\u043f\u0430\u0442\u044c \u043a \u043c\u0430\u0441\u0441\u043e\u0432\u043e\u043c\u0443 \u0432\u044b\u043f\u0443\u0441\u043a\u0443 \u043f\u0430\u043a\u0435\u0442\u043e\u0432<\/h4>\n<p>  \u041e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u0430\u044f \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u0435\u0442 \u0438\u043c\u0435\u043d\u043e\u0432\u0430\u0442\u044c \u0432\u0441\u0435 \u043d\u043e\u0432\u044b\u0435 \u043f\u0430\u043a\u0435\u0442\u044b \u0432 \u043d\u0438\u0436\u043d\u0435\u043c \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0435 \u0440\u0430\u0437\u0434\u0435\u043b\u044f\u044f \u0441\u043b\u043e\u0432\u0430 \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u043c \u201c-\u201d \u0438\u043b\u0438 \u043f\u0440\u043e\u0441\u0442\u043e \u043e\u043f\u0443\u0441\u043a\u0430\u044f \u043f\u0440\u043e\u0431\u0435\u043b\u044b. \u0422\u0430\u043a\u0436\u0435, \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u0435\u0442\u0441\u044f \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043f\u043e\u0438\u0441\u043a\u043e\u043c \u043f\u0430\u043a\u0435\u0442\u0430 \u0441 \u043d\u0443\u0436\u043d\u043e\u0439 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043e\u0439 \u0438 \u0442\u043e\u043b\u044c\u043a\u043e \u0435\u0441\u043b\u0438 \u0442\u0430\u043a\u043e\u0432\u043e\u0439 \u043d\u0435\u0442, \u0434\u0435\u043b\u0430\u0442\u044c \u0441\u0432\u043e\u0439.<\/p>\n<p>  \u0414\u043b\u044f \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u043e\u0432 \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443:.<\/p>\n<pre> packages   |- workrave     |- src       |- tools       |- workrave.nuspec       |- \u2026..     |- build   |- package-2 <\/pre>\n<p>  \u041d\u0430\u0445\u043e\u0434\u044f\u0441\u044c \u0432 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 <code>packages<\/code> \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c:<\/p>\n<pre><code class=\"bash\">warmup chocolatey workrave <\/code><\/pre>\n<p>  \u0412 \u043f\u043e\u044f\u0432\u0438\u0432\u0448\u0435\u0439\u0441\u044f \u043f\u0430\u043f\u043a\u0435 <code>workrave<\/code> \u0441\u043e\u0437\u0434\u0430\u0435\u043c <code>src<\/code> \u0438 \u043f\u0435\u0440\u0435\u043d\u043e\u0441\u0438\u043c \u0432 \u043d\u0435\u0435 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 <code>workrave<\/code>.<\/p>\n<p>  \u041e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u043c \u0444\u0430\u0439\u043b <code>workrave.nuspec<\/code>. \u042d\u0442\u043e \u043e\u0431\u044b\u0447\u043d\u044b\u0439 <code>xml<\/code>, \u0441 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u043d\u0430\u0448\u0435\u0433\u043e \u043f\u0430\u043a\u0435\u0442\u0430. \u041d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u0442\u0435\u0433\u043e\u0432 \u0433\u043e\u0432\u043e\u0440\u0438\u0442 \u0441\u0430\u043c\u043e \u0437\u0430 \u0441\u0435\u0431\u044f: <code>title<\/code> \u2014 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u0432 \u0441\u043f\u0438\u0441\u043a\u0435 \u043f\u0430\u043a\u0435\u0442\u043e\u0432 \u043d\u0430 \u0441\u0430\u0439\u0442\u0435 chocolatey.org; <code>author<\/code> \u2014 \u0441\u043e\u0437\u0434\u0430\u0442\u0435\u043b\u044c \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u0432\u044b \u0443\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u0435\u0442\u0435 \u0432 \u043f\u0430\u043a\u0435\u0442\u2026. <\/p>\n<p>  \u0421\u0430\u043c\u043e\u0435 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e\u0435 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0432 \u0444\u0430\u0439\u043b\u0435 <code>tools\\chocolateyInstall.ps1<\/code><\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u041a\u043e\u0434 \u0434\u043e<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"bash\">#NOTE: Please remove any commented lines to tidy up prior to releasing the package, including this one  $packageName = 'workrave' # arbitrary name for the package, used in messages $installerType = 'EXE_MSI_OR_MSU' #only one of these: exe, msi, msu $url = 'URL_HERE' # download url $url64 = 'URL_x64_HERE' # 64bit URL here or remove - if installer decides, then use $url $silentArgs = 'SILENT_ARGS_HERE' # &quot;\/s \/S \/q \/Q \/quiet \/silent \/SILENT \/VERYSILENT&quot; # try any of these to get the silent installer #msi is always \/quiet $validExitCodes = @(0) #please insert other valid exit codes here, exit codes for ms http:\/\/msdn.microsoft.com\/en-us\/library\/aa368542(VS.85).aspx  # main helpers - these have error handling tucked into them already # installer, will assert administrative rights  # if removing $url64, please remove from here Install-ChocolateyPackage &quot;$packageName&quot; &quot;$installerType&quot; &quot;$silentArgs&quot; &quot;$url&quot; &quot;$url64&quot;  -validExitCodes $validExitCodes # download and unpack a zip file  # if removing $url64, please remove from here Install-ChocolateyZipPackage &quot;$packageName&quot; &quot;$url&quot; &quot;$(Split-Path -parent $MyInvocation.MyCommand.Definition)&quot; &quot;$url64&quot;  #try { #error handling is only necessary if you need to do anything in addition to\/instead of the main helpers   # other helpers - using any of these means you want to uncomment the error handling up top and at bottom.   # downloader that the main helpers use to download items    # if removing $url64, please remove from here   #Get-ChocolateyWebFile &quot;$packageName&quot; 'DOWNLOAD_TO_FILE_FULL_PATH' &quot;$url&quot; &quot;$url64&quot;   # installer, will assert administrative rights - used by Install-ChocolateyPackage   #Install-ChocolateyInstallPackage &quot;$packageName&quot; &quot;$installerType&quot; &quot;$silentArgs&quot; '_FULLFILEPATH_' -validExitCodes $validExitCodes   # unzips a file to the specified location - auto overwrites existing content   #Get-ChocolateyUnzip &quot;FULL_LOCATION_TO_ZIP.zip&quot; &quot;$(Split-Path -parent $MyInvocation.MyCommand.Definition)&quot;   # Runs processes asserting UAC, will assert administrative rights - used by Install-ChocolateyInstallPackage   #Start-ChocolateyProcessAsAdmin 'STATEMENTS_TO_RUN' 'Optional_Application_If_Not_PowerShell' -validExitCodes $validExitCodes   # add specific folders to the path - any executables found in the chocolatey package folder will already be on the path. This is used in addition to that or for cases when a native installer doesn't add things to the path.   #Install-ChocolateyPath 'LOCATION_TO_ADD_TO_PATH' 'User_OR_Machine' # Machine will assert administrative rights   # add specific files as shortcuts to the desktop   #$target = Join-Path $MyInvocation.MyCommand.Definition &quot;$($packageName).exe&quot;   #Install-ChocolateyDesktopLink $target    #------- ADDITIONAL SETUP -------#   # make sure to uncomment the error handling if you have additional setup to do    #$processor = Get-WmiObject Win32_Processor   #$is64bit = $processor.AddressWidth -eq 64     # the following is all part of error handling   #Write-ChocolateySuccess &quot;$packageName&quot; #} catch {   #Write-ChocolateyFailure &quot;$packageName&quot; &quot;$($_.Exception.Message)&quot;   #throw #} <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u0417\u0434\u0435\u0441\u044c \u0442\u0440\u0438 \u0431\u043b\u043e\u043a\u0430: <\/p>\n<ul>\n<li>\u041f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435.<\/li>\n<li>\u0414\u0432\u0430 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0430 \u043f\u0440\u043e\u0441\u0442\u044b\u0445 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0449\u0438\u043a\u043e\u0432. <code>Install-ChocolateyPackage<\/code> \u2014 \u0441\u043a\u0430\u0447\u0438\u0432\u0430\u0435\u0442 exe \u0444\u0430\u0439\u043b \u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442 \u0435\u0433\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0443 \u0441 \u043d\u0443\u0436\u043d\u044b\u043c\u0438 \u043a\u043b\u044e\u0447\u0430\u043c\u0438. \u0421\u0430\u043c\u0430\u044f \u0445\u043e\u0434\u043e\u0432\u0430\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u0430 \u0432 \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u0435 \u0441\u043b\u0443\u0447\u0430\u0435\u0432 \u0435\u0435 \u0434\u043e\u043b\u0436\u043d\u043e \u0445\u0432\u0430\u0442\u0438\u0442\u044c. <code>Install-ChocolateyZipPackage<\/code> \u2014 \u0441\u043a\u0430\u0447\u0438\u0432\u0430\u0435\u0442 zip \u0430\u0440\u0445\u0438\u0432 \u0438 \u0440\u0430\u0441\u043f\u0430\u043a\u043e\u0432\u044b\u0432\u0430\u0435\u0442 \u0435\u0433\u043e \u0432 \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u0443\u044e \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044e.<\/li>\n<li><code>try \/ catch<\/code> \u2014 \u044d\u0442\u043e \u043d\u0430 \u0441\u043b\u0443\u0447\u0430\u0439 \u0441\u043b\u043e\u0436\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438. \u0421\u043a\u0430\u0436\u0435\u043c \u0441\u043a\u0430\u0447\u0430\u0442\u044c zip \u0430\u0440\u0445\u0438\u0432, \u0440\u0430\u0441\u043f\u0430\u043a\u043e\u0432\u0430\u0442\u044c \u0438 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0438\u0437 \u043d\u0435\u0433\u043e .exe \u0444\u0430\u0439\u043b.<\/li>\n<\/ul>\n<p>  \u0414\u043b\u044f \u043d\u0430\u0448\u0435\u0433\u043e \u0442\u0435\u0441\u0442\u043e\u0432\u043e\u0433\u043e \u043f\u0430\u043a\u0435\u0442\u0430 \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u043c \u043a\u043e\u0434 \u043a \u0442\u0430\u043a\u043e\u043c\u0443 \u0432\u0438\u0434\u0443 <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u041a\u043e\u0434 \u043f\u043e\u0441\u043b\u0435<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"bash\">#NOTE: Please remove any commented lines to tidy up prior to releasing the package, including this one  $packageName = 'workrave' # arbitrary name for the package, used in messages $installerType = 'exe' #only one of these: exe, msi, msu $url = 'http:\/\/softlayer-ams.dl.sourceforge.net\/project\/workrave\/workrave\/1.10.1\/workrave-win32-v1.10.1-installer.exe' # download url $silentArgs = '\/verysilent \/norestart' # &quot;\/s \/S \/q \/Q \/quiet \/silent \/SILENT \/VERYSILENT&quot; # try any of these to get the silent installer #msi is always \/quiet $validExitCodes = @(0) #please insert other valid exit codes here, exit codes for ms http:\/\/msdn.microsoft.com\/en-us\/library\/aa368542(VS.85).aspx  # main helpers - these have error handling tucked into them already # installer, will assert administrative rights  # if removing $url64, please remove from here Install-ChocolateyPackage &quot;$packageName&quot; &quot;$installerType&quot; &quot;$silentArgs&quot; &quot;$url&quot;  -validExitCodes $validExitCodes # download and unpack a zip file <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u0412 workrave \u0434\u043b\u044f \u0442\u0438\u0445\u043e\u0439 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u043a\u043b\u044e\u0447\u0438 <code>\/verysilent \/norestart<\/code>. \u0421\u043f\u0438\u0441\u043e\u043a \u0441\u0430\u043c\u044b\u0445 \u0440\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0435\u043d\u043d\u044b\u0445 \u043a\u043b\u044e\u0447\u0435\u0439 \u0432 \u043e\u0431\u0449\u0435\u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0445 \u0438\u043d\u0441\u0442\u0430\u043b\u044f\u0442\u043e\u0440\u0430\u0445 \u0443\u043a\u0430\u0437\u0430\u043d \u0432 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u043a \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 <code>$silentArgs<\/code>. \u041a\u0440\u043e\u043c\u0435 \u0442\u043e\u0433\u043e, \u043c\u043e\u0436\u043d\u043e \u043e\u0437\u043d\u0430\u043a\u043e\u043c\u0438\u0442\u0441\u044f \u0441 \u044d\u0442\u0438\u043c: <a href=\"http:\/\/unattended.sourceforge.net\/installers.php\">unattended.sourceforge.net\/installers.php<\/a><\/p>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u043c\u043e\u0436\u043d\u043e \u0441\u043e\u0431\u0440\u0430\u0442\u044c \u043f\u0430\u043a\u0435\u0442, \u043f\u0440\u043e\u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0435\u0433\u043e, \u0438 \u0437\u0430\u043b\u0438\u0442\u044c \u043d\u0430 chocolatey.org. \u0414\u043b\u044f \u043e\u0431\u043b\u0435\u0433\u0447\u0435\u043d\u0438\u044f \u044d\u0442\u043e\u0433\u043e \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430 \u044f \u043d\u0430\u043f\u0438\u0441\u0430\u043b 4 \u043f\u0440\u043e\u0441\u0442\u0435\u043d\u044c\u043a\u0438\u0445 .bat \u0444\u0430\u0439\u043b\u0430, \u041a\u043e\u043f\u0438\u043f\u0430\u0441\u0442\u0438\u0442\u044c \u043a\u043e\u0434 \u044f \u043d\u0435 \u0431\u0443\u0434\u0443, \u0432\u044b \u0438\u0445 \u043c\u043e\u0436\u0435\u0442\u0435 \u0441\u043a\u0430\u0447\u0430\u0442\u044c \u0441 <a href=\"https:\/\/github.com\/Claud\/chocolatey-packages\/tree\/master\/workrave\">github<\/a>.<\/p>\n<ul>\n<li><a href=\"https:\/\/github.com\/Claud\/chocolatey-packages\/blob\/master\/workrave\/src\/1-build-package.bat\">1-build-package.bat<\/a> \u2014 \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u0442 \u043f\u0430\u043a\u0435\u0442<\/li>\n<li><a href=\"https:\/\/github.com\/Claud\/chocolatey-packages\/blob\/master\/workrave\/src\/2-test-package.bat\">2-test-package.bat<\/a> \u2014 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u0443\u044e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0443 \u043f\u0430\u043a\u0435\u0442\u0430, \u0434\u043b\u044f \u0442\u0435\u0441\u0442\u0430.<\/li>\n<li><a href=\"https:\/\/github.com\/Claud\/chocolatey-packages\/blob\/master\/workrave\/src\/3-push-package.bat\">3-push-package.bat<\/a> \u2014 \u0437\u0430\u043b\u0438\u0432\u0430\u0435\u0442 \u043f\u0430\u043a\u0435\u0442 \u043d\u0430 chocolatey.org <\/li>\n<li><a href=\"https:\/\/github.com\/Claud\/chocolatey-packages\/blob\/master\/workrave\/src\/4-helper.bat\">4-helper.bat<\/a> \u2014 \u043e\u0431\u0435\u0440\u0442\u043a\u0430 \u043d\u0430\u0434 \u043f\u0435\u0440\u0432\u044b\u043c\u0438 \u0442\u0440\u0435\u043c\u044f. \u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442 \u0441\u0431\u043e\u0440\u0449\u0438\u043a, \u0430 \u043d\u0430 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u0443\u044e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0443 \u0438 push, \u0441\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u0435\u0442 \u0434\u0435\u043b\u0430\u0442\u044c \u0438\u043b\u0438 \u043d\u0435\u0442.<\/li>\n<\/ul>\n<p>  \u0422.\u0435. \u0434\u043b\u044f \u0441\u0431\u043e\u0440\u043a\u0438 \u043d\u0430\u0448\u0435\u0433\u043e \u043f\u0430\u043a\u0435\u0442\u0430 \u043f\u0440\u043e\u0441\u0442\u043e, \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u043f\u0435\u0440\u0432\u044b\u0435 \u0442\u0440\u0438 .bat \u0444\u0430\u0439\u043b\u0430 \u043f\u043e \u043f\u043e\u0440\u044f\u0434\u043a\u0443 \u043b\u0438\u0431\u043e 4-\u0442\u044b\u0439.<\/p>\n<p>  \u041d\u0430 \u044d\u0442\u043e\u043c \u0432\u0441\u0435.<\/p>\n<ul>\n<li><a href=\"https:\/\/github.com\/Claud\/chocolatey-packages\/tree\/master\/workrave\">github.com\/Claud\/chocolatey-packages\/tree\/master\/workrave<\/a> \u2014 \u0442\u043e \u0447\u0442\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c.<\/li>\n<li><a href=\"https:\/\/github.com\/Claud\/chocolatey-packages\">github.com\/Claud\/chocolatey-packages<\/a> \u2014 \u043c\u043e\u0439 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439 \u0441 \u043f\u0430\u043a\u0435\u0442\u0430\u043c\u0438.<\/li>\n<li><a href=\"https:\/\/github.com\/Claud\/chocolatey-packages\/blob\/master\/smartgit-with-jre\/src\/tools\/chocolateyInstall.ps1\">github.com\/Claud\/chocolatey-packages\/blob\/master\/smartgit-with-jre\/src\/tools\/chocolateyInstall.ps1<\/a> \u2014 \u043f\u0440\u0438\u043c\u0435\u0440 \u0442\u043e\u0433\u043e \u043a\u0430\u043a \u0434\u0435\u0439\u0441\u0442\u0432\u0443\u0435\u043c, \u043a\u043e\u0433\u0434\u0430 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043e\u0447\u043d\u044b\u0439 \u0444\u0430\u0439\u043b \u0440\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u044f\u0435\u0442\u0441\u044f \u0432 zip \u0430\u0440\u0445\u0438\u0432\u0435.<\/li>\n<li><a href=\"https:\/\/github.com\/Claud\/chocolatey-packages\/blob\/master\/yandexdisk\/src\/tools\/chocolateyInstall.ps1\">github.com\/Claud\/chocolatey-packages\/blob\/master\/yandexdisk\/src\/tools\/chocolateyInstall.ps1<\/a> \u2014 \u043f\u0440\u0438\u043c\u0435\u0440 \u0442\u043e\u0433\u043e \u043a\u0430\u043a \u0434\u0435\u0439\u0441\u0442\u0432\u0443\u0435\u043c, \u043a\u043e\u0433\u0434\u0430 \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 exe \u0444\u0430\u0439\u043b \u043d\u0435 \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u0430\u044f \u0438 \u0435\u0435 \u043d\u0430\u0434\u043e \u0441\u043f\u0430\u0440\u0441\u0438\u0442\u044c \u0441\u043e \u0441\u0442\u0440\u0430\u043d\u0438\u0447\u043a\u0438.<\/li>\n<li><a href=\"https:\/\/github.com\/chocolatey\/chocolatey\/wiki\/CreatePackages\">github.com\/chocolatey\/chocolatey\/wiki\/CreatePackages<\/a> \u2014 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e \u043e \u0441\u0431\u043e\u0440\u043a\u0435 \u043f\u0430\u043a\u0435\u0442\u043e\u0432. \u0425\u043e\u0442\u044f \u0437\u0434\u0435\u0441\u044c \u0431\u043e\u043b\u044c\u0448\u0435 \u043f\u0440\u043e \u043e\u0431\u0449\u0438\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u0430.<\/li>\n<li><a href=\"https:\/\/github.com\/chocolatey\/chocolatey\/wiki\/CreatePackagesQuickStart\">github.com\/chocolatey\/chocolatey\/wiki\/CreatePackagesQuickStart<\/a> \u2014 \u043f\u0440\u043e \u0441\u0431\u043e\u0440\u043a\u0443, \u043d\u043e \u0432 \u0443\u043a\u043e\u0440\u043e\u0447\u0435\u043d\u043d\u043e\u043c \u0438\u0437\u043b\u043e\u0436\u0435\u043d\u0438\u0435.<\/li>\n<li><a href=\"http:\/\/unattended.sourceforge.net\/installers.php\">unattended.sourceforge.net\/installers.php<\/a> \u2014 \u043f\u0440\u043e \u043a\u043b\u044e\u0447\u0438 \u0434\u043b\u044f \u0442\u0438\u0445\u043e\u0439 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438.<\/li>\n<li><a href=\"https:\/\/chocolatey.org\/\">chocolatey.org\/<\/a> \u2014 \u0441\u0430\u0439\u0442 \u043f\u0440\u043e\u0435\u043a\u0442\u0430.<\/li>\n<\/ul>\n<p>  <u>\u041f\u0440\u043e \u043e\u0448\u0438\u0431\u043a\u0438 \u043f\u0440\u043e\u0441\u044c\u0431\u0430 \u043f\u0438\u0441\u0430\u0442\u044c \u0432 \u041b\u0421.<\/u> \t\t\t<\/p>\n<div class=\"clear\"><\/div>\n<\/p><\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"http:\/\/habrahabr.ru\/post\/223373\/\"> http:\/\/habrahabr.ru\/post\/223373\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"content html_format\"> \t\t\t<img decoding=\"async\" src=\"http:\/\/habrastorage.org\/getpro\/habr\/post_images\/801\/f81\/26f\/801f8126f67c062423fe06719d7eb93b.png\"\/><\/p>\n<p>  <a href=\"http:\/\/chocolatey.org\/\">Chocolatey<\/a> \u2014 \u043f\u0430\u043a\u0435\u0442\u043d\u044b\u0439 \u043c\u0435\u043d\u0435\u0434\u0436\u0435\u0440 \u0434\u043b\u044f windows \u0441\u0438\u043b\u044c\u043d\u043e \u043e\u0431\u043b\u0435\u0433\u0447\u0430\u044e\u0449\u0438\u0439 \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u0443 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c, \u0430 \u0443\u0436 \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043e\u043d \u044d\u043a\u043e\u043d\u043e\u043c\u0438\u0442 \u0432\u0440\u0435\u043c\u0435\u043d\u0438. \u041f\u0440\u043e \u044d\u0442\u043e \u0447\u0443\u0434\u043e \u0443\u0436\u0435 \u043f\u0438\u0441\u0430\u043b\u0438 \u043d\u0430 \u0445\u0430\u0431\u0440\u0435 \u0438 \u0434\u0430\u0436\u0435 \u0431\u044b\u043b\u043e \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u043e \u043a\u0430\u043a \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0441\u0432\u043e\u0439 \u043f\u0430\u043a\u0435\u0442 \u0434\u043b\u044f \u043d\u0435\u0433\u043e, \u043d\u043e \u0442\u0430\u043c \u0431\u044b\u043b\u043e \u0431\u043e\u043b\u044c\u0448\u0435 \u0440\u0443\u0447\u043d\u043e\u0439 \u0440\u0430\u0431\u043e\u0442\u044b, \u044f \u0436\u0435 \u0445\u043e\u0447\u0443 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c \u043a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0443\u043f\u0440\u043e\u0441\u0442\u0438\u0442\u044c \u044d\u0442\u043e \u0434\u0435\u043b\u043e.   <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-223373","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/223373","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=223373"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/223373\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=223373"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=223373"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=223373"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}