Creating bat File

darksupernova

Member
Member
Messages
36
Hello users!

I am using the following code in a .bat file to end remote desktop connection upon running the file:

Code:
@%windir%\System32\tscon.exe 0 /dest:console
@%windir%\System32\tscon.exe 1 /dest:console 
@%windir%\System32\tscon.exe 2 /dest:console 
@%windir%\System32\tscon.exe 2 /dest:console 
@%windir%\System32\tscon.exe 3 /dest:console 
@%windir%\System32\tscon.exe 4 /dest:console 
@%windir%\System32\tscon.exe 5 /dest:console

However when I run this, the server computer comes up with an error saying that remote desktop connection was interupted. How can I cut the session off without getting the error message?
 

My Computer

System One

  • OS
    Windows 8 Pro
    Computer type
    PC/Desktop
    System Manufacturer/Model
    Custom Build
    CPU
    Intel Core i7 860 @ 3.6GHz
    Motherboard
    Asus P7P55-M
    Memory
    Crucial 8GB (2x4GB) DDR3 1866Mhz
    Graphics Card(s)
    ATI Radeon R9 220 Series
    Sound Card
    Creative Sound Blaster HS-1100 Arena USB Surround Sound Head
    Monitor(s) Displays
    Asus 3D 23" VG236H 120Hz
    Screen Resolution
    1080p
    Hard Drives
    120GB OCZ Agility 3 SATA3 + 2.5TB Total SATA2
    PSU
    Antec TruePower 650W Modular PSU
    Case
    Antec P183 Noise Reducing case
    Cooling
    4x120mm Antec 3-speed fans + Arctic Cooling Freezer7 CPU fan
    Keyboard
    G15 (orange backlight)
    Mouse
    Logitech G9
    Internet Speed
    80Mb/s BT Infinity
    Other Info
    Steel Series Metal mouse matt
I use this as well, but when running on a Windows 8 PC, I get an error about ACCESS IS DENIED.

Is there a solution ??

Works fine on Windows 7 PCs.

EDIT: Just realised that running the .bat file via "Run as Administrator" works.

Is there a way to run via my own account, which is in Administrator group.
 

My Computer

System One

  • OS
    Windows 8
    Computer type
    PC/Desktop
    System Manufacturer/Model
    Dell
    CPU
    i5
    Motherboard
    Dell
    Memory
    8GB
    Graphics Card(s)
    Nvidia
I know nothing about remote desktop connections... but I am curious as to why there are two seemingly identical rows with parameter 2. Is there something about "2" that needs to be done twice?
 

My Computer

System One

  • OS
    Windows 8.1, 10
Back
Top