Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OpenGL2: Slicer crashes on start when started through Windows Remote Desktop #4252

Closed
slicerbot opened this issue Mar 13, 2020 · 1 comment
Closed

Comments

@slicerbot
Copy link
Collaborator

This issue was created automatically from an original Mantis Issue. Further discussion may take place here.

@lassoan
Copy link
Contributor

lassoan commented Aug 8, 2020

For reference, content of start.bat (not available in attachment in the old bugtracker anymore):

@echo off

REM This batch file can be used to start Slicer through Remote Desktop.
REM It stops current remote desktop session and starts Slicer.
REM User has to connect through remote desktop, start this batch file,
REM then connect through remote desktop again.

REM Make sure the batch file is started in admin mode, if not then switches to that
REM (required for tscon command).
:: BatchGotAdmin
::-------------------------------------
REM  --> Check for permissions
>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"
::--------------------------------------

REM Kill remote desktop session before starting Slicer
tscon 1 /dest:console

REM Start Slicer (user has to reconnect to use Slicer)
Slicer.exe

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants