Solved

launch tsadmin.msc windows 7 visual basic .net

Posted on 2013-07-01
9
1,508 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 500 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
Stressed Out?

Watch some penguins on the livecam!

 

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

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!

Question has a verified solution.

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

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…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
In this video, viewers will be given step by step instructions on adjusting mouse, pointer and cursor visibility in Microsoft Windows 10. The video seeks to educate those who are struggling with the new Windows 10 Graphical User Interface. Change Cu…
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…

734 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