Post
Topic
Board Mining (Altcoins)
Re: PhoenixMiner 5.3b: fastest Ethereum/Ethash miner with lowest devfee (Win/Linux)
by
Dowper_
on 03/12/2020, 11:39:03 UTC
When trying to start the .bat file as admin I get this error:


Code:
C:\WINDOWS\system32>REM

C:\WINDOWS\system32>setx GPU_FORCE_64BIT_PTR 0

SUCCESS: Specified value was saved.

C:\WINDOWS\system32>setx GPU_MAX_HEAP_SIZE 100

SUCCESS: Specified value was saved.

C:\WINDOWS\system32>setx GPU_USE_SYNC_OBJECTS 1

SUCCESS: Specified value was saved.

C:\WINDOWS\system32>setx GPU_MAX_ALLOC_PERCENT 100

SUCCESS: Specified value was saved.

C:\WINDOWS\system32>setx GPU_SINGLE_ALLOC_PERCENT 100

SUCCESS: Specified value was saved.

C:\WINDOWS\system32>REM IMPORTANT: Replace the ETH address with your own ETH wallet address in the -wal option (Rig001 is the name of the rig)

C:\WINDOWS\system32>PhoenixMiner.exe -pool ssl://eu1.ethermine.org:5555 -wal zzzzzzzz.zzzzzzzz
'PhoenixMiner.exe' is not recognized as an internal or external command,
operable program or batch file.

C:\WINDOWS\system32>pause
Press any key to continue . . .

What gives? The .bat is in the same directory as the exe file, and obviously not in system32, how can I fix this? The very same thing happens with any miner I try to run as admin.

Add this below on the beggining of the bat file:



@echo off

:: BatchGotAdmin
:-------------------------------------
REM  --> Check for permissions
    IF "%PROCESSOR_ARCHITECTURE%" EQU "amd64" (
>nul 2>&1 "%SYSTEMROOT%\SysWOW64\cacls.exe" "%SYSTEMROOT%\SysWOW64\config\system"
) ELSE (
>nul 2>&1 "%SYSTEMROOT%\system32\cacls.exe" "%SYSTEMROOT%\system32\config\system"
)

REM --> If error flag set, we do not have admin.
if '%errorlevel%' NEQ '0' (
    echo Requesting administrative privileges...
    goto UACPrompt
) else ( goto gotAdmin )

:UACPrompt
    echo Set UAC = CreateObject^("Shell.Application"^) > "%temp%\getadmin.vbs"
    set params= %*
    echo UAC.ShellExecute "cmd.exe", "/c ""%~s0"" %params:"=""%", "", "runas", 1 >> "%temp%\getadmin.vbs"

    "%temp%\getadmin.vbs"
    del "%temp%\getadmin.vbs"
    exit /B

:gotAdmin
    pushd "%CD%"
    CD /D "%~dp0"
:--------------------------------------