Skip to content
Snippets Groups Projects
Select Git revision
  • 928e3a49cec3b8a2eb6fd120840e236bbcad6212
  • master default protected
  • csv_export
  • ndex
  • v1.1.18-rc2
  • v1.1.17
  • v1.1.16
  • v1.1.16-rc12
  • v1.1.16-rc11
  • v1.1.16-rc10
  • v1.1.16-rc9
  • v1.1.16-rc8
  • v1.1.16-rc7
  • v1.1.16-rc4
  • v1.1.16-rc3
  • v1.1.16-rc1
  • v1.1.6-rc1
  • v1.1.15
  • v1.1.15-rc7
  • v1.1.15-rc6
  • v1.1.15-rc3
  • v1.1.15-rc1
  • v1.1.14
  • v1.1.13
24 results

toast.component.html

Blame
  • Code owners
    Assign users and groups as approvers for specific file changes. Learn more.
    Fix printer installation error 0x00000bcb.cmd 1.49 KiB
    @echo off
    REM Ensure Admin rights
    setlocal DisableDelayedExpansion
    set "batchPath=%~0"
    for %%k in (%0) do set batchName=%%~nk
    set "vbsGetPrivileges=%temp%\OEgetPriv_%batchName%.vbs"
    setlocal EnableDelayedExpansion
    net file 1>nul 2>nul
    if '%errorlevel%' == '0' (goto gotPrivileges) else (goto getPrivileges)
    
    :getPrivileges
    if '%1'=='ELEV' (echo ELEV & shift /1 & goto gotPrivileges)
    REM If you have non-ASCII chars in your path you'll need to set the codepage appropriate to your locale:
    REM chcp 1252
    REM (ANSI-Latin1 - Western European, e.g. German)
    cls
    echo Set UAC = CreateObject^("Shell.Application"^) > "%vbsGetPrivileges%"
    echo args = "ELEV " >> "%vbsGetPrivileges%"
    echo For Each strArg in WScript.Arguments >> "%vbsGetPrivileges%"
    echo args = args ^& strArg ^& " " >> "%vbsGetPrivileges%"
    echo Next >> "%vbsGetPrivileges%"
    echo UAC.ShellExecute "!batchPath!", args, "", "runas", 1 >> "%vbsGetPrivileges%"
    "%SystemRoot%\System32\WScript.exe" "%vbsGetPrivileges%" %*
    exit
    
    :gotPrivileges
    if '%1'=='ELEV' (del "%vbsGetPrivileges%" 1>nul 2>nul & shift /1)
    
    
    REM Functional part
    echo Adding temporary registry hack. . .
    reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows NT\Printers\PointAndPrint" /v "RestrictDriverInstallationToAdministrators" /t REG_DWORD /d 0 /f
    echo.
    echo Add your printer the usual way now.
    pause
    echo.
    echo Removing registry hack again. . .
    reg delete "HKLM\SOFTWARE\Policies\Microsoft\Windows NT\Printers\PointAndPrint" /v "RestrictDriverInstallationToAdministrators" /f
    echo Done.
    pause
    exit