Sunday, May 17, 2009

run matlab at remote desktop

tested with matlab 7.1
batch:

@echo off
REM Allows MATLAB 7 to run when launched from a Remote Desktop connection, by
REM temporarily setting MATLAB.exe to Windows NT application compatiblity mode.

setlocal
set MATLAB=C:\Program Files\MATLAB71\bin\win32\MATLAB.exe
set REGKEY=HKCU\Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers


reg add "%REGKEY%" /f /v "%MATLAB%" /t REG_SZ /d NT4SP5 > nul
start "" "%MATLAB%"
reg delete "%REGKEY%" /f /v "%MATLAB%" > nul

0 comments: