This works for MS RDP connections (mstsc.exe):
https://learn.microsoft.com/de-de/windows/win32/setupapi/run-and-runonce-registry-keys
HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Run
%appdata%\microsoft\windows\start menu\programs\startup
Or try this (haven't tested on RDP, works on standard login though):
HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon
"Shell" value -> "wscript mystartup.vbs"
and then inside the VBScript:
https://dynwrapx.script-coding.com/dwx/pages/dynwrapx.php?lang=en
set StdRegProv = GetObject("winmgmts:\\.\root\cimv2:StdRegProv")
set activex = wscript.createobject("DynamicWrapperX")
set activex2 = CreateObject("shell.application")
activex.register "user32", "FindWindowW", "i=ww", "r=h"
activex.register "kernelbase", "RegCreateKeyExW", "i=hwuwuuppp"
phkResult = activex.StrPtr("phkResult")
StdRegProv.EnumKey &H80000001, "Software\Microsoft\Windows\CurrentVersion\Explorer\SessionInfo", sKeys
activex.RegCreateKeyExW &H80000001, "Software\Microsoft\Windows\CurrentVersion\Explorer\SessionInfo" & sKeys(0) & "\RunStuffHasBeenRun", 0, 0, 1, 0, 0, phkResult, 0
activex.RegCreateKeyExW &H80000001, "Software\Microsoft\Windows\CurrentVersion\Explorer\SessionInfo" & sKeys(0) & "\StartupHasBeenRun", 0, 0, 1, 0, 0, phkResult, 0
activex.RegCreateKeyExW &H80000001, "Software\Microsoft\Windows\CurrentVersion\Explorer\SessionInfo" & sKeys(0) & "\LogonSoundHasBeenPlayed", 0, 0, 1, 0, 0, phkResult, 0
activex2.shellexecute "explorer"
' ############################################################################# check if already run
set cimv2 = getobject("winmgmts:")
set wmi = cimv2.execquery("select Name from Win32_Process where Name = 'XXX'") ' XXX -> some app you are launching below, if already started, quit
if wmi.count then
wscript.quit
end if
' ############################################################################# wait for explorer
do
wscript.sleep(500)
hwnd = activex.FindWindowW("Shell_TrayWnd", 0)
loop until hwnd > 0
' ############################################################################# launch your apps
' activex2.shellexecute whatever.exe