I have done this in the past for various scripts. Basically you check to see if the session is rdp and if it is, then bypass parts of your script.
Here is an example, I am sure there are others out there, probably more elegant than mine.
IF "A%clientname%A" == "AA" goto normal_login
goto end
:normal_login
cscript \\server\path-to-script-here
:end
On a workstation the "Clientname" environment variable is set to Console. Same for a rdp /console session.
Let me know how that works.