473,802 Members | 2,017 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Setting Terminal Services settings using ASP.NET (or... calling Server-side vbscript from ASP.NET)

I need to be able to change the Terminal Services attributes.

Using vbscript on Server 2003 this is easy enough, as described at

http://www.microsoft.com/technet/scr...s/default.mspx

for example.

I want to be able to write a web interface to do this, to make it
easier for those who will be setting these settings, and to log
changes, control access etc. However, doing the same simple task in
..Net languages (C# VB.NET etc) is proving damn near impossible. After
wrapping a Win32 API, I find I can now alter string type settings in
C#, such as TerminalService sProfilePath, but not DWORD settings such
as MaxDisconnectio nTime, which is the one I really want to be able to
change via a web interface.

As it's easy enough in vbscript, I'm wondering if there is any way I
can call a server-side vbscript plus parameters from within an ASP.NET
page?

Thanks,
Roger
Nov 19 '05 #1
2 1472
Some of the interop stuff can get really messy. You could use the
System.Diagnost ics.Process class to spin off a vbs script.

--
Scott
On 13 Apr 2005 10:02:27 -0700, sp*********@yah oo.com (Roja Doja)
wrote:
I need to be able to change the Terminal Services attributes.

Using vbscript on Server 2003 this is easy enough, as described at

http://www.microsoft.com/technet/scr...s/default.mspx

for example.

I want to be able to write a web interface to do this, to make it
easier for those who will be setting these settings, and to log
changes, control access etc. However, doing the same simple task in
.Net languages (C# VB.NET etc) is proving damn near impossible. After
wrapping a Win32 API, I find I can now alter string type settings in
C#, such as TerminalService sProfilePath, but not DWORD settings such
as MaxDisconnectio nTime, which is the one I really want to be able to
change via a web interface.

As it's easy enough in vbscript, I'm wondering if there is any way I
can call a server-side vbscript plus parameters from within an ASP.NET
page?

Thanks,
Roger


Nov 19 '05 #2
Of course, yes, thanks v.much. I'd even used
System.Diagnost ics.Process before in an application, somehow I always
think of webserver code as different...

Anyway, just in case it's helpful, here's my working code (I don't
clainm anything, other than it works for me...) I could only get it
to work by calling cscript first, and I could only call cscript if I
set the working directory to C:\Windows\Syst em32\ to find cscript,
rather than use the directory of the script.

Process myProcess = new Process();
myProcess.Start Info.WorkingDir ectory = @"C:\Windows\Sy stem32\";
myProcess.Start Info.FileName=@ "cscript";
myProcess.Start Info.UseShellEx ecute=false;
myProcess.Start Info.RedirectSt andardOutput = true;
myProcess.Start Info.Arguments= @"/b
W:\Virtual\webd ir\bin\myscript .vbs";
myProcess.Start ();
string result = myProcess.Stand ardOutput.ReadT oEnd();

Cheers,
Roger
Nov 19 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
2299
by: Sara_S | last post by:
I am ready to move my ASP web site onto a remote host. The problem is that when I use Terminal Services to see the host machine, the error does not show up. (I was told that debugging info is only sent to the 'console' session, no others). And the whole thing locks up when there is a server error. How can I see the server errors through Terminal Services? Thanks, Sara
3
5581
by: Josh Schmidt | last post by:
How can one set the terminal services profile and home directory path in AD using VB.NET? I can set the usual profile paths, but terminal services properties are not supported with ADSI. Any help is greatly appreciated! Josh
0
2401
by: Jindrich Prchal | last post by:
Hi there. We are running DB2 v7.2 for Win NT on Windows 2000 SP3 machine with poor configuration AMD 1800+, 512MB RAM and usual IDE harddisk. During tests of migration our batch programmes written in Visual Age Generator by IBM from OS390 to Win2000 was this machine our test machine and migrated programmes ran quick enough there. Batch programmes are generated into C++ code from VaGen 3.1, compiled by MSVC++ and run on the machine with...
5
7582
by: TPoise! | last post by:
Using: .NET 1.1, Visual Studio 2003, C#, Microsoft Windows 2000 Server (SP4 and all latest windows updates), Terminal Server running in application mode. I have a C# application that I've deployed to our terminal server for remote users to use. However, normal users (simple domain users) can not run the application. After double clicking on the icon, an hourglass appears as if its loading then it goes back to the normal cursor. ...
0
1218
by: Brian Young | last post by:
My department is responsible for creating custom internal applications for many of our departments. Our strategy has always been to develop our applications as ActiveX controls (VB6) that get hosted in Internet Explorer. I've been tasked with coming up with a strategy for our migration to using VB.Net. So far, I've experienced a number of items that caused us a few stalls, but mostly was able to resolve them after some thinking and...
0
1704
by: Ven | last post by:
Hi, Pardon me if I am posting in the wrong group. We have a .Net web application where users register. On registration, we want to create user in AD and set different properties. We are using C# code. We are unable to set terminal services profile properties while we could set other properties. We then tried using a command line command by invoking a batch program. This worked well in the development area where the AD Server and Web...
3
3156
by: tommcd24 | last post by:
I have an in-house VB.NET 2.0 application that uses Crystal Reports for ..NET 2005 - CR10?). A few users access the program via a Wyse dumb-terminal via Citrix. For some reason that I've not been able to trace, these users are not able to view any of the reports. The same is also true if I attempt to view the reports while running the program over a Remote Desktop/Terminal Services connection. The exception noted is...
16
4001
by: =?Utf-8?B?RHdlZWJlcmVsbGE=?= | last post by:
I created an Access 2007 application for my customer. The application is shared by three employees on a server. It maintains a contact list including financial data and social security numbers. Only the office manager generates reports in Access from this client data. Now they want to share this Access application with employees at a remote office. They expect to have a maximum of 30 employees editing the client list in both the...
2
3081
by: mcfly1204 | last post by:
Our network consists of two Win2k Server DC's, with several other Win2k3 servers. I cannot find where I can configure terminal services access within the GPO for the user in question. In Win2k3 server, it is \Computer Configuration\Windows Settings\Security Settings\Local Policies\User Rights Assignment. Is there an equivalent in Win2k GPO?
0
9699
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9562
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10538
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10305
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10285
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10063
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6838
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5494
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
3
2966
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.