Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

launch tsadmin.msc windows 7 visual basic .net

Posted on 2013-07-01
9
Medium Priority
?
1,575 Views
Last Modified: 2013-07-02
I used this for XP
  Dim tsadminProcess As New ProcessStartInfo("tsadmin")   'setup tsadmin
        Process.Start(tsadminProcess)   'launch tsadmin

I can't get this to work for Windows 7.  For Windows 7 you need to call tsadmin.msc and it runs fine from the command line.  I can't get it to launch from vb using

  Dim tsadminProcess As New ProcessStartInfo("c:\windows\system32\tsadmin.msc")   'setup tsadmin
        Process.Start(tsadminProcess)   'launch tsadmin
0
Comment
Question by:chadmanvb
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 4
9 Comments
 
LVL 20

Accepted Solution

by:
TheAvenger earned 2000 total points
ID: 39291380
This works with VB.net and Windows 8:

Process.Start("compmgmt.msc")

However tsadmin.msc is not found on Windows 8 (and I suppose Windows 7). But you can use this:

Process.Start("mstsc.exe")

It runs Remote Desktop and I suppose that's what you want
0
 

Author Comment

by:chadmanvb
ID: 39292906
I'm looking to just start remote desktops services manager.  If I enter "c:\windows\system32\tsadmin.msc" at the command line it starts.  I does prompt me that it needs to be run as an admin.  I just wonder why it does not start from within vb.net.
0
 
LVL 20

Expert Comment

by:TheAvenger
ID: 39292990
Do you get an error message?
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:chadmanvb
ID: 39293048
An unhandled exception of type 'System.ComponentModel.Win32Exception' occurred in System.dll
Additional information: The system cannot find the file specified
The thread '<Thread Ended>' (0x1dac) has exited with code 0 (0x0).
0
 
LVL 20

Expert Comment

by:TheAvenger
ID: 39293066
Can you try this one and see if it works:

Process.Start("compmgmt.msc")
0
 

Author Comment

by:chadmanvb
ID: 39293108
That does work.  Not sure when tsadmin.msc does not work since it works fine from the commandline
0
 

Author Comment

by:chadmanvb
ID: 39293123
Ok, I got it working.

  '**************KILL CONNECTION BUTTON********************
        Dim tsadminProcess As New ProcessStartInfo("mmc.exe")   'setup tsadmin
        tsadminProcess.Arguments = "tsadmin.msc"
        Process.Start(tsadminProcess)   'launch tsadmin

Looks like I had to call mmc.exe and givve the arguments of tsadmin.msc
0
 
LVL 20

Expert Comment

by:TheAvenger
ID: 39293139
Good that you could solve it
0
 

Author Closing Comment

by:chadmanvb
ID: 39293145
Thanks for the help!  Got it working

Dim tsadminProcess As New ProcessStartInfo("mmc.exe")
tsadminProcess.Arguments = "tsadmin.msc"
Process.Start(tsadminProcess)
0

Featured Post

Veeam Task Manager for Hyper-V

Task Manager for Hyper-V provides critical information that allows you to monitor Hyper-V performance by displaying real-time views of CPU and memory at the individual VM-level, so you can quickly identify which VMs are using host resources.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This document covers how to connect to SQL Server and browse its contents.  It is meant for those new to Visual Studio and/or working with Microsoft SQL Server.  It is not a guide to building SQL Server database connections in your code.  This is mo…
A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …

721 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question