Chocolatey Fest - Chocolatey's inaugural conference on Windows Automation (WinOps) is coming - Learn more!

Change Screen Resolution

1.0.1.0

Package test results are passing.

This package was approved by moderator AdmiringWorm on 8/19/2017.

Change Screen Resolution is a small utilty for changing the screen resolution of virtual machines (VMs). This tool is useful for UI automated testing because the default resolution is much lower than the desired resolution.

Package Specific

Package Parameters

The following package parameters can be set:

  • /RunAtStartup - determines whether to run at startup. Great for Auto UI VMs - defaults to "false"
  • /LoggingEnabled - Toggle file logging true/false
  • /EmailEnabled - Toggles email notifications true/false
  • /EmailFrom - specify the from address for email notifications
  • /EmailTo - specify the to address for email notifications
  • /SendGridUser - specify the sendgrid account username
  • /SendGridPwd - specify the sendgrid account password

These parameters can be passed to the installer with the use of --params.
For example: --params "'/RunAtStartup:true /LoggingEnabled:true'".

To install Change Screen Resolution, run the following command from the command line or from PowerShell:

C:\> choco install change-screen-resolution

To upgrade Change Screen Resolution, run the following command from the command line or from PowerShell:

C:\> choco upgrade change-screen-resolution

Files

Hide
  • tools\ChangeScreenResolution.exe Show
    md5: 63AF2FA7F3A664B7FE7C7533BF73DDB2 | sha1: C3C7F0D5952B3DD45DFA824FEB05305C18928FE2 | sha256: DC5E43F1264B5BCD767E6D8034D6D6F459AFF4121E70083A25FC014CE37CDAF5 | sha512: ED45B3D20CB2B9A4AE2B9DE11EB48576200EEAC37779F4E9D7A113497B2FF0535C084B0E4C7766DF557961C10D68874B082CA327E22AAE311506850E070320A1
  • tools\ChangeScreenResolution.exe.config Show
    <?xml version="1.0" encoding="utf-8" ?>
    <configuration>
        <startup> 
            <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
        </startup>
      <appSettings>
        <add key="LoggingEnabled" value="False"/>
        <!-- SendGrid Email Settings -->
        <add key="EmailEnabled" value="false"/>
        <add key="EmailFrom" value="[email protected]" />
        <add key="EmailTo" value="[email protected]"/>
        <add key="SmtpUser" value="getfromsendgrid" />
        <add key="SmtpPassword" value="getfromsendgrid" />
      </appSettings>
    </configuration>
  • tools\ChangeScreenResolution.pdb
  • tools\chocolateybeforemodify.ps1 Show
    # Delete shortcut if exists
    
    $shortcut = "C:\Users\All Users\Microsoft\Windows\Start Menu\Programs\Startup\csr.lnk"
    write-host "Removing shortcut (if exists)"
    if(test-path $shortcut)
    {
        remove-item $shortcut
    }
  • tools\chocolateyinstall.ps1 Show
    $ErrorActionPreference = 'Stop'; 
    
    $packageName= 'change-screen-resolution'
    $toolName   = 'changescreenresolution'
    $toolsDir   = "$(Split-Path -parent $MyInvocation.MyCommand.Definition)"
    $fileLocation = Join-Path $toolsDir 'changescreenresolution.exe'
    
    $packageArgs = @{
      packageName   = $packageName
      unzipLocation = $toolsDir
      fileType      = 'exe'
      url           = $url
      file         = $fileLocation
      softwareName  = 'change-screen-resolution*' 
      checksum      = '63AF2FA7F3A664B7FE7C7533BF73DDB2'
      checksumType  = 'md5' 
    }
    
    function Write-Config($key, $value)
      {
        # update config file
          $appConfig = "$installLocation\tools\$toolName.exe.config"
          $doc = (Get-Content $appConfig) -as [Xml]
    
          $obj = $doc.configuration.appSettings.add | where {$_.Key -eq $key}
          $obj.value = $value
          $doc.Save($appConfig)
      }
    
     $installLocation = $env:ChocolateyPackageFolder 
    
    $pp = Get-PackageParameters
    
    if ($pp["RunAtStartup"] -ne $null -and $pp["RunAtStartup"] -eq 'true') 
    {
    
      $resolution = "1920 1080"
    
      if($pp["resolution"] -ne $null)
      {
        $resource = $pp["resolution"]
      }
    
      Install-ChocolateyShortcut -ShortcutFilePath "C:\Users\All Users\Microsoft\Windows\Start Menu\Programs\Startup\csr.lnk" -Description "Change Screen Reso" -Arguments $resolution -TargetPath $installLocation\tools\$packageName.exe
    
      if($pp["LoggingEnabled"] -ne $null -and $pp["LoggingEnabled"] -eq 'true')
      {
        Write-Config 'LoggingEnabled' 'true'
      } 
    
      if($pp["EmailEnabled"] -ne $null -and $pp["EmailEnabled"] -eq 'true')
      {
        Write-Config 'EmailEnabled' 'true'
      }
    
      if($pp["EmailFrom"] -ne $null -and $pp["EmailFrom"].Length -gt 0)
      {
        Write-Config 'EmailFrom' $pp["EmailFrom"]
      }
    
      if($pp["EmailTo"] -ne $null -and $pp["EmailTo"].Length -gt 0)
      {
        Write-Config 'EmailTo' $pp["EmailTo"]
      }
    
      if($pp["SendGridUser"] -ne $null -and $pp["SendGridUser"].Length -gt 0)
      {
        Write-Config 'SendGridUser' $pp["SendGridUser"]
      }
    
      if($pp["SendGridPwd"] -ne $null -and $pp["SendGridPwd"].Length -gt 0)
      {
        Write-Config 'SendGridPwd' $pp["SendGridPwd"]
      }
    
    
      
    }
  • tools\LICENSE.txt Show
    From: https://github.com/mikedouglasdev/changescreenresolution/blob/master/LICENSE
    
    LICENSE
    
    MIT License
    
    Copyright (c) 2017 Mike Douglas
    
    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.
    
  • tools\SendGrid.SmtpApi.dll Show
    md5: 0AE99106B32E478C1E563EDFC54B0326 | sha1: F01105B9E362F9E83DDA367139ED5F53A281913D | sha256: 04F6611A5CDBE7B976EEFFBA7E926451D12B1D81DE630D54348A94E04C0EB9CC | sha512: CC5C044483AAA04FA5BB0AD305EDBCDC1BE4DA153AE8CBC842CFCE4BF0F432EA642DD1408029C9C5C572EFBD73765CF6C80936B83800AA15017332315BC985EA
  • tools\SendGridMail.dll Show
    md5: 4AD8922274C9EFB77E8ABDFDE65298A2 | sha1: E5BAA3588F0BB67BA97BA3A0B558DF515FF6F19C | sha256: 643BF14B3FD8F95CB0DEF989D19BF2BA4C79400EBC4552C31E725B5667EBAA34 | sha512: 0B889AF835E3767DF50BE9952042DCA5ADB834350D0219210E9C4A895FF72AD3F2FA291E7302D01009D89CC451D52D1E5E8C840675F7F06ED1CE49EE2AD8F9C3
  • tools\VERIFICATION.txt Show
    VERIFICATION
    Verification is intended to assist the Chocolatey moderators and community
    in verifying that this package's contents are trustworthy.
     
    The exe is built from the github repo
    
    1. You can use one of the following methods to obtain the checksum
      - Use powershell function 'Get-Filehash'
      - Use chocolatey utility 'checksum.exe'
    
      checksum type: md5
      checksum: 63AF2FA7F3A664B7FE7C7533BF73DDB2
      

Virus Scan Results

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.

Dependencies

Package Maintainer(s)

Software Author(s)

  • Mike Douglas

Copyright

2017 Mike Douglas

Tags

Release Notes

1.0.1.0 Adds file logging

Version History

Version Downloads Last updated Status

Discussion for the Change Screen Resolution Package

Ground rules:

  • This discussion is only about Change Screen Resolution and the Change Screen Resolution 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 Change Screen Resolution, 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.

comments powered by Disqus
Chocolatey.org uses cookies to enhance the user experience of the site.
Ok