├── .gitignore ├── OverdriveNTool.ini ├── castxmr_settings.txt ├── StartVegaSetup.bat ├── downloads.txt ├── URLs.txt ├── LICENSE ├── VegaPowerPlayTable.txt ├── README.md └── VegaSetupMenu.ps1 /.gitignore: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /OverdriveNTool.ini: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sheergenious/VegaMining/HEAD/OverdriveNTool.ini -------------------------------------------------------------------------------- /castxmr_settings.txt: -------------------------------------------------------------------------------- 1 | wallet:48186nvTbymXS8J1GZhv1f6mhPxhsr13pLzMMngwRtmcdwZBMjqmYAxHPTqyENTvQK8dhwQSPGP9VdAPSJYYCzt1SYBdNXo 2 | pooladdress:pool.supportxmr.com:7777 3 | poolpassword:x 4 | -------------------------------------------------------------------------------- /StartVegaSetup.bat: -------------------------------------------------------------------------------- 1 | @ECHO OFF 2 | SET ThisScriptsDirectory=%~dp0 3 | SET PowerShellScriptPath=%ThisScriptsDirectory%VegaSetupMenu.ps1 4 | PowerShell -NoProfile -ExecutionPolicy Bypass -Command "& '%PowerShellScriptPath%'"; 5 | PAUSE -------------------------------------------------------------------------------- /downloads.txt: -------------------------------------------------------------------------------- 1 | https://gallery.technet.microsoft.com/PowerShell-Device-60d73bb0/file/147248/2/DeviceManagement.zip 2 | http://ftp.nluug.nl/pub/games/PC/guru3d/ddu/[Guru3D.com]-DDU.zip 3 | http://www.nirsoft.net/utils/devmanview-x64.zip 4 | http://www.gandalph3000.com/download/cast_xmr-vega-win64_080.zip 5 | http://www56.zippyshare.com/d/Um7FC50t/25918/OverdriveNTool%200.2.3.7z 6 | http://www.7-zip.org/a/7za920.zip -------------------------------------------------------------------------------- /URLs.txt: -------------------------------------------------------------------------------- 1 | Device management powershell script 2 | https://gallery.technet.microsoft.com/PowerShell-Device-60d73bb0#content 3 | https://gallery.technet.microsoft.com/PowerShell-Device-60d73bb0/file/147248/2/DeviceManagement.zip 4 | 5 | AMD Driver 6 | http://support.amd.com/en-us/kb-articles/Pages/Radeon-Software-Crimson-ReLive-Edition-Beta-for-Blockchain-Compute-Release-Notes.aspx 7 | 8 | Display driver Uninstaller 9 | http://www.guru3d.com/files-details/display-driver-uninstaller-download.html 10 | http://www.guru3d.com/files-get/display-driver-uninstaller-download,9.html 11 | 12 | OverdriveNTool 13 | https://forums.guru3d.com/threads/overdriventool-tool-for-amd-gpus.416116/ 14 | https://drive.google.com/open?id=1X9gameYP9XtRnYTVR7sJqpVVynKsTtHB 15 | 16 | Device manager view - Tool to disable and re-enable the cards 17 | http://www.nirsoft.net/utils/device_manager_view.html 18 | http://www.nirsoft.net/utils/devmanview-x64.zip 19 | 20 | Cast-XMR 21 | https://bitcointalk.org/index.php?topic=2256917.0;all 22 | http://www.gandalph3000.com/download/cast_xmr-vega-win64_080.zip -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2018 sheergenious 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /VegaPowerPlayTable.txt: -------------------------------------------------------------------------------- 1 | Windows Registry Editor Version 5.00 2 | Get in touch via bitcointalk on updates or further development wishes. User brnsted 3 | ETH A13015081E1f9CF27A2843e2A623F362D0d08666 4 | XMR 47NgZN7Mp5CcfKzUKhFHXiMuXghudzFegUPWaTUJU71QVze3P1o2gd9MuhroHrYGAH1spqWEWDrnvUpeqFCic8B772ySpCM 5 | [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Class\{4d36e968-e325-11ce-bfc1-08002be10318}ZZzz] 6 | "PP_PhmSoftPowerPlayTable"=hex:A7,02,08,01,00,5C,00,EF,06,00,00,0E,2C,00,00,1B,\ 7 | 00,48,00,00,00,80,A9,03,00,F0,49,02,00,32,00,08,00,00,00,00,00,00,00,00,00,\ 8 | 00,00,00,00,00,02,01,5C,00,40,02,37,02,94,00,8F,01,B4,00,1E,01,7A,00,8C,00,\ 9 | AD,01,00,00,00,00,63,02,00,00,90,00,99,02,5E,01,34,01,88,01,68,36,02,00,71,\ 10 | 02,02,02,00,00,00,00,00,00,08,00,00,00,00,00,00,00,05,00,07,00,03,00,05,00,\ 11 | 00,00,00,00,00,00,01,08,84,03,84,03,84,03,84,03,84,03,84,03,84,03,84,03,01,\ 12 | 01,84,03,01,01,84,03,00,06,60,EA,00,00,00,40,19,01,00,01,DC,4A,01,00,02,00,\ 13 | 77,01,00,03,90,91,01,00,05,6C,B0,01,00,07,01,08,D0,4C,01,00,00,00,80,00,00,\ 14 | 00,00,00,00,1C,83,01,00,01,00,00,00,00,00,00,00,00,70,A7,01,00,02,00,00,00,\ 15 | 00,00,00,00,00,88,BC,01,00,03,00,00,00,00,00,00,00,00,38,C1,01,00,04,00,00,\ 16 | 00,00,00,00,00,00,88,D5,01,00,05,00,00,00,00,01,00,00,00,70,D9,01,00,06,00,\ 17 | 00,00,00,01,00,00,00,00,26,02,00,07,00,00,00,00,01,00,00,00,00,04,60,EA,00,\ 18 | 00,00,40,19,01,00,00,DC,4A,01,00,00,90,5F,01,00,00,00,08,28,6E,00,00,00,2C,\ 19 | C9,00,00,01,F8,0B,01,00,02,80,38,01,00,03,90,5F,01,00,04,F4,91,01,00,05,D0,\ 20 | B0,01,00,06,C0,D4,01,00,07,00,08,6C,39,00,00,00,24,5E,00,00,01,FC,85,00,00,\ 21 | 02,AC,BC,00,00,03,34,D0,00,00,04,68,6E,01,00,05,08,97,01,00,06,EC,A3,01,00,\ 22 | 07,00,01,68,3C,01,00,00,01,04,3C,41,00,00,00,00,00,50,C3,00,00,00,00,00,70,\ 23 | 11,01,00,01,00,00,18,73,01,00,02,00,00,01,08,00,98,85,00,00,40,B5,00,00,60,\ 24 | EA,00,00,50,C3,00,00,01,80,BB,00,00,60,EA,00,00,94,0B,01,00,50,C3,00,00,02,\ 25 | 78,FF,00,00,40,19,01,00,B4,27,01,00,50,C3,00,00,03,B4,27,01,00,DC,4A,01,00,\ 26 | DC,4A,01,00,50,C3,00,00,04,80,38,01,00,90,5F,01,00,DC,4A,01,00,50,C3,00,00,\ 27 | 05,DC,4A,01,00,00,77,01,00,90,5F,01,00,50,C3,00,00,06,00,77,01,00,00,77,01,\ 28 | 00,90,5F,01,00,50,C3,00,00,07,00,77,01,00,90,91,01,00,00,77,01,00,50,C3,00,\ 29 | 00,01,18,00,00,00,00,00,00,00,0B,E4,12,60,09,60,09,4B,00,0A,00,54,03,90,01,\ 30 | 90,01,90,01,90,01,90,01,90,01,90,01,00,00,00,00,00,02,04,31,07,A5,00,A5,00,\ 31 | A5,00,2C,01,00,00,59,00,69,00,4A,00,4A,00,5F,00,73,00,73,00,64,00,40,00,90,\ 32 | 92,97,60,96,00,90,55,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,02,\ 33 | 02,D4,30,00,00,02,10,60,EA,00,00,02,10 34 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # VegaMining 2 | Script to assist in setting optimal mining settings for Vega 56 or Vega 64 3 | 4 | Attention: The powerplay settings I have set are for Vega 56. Please see vega.miningguides.com to download the powerplay registry file for the 64 and copy it to the VegaPowerPlayTable.txt file. 5 | 6 | How to use it: 7 | 8 | 1: Right click StartVegaSetup.bat and click "Run as Administrator" 9 | 2: Select the option you want to run. The explecations of the options are written below. 10 | 3: The steps should go something like: 11 | 4: Download and extract the files - Option 0 (Read notes on option 0 below.) 12 | 5: Run Display Driver Uninstaller - Option 2 13 | 6: Install AMD drivers 14 | 7: Disable Ulps and Crossfire Detection - Option 3 15 | 8: Import powerplay tables - Option 4 16 | 9: Set overdrive profiles - Option 5 17 | 10: Disable and re-enable the cards - Option 6 18 | 11: Run your mining program - Option 7 19 | 20 | 21 | 22 | 23 | Notes: 24 | As this is my first attempt at this script, some things very well may not work correctly. 25 | 26 | Options: 27 | 28 | 0: Press '0' to download the necessary files. 29 | This option will download and extract the necessary files. It will also open a window for the AMD driver that you will need to manually download and install. 30 | If any of the downloads or extractions fail, open URLs.txt and download the files manually. Extract the zip file into its own folder within the "Tools" folder. If there is no "Tools" folder, you will need to create one. 31 | 1: Press '1' to export your current video registry. 32 | This option will export your current video settings. 33 | 2: Press '2' to run display driver uninstaller. 34 | This option will reboot your computer and should be run before you install the AMD blockchain driver. Install AMD blockchain driver after reboot. 35 | 3: Press '3' to Disable Ulps and DisableCrossFireAutoLink. 36 | This disables specific things about the driver for each card that helps improve hashrates. 37 | 4: Press '4' to import powerplay tables. (Make sure to edit 'VegaPowerPlayTable.txt'. Do not modify ZZzz.) 38 | This imports the powerplay settings from VegaPowerPlayTable.txt into the registry for each card. The TXT file contained is of my own personal settings. You can learn more on how to modify this file for your needs at http://vega.miningguides.com/. 39 | 5: Press '5' to set Overdrive profile for Vegas. 40 | This imports overdrive settings to the Vegas. It currently gives an error that can be ignored. These are also my own personal settings, so visit the vega mining guide to look for tweaks. If your setup is crashing, try modifying Tools\Overdrive*\OverdriveNTool.ini. Adjust Mem_P3=950;900 to Mem_P3=920;900 and then work your way up. 41 | 6: Press '6' to disable and re-enable all Vegas. 42 | This will disable all vegas and re-enable them. This step is required after every reboot, and after UAC prompt pops up. 43 | 7: Press '7' to run cast-xmr. 44 | This will run cast-xmr. It will prompt you for your wallet address and pool url. It will save the info you input into Settings.txt, so modify this file if you want to change the settings going foward. 45 | Q: Press 'Q' to quit. 46 | 47 | 48 | Bitcoin: 13gG5T776ZffEPgm8fShoBUADb1QzLeFmW 49 | Monero: 48186nvTbymXS8J1GZhv1f6mhPxhsr13pLzMMngwRtmcdwZBMjqmYAxHPTqyENTvQK8dhwQSPGP9VdAPSJYYCzt1SYBdNXo 50 | Ethereum: 0x7D8486861ec96FF7C64E590C088D568fb72BE3FE -------------------------------------------------------------------------------- /VegaSetupMenu.ps1: -------------------------------------------------------------------------------- 1 | cd $PSScriptRoot 2 | If (-NOT ([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] "Administrator")) 3 | 4 | { 5 | $arguments = "& '" + $myinvocation.mycommand.definition + "'" 6 | Start-Process powershell -Verb runAs -ArgumentList $arguments 7 | Break 8 | } 9 | function Test-RegistryKeyValue 10 | { 11 | 12 | [CmdletBinding()] 13 | param( 14 | [Parameter(Mandatory=$true)] 15 | [string] 16 | # The path to the registry key where the value should be set. Will be created if it doesn't exist. 17 | $Path, 18 | 19 | [Parameter(Mandatory=$true)] 20 | [string] 21 | # The name of the value being set. 22 | $Name 23 | ) 24 | 25 | if( -not (Test-Path -Path $Path -PathType Container) ) 26 | { 27 | return $false 28 | } 29 | 30 | $properties = Get-ItemProperty -Path $Path 31 | if( -not $properties ) 32 | { 33 | return $false 34 | } 35 | 36 | $member = Get-Member -InputObject $properties -Name $Name 37 | if( $member ) 38 | { 39 | return $true 40 | } 41 | else 42 | { 43 | return $false 44 | } 45 | 46 | } 47 | 48 | function Show-Menu 49 | { 50 | param ( 51 | [string]$Title = 'My Menu' 52 | ) 53 | cls 54 | Write-Host "================ $Title ================" 55 | 56 | Write-Host "0: Press '0' to download the necessary files." 57 | Write-Host "1: Press '1' to export your current video registry." 58 | Write-Host "2: Press '2' to run display driver uninstaller." 59 | Write-Host "3: Press '3' to Disable Ulps and DisableCrossFireAutoLink." 60 | Write-Host "4: Press '4' to import powerplay tables. (Make sure to edit 'VegaPowerPlayTable.txt'. Do not modify ZZzz.)" 61 | Write-Host "5: Press '5' to set Overdrive profile for Vegas." 62 | Write-Host "6: Press '6' to disable and re-enable all Vegas." 63 | Write-Host "7: Press '7' to run cast-xmr." 64 | Write-Host "Q: Press 'Q' to quit." 65 | } 66 | 67 | do 68 | { 69 | Show-Menu 70 | $input = Read-Host "Please make a selection" 71 | switch ($input) 72 | { 73 | '0' { 74 | cls 75 | 'You chose option #0: Download necessary files.' 76 | $confirmation = Read-Host "Are you sure you want to download the files? (Y/N):" 77 | if ($confirmation -eq 'y') { 78 | New-Item -ItemType Directory -Force -Path Downloads 79 | Get-Content downloads.txt | Foreach-Object {Write-Host $_; $filename = $_ -replace '\[','' -replace '\]','' | Split-Path -Leaf; Invoke-WebRequest -Uri "$_" -OutFile "Downloads\$filename"} 80 | 81 | Add-Type -AssemblyName System.IO.Compression.FileSystem 82 | function Unzip 83 | { 84 | param([string]$zipfile, [string]$outpath) 85 | 86 | [System.IO.Compression.ZipFile]::ExtractToDirectory($zipfile, $outpath) 87 | } 88 | 89 | Unzip $PSScriptRoot\Downloads\7za920.zip $PSScriptRoot\Downloads\. 90 | 91 | Downloads\7za.exe x Downloads\*.zip -oTools\* -r -aou 92 | Downloads\7za.exe x Downloads\*.7z -oTools\* -r -aou 93 | 94 | 95 | Downloads\7za.exe x Tools\Guru*\*.exe -oTools\* -r -aou 96 | $webconfirmation = Read-Host "Type Y and hit enter to open the AMD website to download the blockchain drivers." 97 | if ($webconfirmation -eq 'y') { 98 | Start-Process -FilePath "http://support.amd.com/en-us/kb-articles/Pages/Radeon-Software-Crimson-ReLive-Edition-Beta-for-Blockchain-Compute-Release-Notes.aspx" 99 | 100 | Write-host "After download is complete, run the EXE file and install the AMD drivers." 101 | 102 | } 103 | 104 | 105 | 106 | } 107 | } '1' { 108 | cls 109 | 'You chose option #1: Export current video registry settings.' 110 | $confirmation = Read-Host "Are you sure you want to export current video registry settings? (Y/N):" 111 | if ($confirmation -eq 'y') { 112 | $filename = "VideoRegistryBackup$(Get-Date -UFormat "%m-%d-%Y %I-%M-%S").reg" 113 | New-Item -ItemType Directory -Force -Path RegFiles 114 | $regexport = Reg export "HKLM\SYSTEM\ControlSet001\Control\Class\{4d36e968-e325-11ce-bfc1-08002be10318}" $PSScriptRoot\regfiles\$filename 115 | if ($regexport -like 'The operation completed successfully.') 116 | { 117 | "Your file has been saved as $filename" 118 | } 119 | else 120 | { 121 | "The registry backup failed. Error message is: $regexport" 122 | } 123 | } 124 | } '2' { 125 | cls 126 | "You chose option #2: Run display driver uninstaller." 127 | 128 | $confirmation = Read-Host "Are you sure you want to run display driver uninstaller? (Y/N):" 129 | if ($confirmation -eq 'y') { 130 | cd Tools\DDU* 131 | cmd.exe /c “Display Driver Uninstaller.exe" -silent -restart -cleanamd 132 | } 133 | 134 | } '3' { 135 | cls 136 | 'You chose option #3: Disable Ulps and DisableCrossFireAutoLink' 137 | $confirmation = Read-Host "Are you Sure You Want To Disable Ulps and DisableCrossFireAutoLink? (Y/N):" 138 | if ($confirmation -eq 'y') { 139 | $videocards = Get-ChildItem "hklm:\SYSTEM\ControlSet001\Control\Class\{4d36e968-e325-11ce-bfc1-08002be10318}" -ErrorAction Ignore | select -ExpandProperty Name 140 | $registrychanges = 0 141 | Foreach ($videocard in $videocards) { 142 | $cardnumber = "" 143 | $cardnumber = ($videocard -split "{4d36e968-e325-11ce-bfc1-08002be10318}")[1] 144 | $cardpath = "" 145 | $cardpath = Test-RegistryKeyValue -Path "hklm:\SYSTEM\ControlSet001\Control\Class\{4d36e968-e325-11ce-bfc1-08002be10318}$cardnumber" -Name 'EnableUlps' 146 | 147 | if ($cardpath -eq 'True') { Set-ItemProperty -Path "hklm:\SYSTEM\ControlSet001\Control\Class\{4d36e968-e325-11ce-bfc1-08002be10318}$cardnumber" -Name EnableUlps -Value 0; 148 | Set-ItemProperty -Path "hklm:\SYSTEM\ControlSet001\Control\Class\{4d36e968-e325-11ce-bfc1-08002be10318}$cardnumber" -Name EnableCrossFireAutoLink -Value 0 149 | $registrychanges++ 150 | } ; 151 | } 152 | "$registrychanges cards' registry settings were modified." 153 | } 154 | 155 | 156 | 157 | } '4' { 158 | cls 159 | 'You chose option #4: Import powerplay tables. (Make sure to edit "VegaPowerPlayTable.txt". Do not modify ZZzz.)' 160 | $confirmation = Read-Host "Are you sure you want to import powerplay tables from 'VegaPowerPlayTable.txt? (Y/N):" 161 | if ($confirmation -eq 'y') { 162 | New-Item -ItemType Directory -Force -Path RegFiles 163 | $powerplaytable = (Get-Content $PSScriptRoot\VegaPowerPlayTable.txt ) 164 | $videocards = Get-ChildItem "hklm:\SYSTEM\ControlSet001\Control\Class\{4d36e968-e325-11ce-bfc1-08002be10318}" -ErrorAction Ignore | select -ExpandProperty Name 165 | $registrychanges = 0 166 | Foreach ($videocard in $videocards) { 167 | $cardnumber = "" 168 | $cardnumber = ($videocard -split "{4d36e968-e325-11ce-bfc1-08002be10318}")[1] 169 | $cardpath = "" 170 | $cardpath = Test-RegistryKeyValue -Path "hklm:\SYSTEM\ControlSet001\Control\Class\{4d36e968-e325-11ce-bfc1-08002be10318}$cardnumber" -Name 'EnableUlps' 171 | 172 | if ($cardpath -eq 'True') { $powerplaytable.Replace('ZZzz',$cardnumber) | Out-File $PSScriptRoot\regfiles\$cardnumber.reg 173 | regedit /s $PSScriptRoot\regfiles\$cardnumber.reg 174 | $registrychanges++ 175 | } ; 176 | } 177 | "$registrychanges cards' registry settings were modified." 178 | } 179 | 180 | 181 | 182 | } '5' { 183 | cls 184 | 'You chose option #5: Set Overdrive profile for Vegas.' 185 | 186 | cd $PSScriptRoot\tools\overdrive* 187 | cp ..\..\overdriventool.ini .\ 188 | $overdriveini = (Get-Content OverdriveNTool.ini) 189 | $overdriveprofiles = (Get-Content OverdriveNTool.ini | Where-Object { $_.Contains("Name=") } | foreach {$_ -replace 'Name=', ''}) 190 | 191 | 192 | 193 | 194 | $menu = @{} 195 | for ($i=1;$i -le $overdriveprofiles.count; $i++) 196 | { Write-Host "$i. $($overdriveprofiles[$i-1])" 197 | $menu.Add($i,($overdriveprofiles[$i-1]))} 198 | [int]$ans = Read-Host 'Enter selection' 199 | $selection = $menu.Item($ans) ; 200 | 201 | 202 | $pattern = "Name=$selection(.*?)\[Profile_" 203 | $string = Get-Content OverdriveNTool.ini 204 | $selectionsettings = [regex]::match($string, $pattern).Groups[1].Value 205 | $selectionsettings = $selectionsettings -replace ' ',"`r`n" 206 | $selectionsettings 207 | if ($selectionsettings -eq '') { 208 | $pattern = "Name=$selection(.*)" 209 | $string = Get-Content OverdriveNTool.ini 210 | $selectionsettings = [regex]::match($string, $pattern).Groups[1].Value 211 | $selectionsettings = $selectionsettings -replace ' ',"`r`n" 212 | $selectionsettings 213 | } 214 | $confirmation = Read-Host "Are you sure you want to Set Overdrive profile $selection for all Vegas? (Y/N):" 215 | 216 | 217 | 218 | if ($confirmation -eq 'y') { 219 | $cmd = '' 220 | $videocards = Get-WmiObject Win32_VideoController | select -ExpandProperty Name 221 | $count = $videocards | measure 222 | 223 | $cardchanges = 0 224 | For ($i=0; $i -le $count.Count; $i++) { 225 | 226 | if ($videocards[$i] -eq 'Radeon RX Vega') { $cardchanges++; $cmd = $cmd + ' -r' + $i + ' -p' + $i + $selection;} ; 227 | } 228 | $cmd 229 | $cmd = "OverdriveNTool.exe $cmd" 230 | 231 | cmd.exe /c $cmd 232 | "$cardchanges cards' settings were modified to the profile $selection" 233 | } 234 | 235 | 236 | 237 | 238 | } '6' { 239 | cls 240 | "You chose option #6: Disable and re-enable all Vegas." 241 | 242 | $confirmation = Read-Host "Are you sure you want to disable and re-enable all Vegas? (Y/N):" 243 | if ($confirmation -eq 'y') { 244 | cd $PSScriptRoot\tools\devman* 245 | $cmd1 = 'DevManView.exe /disable "PCI\VEN_1002&DEV_687F&*" /use_wildcard' 246 | $cmd2 = 'TIMEOUT 5' 247 | $cmd3 = 'DevManView.exe /enable "PCI\VEN_1002&DEV_687F&*" /use_wildcard' 248 | $cmd1 249 | $cmd2 250 | $cmd3 251 | cmd.exe /c $cmd1 252 | cmd.exe /c $cmd2 253 | cmd.exe /c $cmd3 254 | } 255 | 256 | } '7' { 257 | cls 258 | "You chose option #7: Run cast-xmr." 259 | 260 | $confirmation = Read-Host "Are you sure you want to run cast-xmr? (Y/N):" 261 | if ($confirmation -eq 'y') { 262 | cd $PSScriptRoot\tools\cast* 263 | $cardlist = "" 264 | $videocards = Get-ChildItem "hklm:\SYSTEM\ControlSet001\Control\Class\{4d36e968-e325-11ce-bfc1-08002be10318}" -ErrorAction Ignore | select -ExpandProperty Name 265 | $cardlistarray = @() 266 | $cardindex = 0 267 | $cardindexarray = @() 268 | Foreach ($videocard in $videocards) { 269 | $cardnumber = "" 270 | $cardnumber = ($videocard -split '{4d36e968-e325-11ce-bfc1-08002be10318}\\')[1] 271 | $cardpath = "" 272 | $cardpath = Test-RegistryKeyValue -Path "hklm:\SYSTEM\ControlSet001\Control\Class\{4d36e968-e325-11ce-bfc1-08002be10318}\$cardnumber" -Name 'EnableUlps' 273 | 274 | if ($cardpath -eq 'True') { $cardlistarray += ,$cardnumber; $cardindexarray += ,$cardindex; $cardindex++ 275 | } ; 276 | } 277 | $ofs = ',' 278 | $cardlist = "$cardlistarray" 279 | $cardindexes = "$cardindexarray" 280 | 281 | 282 | Get-Content ..\..\castxmr_settings.txt | foreach { 283 | if($_ -match "wallet:") {$wallet = ($_ -split "wallet:")[1]} 284 | if($_ -match "pooladdress:") {$pooladdress = ($_ -split "pooladdress:")[1]} 285 | if($_ -match "poolpassword:") {$poolpassword = ($_ -split "poolpassword:")[1]} 286 | } 287 | $xmrcastcommand = "cast_xmr-vega -G $cardindexes -S $pooladdress -u $wallet -p $poolpassword %*" 288 | write-host $xmrcastcommand 289 | cmd.exe /c $xmrcastcommand 290 | 291 | } 292 | 293 | } 294 | 295 | 296 | 'q' { 297 | return 298 | } 299 | } 300 | pause 301 | } 302 | until ($input -eq 'q') --------------------------------------------------------------------------------