Hey baijuxavior,
I heavily using remote desktop to manage my HTPC but would like to use XBMC as shell replacement at the same time.
But in a remote session I would like to use my PC 'normal' and not XBMC.
The shell replacement setting is a global setting thus its very annoying to wait for XBMC to start and shutdown and manually start explorer after every logon.
I modified your script so that XBMC won't launch if connected via RDP and explorer starts automatic.
If anyone else likes this feature here are my changes:
Code:
; line 264 right after the "launch applications" comment
; if running in a remote session don't start XBMC
SysGet RemoteSession, 0x1000 ; SM_REMOTESESSION
If (GetSettings("DontRunXBMCOnRDP", 0) = 1 and RemoteSession <> 0)
{
Run, %A_WinDir%\Explorer.exe, %A_WinDir%
}
Else If (StartAtWinLogon = 1)
{
; ...
Someone stated on
MSDN that SM_REMOTESESSION is not reliable. But in my (limited) tests it worked just fine.
I also found a possible bug in your script. If you run the installer as User A it creates a ini file in the A's appdata. But if you're using a different User B to run XBMC (like me) the script fails to save settings in the ini file because in B's appdata the XBMCLauncher folder was never created. One way to fix the bug is by adding a "EnsureDirExist" call right before every IniWrite call.
I actually done that work already, so if you like to get my changes I could send them via pm to you.
Thank you for this very useful tool!