Downloads:
239
Downloads of v 0.1.0:
202
Last Update:
28 Apr 2022
Package Maintainer(s):
Software Author(s):
- ironyman
Tags:
switch task switcher- Software Specific:
- Software Site
- Software Source
- Software License
- Software Docs
- Software Issues
- Package Specific:
- Package Source
- Package outdated?
- Package broken?
- Contact Maintainers
- Contact Site Admins
- Software Vendor?
- Report Abuse
- Download
switch (Install)
- 1
- 2
- 3
0.1.0 | Updated: 28 Apr 2022
- Software Specific:
- Software Site
- Software Source
- Software License
- Software Docs
- Software Issues
- Package Specific:
- Package Source
- Package outdated?
- Package broken?
- Contact Maintainers
- Contact Site Admins
- Software Vendor?
- Report Abuse
- Download
Downloads:
239
Downloads of v 0.1.0:
202
Maintainer(s):
Software Author(s):
- ironyman
switch (Install) 0.1.0
Legal Disclaimer: Neither this package nor Chocolatey Software, Inc. are affiliated with or endorsed by ironyman. The inclusion of ironyman trademark(s), if any, upon this webpage is solely to identify ironyman goods or services and not for commercial purposes.
- 1
- 2
- 3
Some Checks Have Failed or Are Not Yet Complete
Not All Tests Have Passed
Deployment Method: Individual Install, Upgrade, & Uninstall
To install switch (Install), run the following command from the command line or from PowerShell:
To upgrade switch (Install), run the following command from the command line or from PowerShell:
To uninstall switch (Install), run the following command from the command line or from PowerShell:
Deployment Method:
This applies to both open source and commercial editions of Chocolatey.
1. Enter Your Internal Repository Url
(this should look similar to https://community.chocolatey.org/api/v2/)
2. Setup Your Environment
1. Ensure you are set for organizational deployment
Please see the organizational deployment guide
2. Get the package into your environment
Option 1: Cached Package (Unreliable, Requires Internet - Same As Community)-
Open Source or Commercial:
- Proxy Repository - Create a proxy nuget repository on Nexus, Artifactory Pro, or a proxy Chocolatey repository on ProGet. Point your upstream to https://community.chocolatey.org/api/v2/. Packages cache on first access automatically. Make sure your choco clients are using your proxy repository as a source and NOT the default community repository. See source command for more information.
- You can also just download the package and push it to a repository Download
-
Open Source
-
Download the package:
Download - Follow manual internalization instructions
-
-
Package Internalizer (C4B)
-
Run: (additional options)
choco download switch --internalize --source=https://community.chocolatey.org/api/v2/
-
For package and dependencies run:
choco push --source="'INTERNAL REPO URL'"
- Automate package internalization
-
Run: (additional options)
3. Copy Your Script
choco upgrade switch -y --source="'INTERNAL REPO URL'" [other options]
See options you can pass to upgrade.
See best practices for scripting.
Add this to a PowerShell script or use a Batch script with tools and in places where you are calling directly to Chocolatey. If you are integrating, keep in mind enhanced exit codes.
If you do use a PowerShell script, use the following to ensure bad exit codes are shown as failures:
choco upgrade switch -y --source="'INTERNAL REPO URL'"
$exitCode = $LASTEXITCODE
Write-Verbose "Exit code was $exitCode"
$validExitCodes = @(0, 1605, 1614, 1641, 3010)
if ($validExitCodes -contains $exitCode) {
Exit 0
}
Exit $exitCode
- name: Install switch
win_chocolatey:
name: switch
version: '0.1.0'
source: INTERNAL REPO URL
state: present
See docs at https://docs.ansible.com/ansible/latest/modules/win_chocolatey_module.html.
chocolatey_package 'switch' do
action :install
source 'INTERNAL REPO URL'
version '0.1.0'
end
See docs at https://docs.chef.io/resource_chocolatey_package.html.
cChocoPackageInstaller switch
{
Name = "switch"
Version = "0.1.0"
Source = "INTERNAL REPO URL"
}
Requires cChoco DSC Resource. See docs at https://github.com/chocolatey/cChoco.
package { 'switch':
ensure => '0.1.0',
provider => 'chocolatey',
source => 'INTERNAL REPO URL',
}
Requires Puppet Chocolatey Provider module. See docs at https://forge.puppet.com/puppetlabs/chocolatey.
4. If applicable - Chocolatey configuration/installation
See infrastructure management matrix for Chocolatey configuration elements and examples.
This package was approved by moderator TheCakeIsNaOH on 09 Jun 2022.
You can switch tasks too!
$psFile = Join-Path "$(Split-Path -parent $MyInvocation.MyCommand.Definition)" 'uninstall.ps1'
# Start-ChocolateyProcessAsAdmin "& `'$psFile`'" *> $null
& "$psFile" | out-null
$ErrorActionPreference = 'Stop'; # stop on all errors
$scriptRoot = "";
$currentPrincipal = New-Object Security.Principal.WindowsPrincipal([Security.Principal.WindowsIdentity]::GetCurrent())
if (-not $currentPrincipal.IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator)) {
echo "Need to be admin"
break
}
if (Test-Path -Path "$PSScriptRoot\quakerun.exe") {
$scriptRoot = $PSScriptRoot;
} elseif (Test-Path -Path "$((pwd).path)\quakerun.exe") {
$scriptRoot = (pwd).path;
} elseif (Test-Path -Path "$PSScriptRoot\..\target\debug\quakerun.exe") {
$scriptRoot = (Resolve-path -Path $PSScriptRoot\..\target\debug\).Path;
}
$taskAction = New-ScheduledTaskAction `
-Execute "$scriptRoot\noconsole.exe" `
-Argument "`"`"`"$scriptRoot\quakerun.exe`"`"`" -c `"`"`"$scriptRoot\switch.exe`"`"`""
$taskTrigger = New-ScheduledTaskTrigger -atlogon -User $env:USERNAME
# Required to set_foreground_window_terminal on high integrity level process windows.
$principal = New-ScheduledTaskPrincipal -UserId $env:USERNAME -RunLevel Highest
# For some reason taskscheduler thinks QuakeRun is still running long after noconsole.exe or quakerun.exe exits.
# Adding -ExecutionTimeLimit 1 means taskscheduler will assume QuakeRun already exited and quakerun.exe
# has its own mechanism for ensuring only one instance is running.
$setting = New-ScheduledTaskSettingsSet -MultipleInstances Parallel -AllowStartIfOnBatteries -DontStopIfGoingOnBatteries -ExecutionTimeLimit 1
Register-ScheduledTask `
-TaskName QuakeRun `
-Action $taskAction `
-Trigger $taskTrigger `
-Principal $principal `
-Setting $setting `
-Description "Start switch.exe with quakerun.exe at logon" `
-force | out-null
From: <insert applicable license url here>
MIT LICENSE
Copyright 2021 the committer.
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
md5: 4024B6013867D0AFC85987610A11C5EE | sha1: 9E286D6C43A471C2C5E5EEA8E69BE894C926FF8B | sha256: 515883F0C3913B67BFAAC083E05A2DC071595AF458C3B65FB6280749AFF0193B | sha512: 925FC6AEB4D4AA50F0C6638691BFA82211B80FC8BCF7236C0117E6ED6191B4A29C95787F64404295234382C12BF3F51A6DBCD90B30C580384BA09CE4F4FA549A
md5: E8FEF807D2FCDBBC80C6530AEDD1C379 | sha1: 826C1F8E9FBC20D8EE9C71F4F3EF3196B9EB2367 | sha256: D71B663708FC5F2C634DCA1CBB41ACB45BEBD4F24DAE0BF921B33DE72CAA6C03 | sha512: D22A80F9BAD9BBEC95630420C0B853AEF28395F378B4EDA22FD9E8169D65593090F661CE7FAB1C7D50BFA5DE1F059445F5EE9E84661420E3C29D357E8ECA270F
md5: 4A24357B18C91AAFBDBEF57FAA063EB1 | sha1: DF0197E6B88161EFDB0AD37A15C6F6984EB8BF1C | sha256: 3D5B5589E8F4AFEC574D0ECB173008C43A48EF0F794554A39C2CA57496FBCABA | sha512: 0B115C79D5B4A3D62F65838C54F5ED0A206F1914B9FFF3D88F14B071269BA5775278CFDD3502DE8AE8CB483D5D3A28E88EDEA69E1658F48E269E2FB80EB79974
$currentPrincipal = New-Object Security.Principal.WindowsPrincipal([Security.Principal.WindowsIdentity]::GetCurrent())
if (-not $currentPrincipal.IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator)) {
echo "Need to be admin"
break
}
Unregister-ScheduledTask -TaskName QuakeRun -Confirm:$False -ea silentlycontinue
if (Test-Path -Path "$PSScriptRoot\quakerun.exe") {
if (get-process quakerun -ea silentlycontinue) {
& "$PSScriptRoot\quakerun.exe" -s
}
if (-not ($PSScriptRoot -like '*\chocolatey\lib\switch\tools')) {
echo "Delete files to complete uninstall"
}
}
VERIFICATION
Verification is intended to assist the Chocolatey moderators and community
in verifying that this package's contents are trustworthy.
<Include details of how to verify checksum contents>
<If software vendor, explain that here - checksum verification instructions are optional>
The packager is also the software vendor and the checksum verification is optional.
Log in or click on link to see number of positives.
- noconsole.exe (4ada6c06385b) - ## / 68
- quakerun.exe (ec2e34be5806) - ## / 68
- switch.exe (a0e40a8c33ec) - ## / 68
- switch.0.1.0.nupkg (731164f7131f) - ## / 64
- noconsole.exe (515883f0c391) - ## / 68
- quakerun.exe (d71b663708fc) - ## / 67
- switch.exe (3d5b5589e8f4) - ## / 67
In cases where actual malware is found, the packages are subject to removal. Software sometimes has false positives. Moderators do not necessarily validate the safety of the underlying software, only that a package retrieves software from the official distribution point and/or validate embedded software against official distribution point (where distribution rights allow redistribution).
Chocolatey Pro provides runtime protection from possible malware.
2021 The committer
This package has no dependencies.
Ground Rules:
- This discussion is only about switch (Install) and the switch (Install) package. If you have feedback for Chocolatey, please contact the Google Group.
- This discussion will carry over multiple versions. If you have a comment about a particular version, please note that in your comments.
- The maintainers of this Chocolatey Package will be notified about new comments that are posted to this Disqus thread, however, it is NOT a guarantee that you will get a response. If you do not hear back from the maintainers after posting a message below, please follow up by using the link on the left side of this page or follow this link to contact maintainers. If you still hear nothing back, please follow the package triage process.
- Tell us what you love about the package or switch (Install), or tell us what needs improvement.
- Share your experiences with the package, or extra configuration or gotchas that you've found.
- If you use a url, the comment will be flagged for moderation until you've been whitelisted. Disqus moderated comments are approved on a weekly schedule if not sooner. It could take between 1-5 days for your comment to show up.