Windows ERROR when I run "C:\Windows\System32\tsdiscon.exe" from XBMC

  Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
theColonel26 Offline
Junior Member
Posts: 22
Joined: Oct 2011
Reputation: 0
Post: #1
"C:\Windows\System32\tsdiscon.exe"
I want to run this command from the main menu. I already have the skin modded to do this, the problem is that when I click on the menu item and run it i get an error saying windows can't find it. This makes no sense at all to me since I can run the exact same command from a console windows (cmd.exe) and it runs find. I can run it from a batch and it runs fine. the problem seems to have to do with XBMC.

The reason I want to do this is because I run XBMC as the shell for one of my user accounts on the computer and I want a way to easily switch users. tsdiscon.exe disconnects the session which leaves the user log in but send you back to the switch user screen.

I have tried the following
Code:
<onclick>System.Exec(""C:\Windows\System32\tsdiscon.exe"")</onclick>
<onclick>System.Exec("C:\Windows\System32\tsdiscon.exe")</onclick>
<onclick>System.Exec(""D:\Program Files\tsdiscon.bat"")</onclick>

tsdiscon.bat contains
Code:
START "Switch User" "C:\Windows\System32\tsdiscon.exe"
(This post was last modified: 2012-10-24 17:28 by davilla.)
find quote
theColonel26 Offline
Junior Member
Posts: 22
Joined: Oct 2011
Reputation: 0
Post: #2
*Bump*
find quote
artrafael Offline
Team-XBMC Forum Moderator
Posts: 4,424
Joined: Jul 2010
Reputation: 78
Location: USA
Post: #3
How about:
Code:
<onclick>System.Exec(C:\Windows\System32\tsdiscon.exe)</onclick>
find quote
Montellese Online
Team-XBMC Developer
Posts: 2,789
Joined: Jan 2009
Reputation: 20
Location: Switzerland
Post: #4
Try escaping the backspaces in the path with a backspace i.e.
Code:
C:\\Windows\\System32\\tsdiscon.exe

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.

[Image: badge.gif]
find quote
theColonel26 Offline
Junior Member
Posts: 22
Joined: Oct 2011
Reputation: 0
Post: #5
Thanks guys, I tried both of your suggestions but they didn't work. I finally figured it out. It must have been a permission problem. I tried lunching notepad which is in the same directory and that worked fine. So then I gave read & execute permission to the user account for XBMC on tsdiscon.exe and it worked. I do most of my testing in a different user account, when I tested it in the XBMC account I must have already been elevated, so it worked form the console, but not XBMC.
(This post was last modified: 2012-08-20 00:32 by theColonel26.)
find quote
binBD Offline
Senior Member
Posts: 199
Joined: May 2011
Reputation: 3
Location: illinois
Post: #6
xbmc is not going to pick up the back slash when specifying a directory, use the foward slash instead of

<onclick>System.Exec(""D:\Program Files\tsdiscon.bat"")</onclick>
use
<onclick>System.Exec(""D:/Program Files/tsdiscon.bat"")</onclick>
worked for me
find quote