I need to run a program called Kodi in windows server 2012 from another machine, The startkodi.bat itself works correctly in the win server machine

C:\PSTools\psexec -u Administrator -p 123456 \\ -s -d cmd.exe /c "C:\startkodi.bat"

But when i run this it only gives me

Starting PSEXESVC service on
cmd.exe started on with process ID 4460.

But when i remote it i dont see any instance of Kodi running,

BUT it does open a Kodi process in task manager...


instead of using "cmd.exe /c" ... use explorer.exe "C:\startkodi.bat"

and depending on what is inside the batch file ... you may be a able to do away with the bat ..

Simple example .. if you have 7zip installed in a default location ... open a command prompt and try:

\PSTools\psexec -u Administrator -p 123456 \\ -s -d explorer.exe C:\Program Files\7-Zip\7zFM.exe

The problem may be the nature of the bat file, and what files are called inside the bat. If you have an exe inside the bat .. try calling that EXE after the "explorer.exe" in the above example.

| improve this answer | |
  • tried that but it says explorer.exe started on with process ID 4556. running this C:\PSTools\psexec -u Administrator -p 123456 \\ -s -d "C:\Program Files (x86)\Kodi\Kodi.exe" gives me C:\Program Files (x86)\Kodi\Kodi.exe started on with process ID 2516. but it's only process again.. not GUI – denywinarto Aug 24 '16 at 10:10

Finally found a solution, it's because of Session 0 isolation.. Adding 2 after -i fixed it..

C:\PSTools\psexec -i 2 -d -u Administrator -p password \\serverip "C:\Program Files (x86)\Kodi\Kodi.exe"
| improve this answer | |
  • Wait a sec... This command only works if i open remote desktop connection to that server.. Is there anyway to make it work without rdesktop? – denywinarto Sep 3 '16 at 10:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.