legend Posted August 15, 2018 Share Posted August 15, 2018 (edited) #RequireAdmin #include <File.au3> ;------------------------------------------------------------------------------------------------------------------------------------------- install("winrar",True) ;------------------------------------------------------------------------------------------------------------------------------------------- ;Installs chocolatey. $choco1 = "@powershell -NoProfile -ExecutionPolicy unrestricted -Command" $choco2 = " (iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1'))) >$null 2>&1" $choco3 = " && SET PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin" if not FileExists(@AppDataCommonDir & "\Chocolatey\") then RunWait(@ComSpec & " /C " & $choco1 & $choco2 & $choco3, "", @SW_HIDE) $find = '"' & "allowGlobalConfirmation" & '"' & " enabled=" & '"' & "false" & '"' & " setExplicitly=" & '"' & "false" & '"' $replace = '"' & "allowGlobalConfirmation" & '"' & " enabled=" & '"' & "true" & '"' & " setExplicitly=" & '"' & "true" & '"' _ReplaceStringInFile(@AppDataCommonDir & "\Chocolatey\config\chocolatey.config", $find, $replace) EndIf ;------------------------------------------------------------------------------------------------------------------------------------------- ;Install and uninstall functions Func install($package_name,$notify) RunWait(@ComSpec & " /C " & "choco install " & $package_name, "", @SW_HIDE) if $notify = True Then MsgBox(64,"Installed", $package_name & " has been installed.") EndFunc Func uninstall($package_name, $notify) RunWait(@ComSpec & " /C " & "choco uninstall " & $package_name, "", @SW_HIDE) if $notify = True Then MsgBox(64,"Uninstalled", $package_name & " has been uninstalled.") EndFunc ;------------------------------------------------------------------------------------------------------------------------------------------- a small script i made to install software using chocolatey: https://chocolatey.org/ If chocolatey isn't installed, it will install it, and afterwards install the package you defined. All packages can be found here: https://chocolatey.org/packages Edited August 15, 2018 by legend Earthshine 1 Link to comment Share on other sites More sharing options...
Earthshine Posted August 15, 2018 Share Posted August 15, 2018 (edited) nice. this can be used to set up Sublime Text 3 to use the console when executing C# and other .NET languages! Until now I had to do in manually! thanks! so, with every testing or dev vm, I set up my editor (licensed version gives me that right, as many as I want, everywhere, as long as it's only me using) I need to do this so this is going to save me some time. Quote CROSS PLATFORM Sublime Text is available for Mac, Windows and Linux. One license is all you need to use Sublime Text on every computer you own, no matter what operating system it uses. Sublime Text uses a custom UI toolkit, optimized for speed and beauty, while taking advantage of native functionality on each platform. Edited August 15, 2018 by Earthshine My resources are limited. You must ask the right questions Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now