Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
 
  HOME    TRACKER    Visual Basic




How To Check Terminal Services And Remote Installation Services


hi thr,
i want to check on my server that my terminal services and remote installation services r present or not and at the same time if present then check whether they r started n if not started then we have to start these services
THIS HAS TO BE DONE THROUGH VISUAL BASIC 6.0 coding




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
Remote Database Access Vs Terminal Services
We have a VB application which talks to a SQL 2005 database. Typically the database is installed on a single stand-alone PC or, occasionally, on a server on a LAN. Performance has nevere really been an issue.

One customer who needs a multi-user setup wants to out-source the database server to an ISP. In theory, therefore, our application would connect to the database over the internet.

What are the likely performance implications? Would we be better thinking about suggesting a higher spec server on which we could use a Terminal Services environment and install our application on the same machine as the database? Then users could just connect via Remote Desktop and take the performance hit on screen-repainting. The alternative would be installing the application on individual PCs which then connect to the remote database and take a hit on data retrieval/update performance.

Any input would be appreciated.

Terminal Services...
Hi all,

I m facing a aproblwm with windows terminal setting.

When i connect my PC with another computer using Windows Terminal Service. My PC acts as a client & the PC to which i connected will act as "Server".

Now i want to get the UserName & Domain name of my PC. While I connected to Server & Running exe from Server. I have tried WTSAPI32.DLL to get sessionqueryinformation. But it returns values of Server instead of client.





-*-

Terminal Services Api
im using wtsquerysessioninformation of wtsapi32.dll in terminal services just that i cant convert the output buffer into a string.
how can i convert the pointer to a string. please...

Terminal Services Detection
Hi Guys,

Is there any way I can detect if my program is run through the terminal services? I have a problem that I sell 1 instance and 5 people are using it.

Thanks

Debugging COM Dll In VB Through Terminal Services?
Anyone did it?
I run VB at remote server with terminal services and I get
"ActiveX component can't create object" error in local IE that requests ASP page on that server. ASP page does not create object.

Detect Terminal Services
My program has to be licensed to each computer, Using the hardware configuration (hard drive serial, motherboard serial etc etc.)

But the problem is if multiple users connect to the same computer with terminal services, the user purchases only one license and he can use it. So is there a way to detect if the current user is running in terminal services, and get his computer name or terminal number, in order to pop-up that the remote computer doesn't have a license?

I dont want to use a file etc. cause it could happen that an error occurs that the program cloises, and the it wouldn't close the login info.

CreateObject And Terminal Services
Help!

An n-tier application that we are developing does not work with Terminal Services . . .

CreateObject fails every time

Any ideas, anyone . . .

Terminal Services Client
Anyone using this crazy thing.  I've been fighting it for 3 days now and have a little problem I can't get rid of.

I can connect.  I've tried VB6, VS2005, and the TSWEB based version.  When I go into full screen mode, everything is great.  If I click on the connection bar to come out of full screen mode, I get a program ICON on the toolbar that seems to represent the MSRDP connection.  This is now in addition to the icon I have for the running application (vb6, VS2005, etc).

The users's get confused because now there are two icons.

Anyone have experience with this?


Sharing Folder Vs. Terminal Services
I'm still confused betweem sharing folder that contained a program file and using terminal services to installed that program.

The latter case seems to be good choice but I don't have all permission to install it into server

My PC is just W2K PRO., I've a small program and would like to share for others in my office to use it. Because program has administrator login mode and user login mode, I want to install on my PC in order that I can control my program, my scope is to share folder with .exe in that folder, and let every using it. But when other looks for my sharing folder and execute, they have a lot of error about DLL and OCX, I tried to add these libraries on their PC but it still complained "Application-defined or object-defined error"??

Could s/o tell me what is good way to do sharing folder or I have to to Terminal services?

Thanks

Failed To Load Ocx When Using Terminal Services
Hi Team

I have an app that is running on terminal services. When the administrator logs on it works fine. But when a non administrator logs on they get the error
'Failed to load ...ocx. Your version of ...ocx may be outdated.

The setup program installs the ocxs for all users.

Any thoughts? Someone said that the ocxs makes use of the temprary folder and user may not have read/write permissions for this folder. Does anyone know about this?

Thanks

FW

Colour Palettes For Terminal Services
How can I specify the colours in a 256 palette and use them in my VB project? I am limited to 256 colours because of Terminal Services (under win2k - problem is fixed under Win2k3 but we're not upgrading to win2k3)

Programmatically End A Terminal Services Session
Hi:

I am looking for VB code or an API that will terminate a terminal services session on a 2000 server. I can get the user name if needed.

Importing Terminal Services Profile
Hello,

I am running an application that imports users into active directory using a csvde import.

This works well but the only problem is that it makes no provision for importing the user's terminal services profile.

Has anyone come across this before or can they suggest something, anything...

Thanks,

Adam

See All Printers Within Terminal Services Session?
Hi there,

When starting a visual basic application on my Terminal Server (win2000) sometimes I see all current printers available, also the printers from within other users' terminal services sessions.

How could this happen? The users aren't administrators and within windows (going to start menu, printers and faxes) I only see my own client mapped printers.

Does someone know how this is possible?

Best regards and thank you in advance for your answers,
Marcel

Terminal Services - MDI Child Window Size
Hello All,

I have a VB6 application that consists of an MDI form and serveral child forms. When run locally on a client the child forms appear within the MDI form as they were sized at design time.

When the application is run via Terminal Services the MDI form still appears maximized within the browser window, but the child forms appear smaller than they do when running on the client.

The resolution and font size settings are the same on the TS server as they are on the client. Has anyone else encountered this, or have any ideas on how to resolve it without adding code to each form (the application in question is just one of many, so a form-by-form solution would be burdensome...)?

One last note, the client is running Windows 2000 and the server is running Windows Server 2003.

Thanks,
GR

Cannot Delete Db.ldb Or Db.mdb After Using Terminal Services Server/client
after install appl. in application terminal services at server, I cannot delete db.ldb and db.mdb, it kept saying "the source or destination file is in use". But there were not any terminal client connecting to

Help

Developing Vb 6 App For Terminal Services With MS Access Back End
Hi

I am developing a visual basic appliction for which i need initial guidance. what i want to do is to install the application on the remote server and then provide the same eve file of the app to all the user , so that they can access the application at the same time. for this i am thinking of a standalone app.
But i am a bit confuse about connection and record sets.

There level of openeing( Private or public), at form level or module level.single record set at module level that recieve queries from all forms and then execute them or declared record set for every form.

and the connection (private or public) for each form or a single connection for whole application.

i am new to this , so plz help me out

Bring Window To Front - Terminal Services
Hello, does anyone think the following would be possible:

1. have two terminal service sessions to the same computer
2. bring a window from one session into the other?


[server]
/
/
session session
1 2
/
[client]


I would like to have opinions as to wether it can be done, and if i should need to do anything other than setforegroundwindow

Serial Port Redirection Via Terminal Services
First off, Iím not a proficient VB programmer but Iíve inherited a bit of VB code that is giving me some problems. Basically a PC has a Weighing Scale attached to a serial port, a bit of VB code monitors this serial port and when it receives the weight of an item transfers this to another application. This works fine when everything is running on a local machine, however it now needs to be run via Terminal Services on Windows Server 2003, therefore local PC has Scales attached to local Serial Port, connect via TS to VB App and the other App, TS then redirects the local serial port to a virtual terminal services serial port, when VB App started it fails to connect to the Virtual TS COM Port because, as I understand it, this changes whenever a new client connects to terminal services. To confuse matters even further is that Iím only the go between and therefore I donít have access to the Terminal Services set up etc.

Therefore want Iím asking is does anybody have any experience of the Serial Port Redirection functionality of Terminal Services on Windows 2003 and getting it to work with VB 6.0.

Thanks in advance.

Microsoft Terminal Services Control (msrdp.ocx)
Anyone knows how to use Microsoft Terminal Services Control (msrdp.ocx).

I am using Windows 2000.

Annoying Terminal Services Program Error
Hi All

I have a EXE file which users can use from home , via terminal services , Which works every other time you connect to it via Remote Desktop Connection. The message you get when it doesnt work is as such :

The system cannot fint the path specified
This initial program cannot be started : (My program path)
Please Check the initial program in the client configuaration.

Which leads me to believe that the program is not closing properly on it exit..

This is the code i have on the exit button click
CODEPrivate Sub MDIExit_Click()
Call removelogrecord ' calls function to log out user

Dim f As Form
For Each f In Forms
Unload f
Set f = Nothing
Next f

End Sub

Winsock, Terminal Services And Windows Service
This is a architectural question in essence!

I am specifying/designing/codeing a sofwtare solution at the moment.  It consists of a windows service (probably written in c++/ATL)  This service will need controlled by multiple client applications (Each client will in fact control its own separate element within teh service so race & locking issues probably don't apply)  The clients will be run on 1 or more W2K3 severs, running as application servers (Terminal Services), but more than 1 client per server, but not more than 1 client per TS Session. The service will be runng on another server, but not the application ones

My question!  How do I communicate between the clients and service?
Windows Messages - I don't think it is going to be easy to pass messages over network i.e. between machines DCOM - possibility, but the security issues can make this problematic Mailslots/Named Pipes Winsock - my preferred option, however with how does TS handle winsock?  In effect any one of the clients would be tagged with teh IP address of the server, which woudl make messaging awkward.  Does anyone have experience of using TS  with VB code and even better, used winsock with TS

Take Care

Matt
If at first you don't succeed, skydiving is not for you.


Develop An VB6 Programs To Run On Terminal Services For Pocket PC
Dear All,

I have a interesting question, may sound dump. Could I develop a vb6
programs that run under win2000 server terminal services and the
program is access by a pocket pc?

How could I control the resolution or the screen size of the vb6
programs so it fit into the pocket pc screen ?

Please let me know my option, why, how and possible some sample code.

Cheer Happy New Year.

Jimmy

Could Not Open Macro Storage - VBA / Terminal Services
Morning,

I have a vb6 app that uses vba to open a word document, this works great until I try and run this
through Terminal Services on a Windows 2000 Box. I always get the error

5981 Could not open macro storage

Anyone any ideas?

Regards

Gary

Just when you think you've got it right .......

Advice Needed - Windows Terminal Services/msde/vb6 App
Hi,

I've developed an application for a company that is in the very last phase of development. This application is designed in vb6 and runs on client machines, it accesses an MSDE database that sits on a windows NT server. Everything is working great and I was about to deploy the application after a last round of testing, but they've sprung something on me, as per this email from their sysadmin:


Quote:




We are getting a server with Windows 2003 Server Standard Edition installed likely April 18th & 19th. It will act as a Terminal Server and all the users will login via Terminal Services. Users will not use any software on their local PCs, everything they do will be inside a Terminal Server session.




I know nothing about windows terminal services and thus have no idea how this will affect my software. I know that I could research this, but as I am very pressed for time, I thought I'd go straight to the experts: you guys. Can someone please briefly explain to me how this will affect my program, and if it will (or could) cause a significant amount of more work for me? Or simply point me in the direction of a concise resource that can explain how this will affect my software?

I will of course charge them for any development over and above what they currently have. But gosh is it ever irritating when clients do this at the last minute!

Determining User Home Directory In Terminal Services Environment
Hello,

I have written an application intended for single client use that has now been moved to a Terminal Services environment. This application uses an Access database to hold minor data. Since the move from regular client computers to a Terminal Services environment, users of the program are now inappropriately sharing this database. I.e. each instance of the program is referencing the same database, which is not designed as a multi-user database.

Microsoft indicates that an application correctly designed for use in a Terminal Services environment ought to do this:


Quote:




In addition to separating global and local information in the registry, global and local file-based data constructs should also be maintained separately. For example, user preference files should not be stored in the system directory (for example, Winnt) or program directory (for example, Program Files) structures. Instead, preference files or other user-specific local data constructs should be stored in the user's home directory or a user-specified directory.




My question is this: how can the program automatically determine the "user's home directory" when it runs under Windows Terminal Services? E.g. if user A runs the program, the program will automatically know that the Access database resides in C:WtsrvProfilesUserA?

Regards,

-Adrian

Remote Data Services
I am trying to learn about RDS(Remote Data Services).

I have created a DSN(RDS_Test) that points to a DB(Test.mdb) with the one table(Data), that has 2 fields(ID, Name).

Can anyone tell me:

1.How do I connect to this DB with RDS controls in an HTML Document?

2.How do I get the Record set?

3.How do I Bind to this Recordset with HTML Controls, and allow the user to navigate the records, make, and update changes locally?

Identifying Services On Remote Pc1
I am looking for a script or need help writing a script that will query a remote system and identify if a given service is running.

For example, the ideal script begins and ask for the remote computer to query, then it will ask for the service to query, and after those two pieces of information are given the script will post a message stating the servie's status and ask if you want to start or stop the service.


I need some help getting started. Thanks in advanced for your help.

Controling Remote NT Services (API)
I want to control NT services from one computer.
Being able to stop, start, set to auto, manual or disable.

Has anyone successfully done this using VB / API's?

which API's

THanks

How To Get Services On Remote NT Server?
Hi.

How can I get which services are running on remote Windows NT server?
Thanx.

Remote Data Services
When I try to connect to a database over the Internet using RDS. Connection is established quite easily but it gives an error at the time of opening a recordset.

Error Number : 4099
Error Description : Can not connect to the Server

My program goes as follows:

Private objRS As New ADOR.Recordset

Private Sub Form_Load()
Dim objConn As New ADODB.Connection
objConn.Open "Provider=MS Remote;" & _
"Remote Server=http:\server_name;" & _
"Remote Provider=SQLOLEDB;" & _
"Data Sourse=SQLServer_name;" & _
"Database=demo;" & _
"Integrated Security=SSPI"

Set objRS.ActiveConnection = objConn
objRS.Source = "select * from Companies"
objRS.CursorLocation = adUseClient
objRS.CursorType = adOpenStatic
objRS.LockType = adLockBatchOptimistic

objRS.Open

MsgBox "Connected"

Set objRS.ActiveConnection = Nothing
objConn.Close
Set objConn = Nothing

End Sub

Can you help me out.

Thanks

Iqbal Ather Shamsi

Checking Services On A Remote Machine
Hi all,

I am trying to create a program that connects to around one hundred machines, and check the service status of 5 services on each machine. Ideally, the end result would be a huge list of the servers, with failed ones highlighted or something equivalent. I have got the microsoft code to check services on a local machine, but I have no idea how to go about manipulating the code to check a remote server instead. Anyone have any advice any good links?

Detect Services Running On Remote PC!!!
Hi,

How do I detect the services (viz, IIS, FTP, Proxy) running on a remote machine?

Thanks.

Checking The Status Of Services On A Remote Server...
Does anyone know how I could go about writing a program to check the status of a service running on a remote Win2k server???

Any help would be appreciated!

Check SQL Services
Hi all,

I am writing a program with VB code. My program connect to database on SQL Server. In my program, I want to check how many SQL server is installed and running in my network (LAN) so that I just install my database on one of those SQL Server without install a new SQL Server Database for my own.
Please let me know is there any API allow us to know how many and the name of the PCs which already have SQL Server installed and running on them?

Thanks a lot

Check This Out (fast I/O + NT Services)
Couple of very good hints I've come across...

1). I saw a question posted here once from someone asking about quick ways to open large (xMB) text files quickly and the advice was (and I used to do this myself) a richtextbox control's loadfile method.

BUT THIS IS HEAPS FASTER.

Dim Bytes() As Byte
ReDim Bytes(FileLen("C: est.txt"))

Open "C: est.txt" For Binary As 1
Get #1, 1, Bytes
Close #1
Text1.Text = StrConv(Bytes, vbUnicode)

The byte array loads very quickly and is great for use in file IO as I'm sure you all know, but the second part is almos instant. I loaded a 2.5 mb text file to a textbox faster than notepad could under win2000 with a P-Pro compile. This is great (but might work a little different under '98/95 bucause VB works differently with unicode under those OS's) .


2). NT services from VB. There is a great activeX control out. doesn't require that rubbishy service-any stuff and worked great for me. properly compiled from C++ to handle NT's free thread events (properties for start, stop, pause, cont etc). I have the zip (about 200k) but I lost the URL. Email me if you ant it and I'll send it straight across pdwyer@spin.ad.jp

Check For Services Are Running..
Hi,

i wanted to check the a service(like SMTP, SQL) are started and running..

how can i achieve this..

Thanks and regards,

Venu

Check Services Are Running On .msc Console
Hi,

I am hoping you can help.

I would like to automatically check if Services, viewable using service console ... path.msc, have been started.

Any ideas or starting points would be greatly appreciated.

Cheers

D

Services
I can not find where my services are loading from on my system. I though they were supposed to be in:
HKEY_LOCAL_MACHINE, "SoftwareMicrosoftWindowsCurrentVersionRunServices"

XML Web Services & VB6
How to communicate between XMl Web Services and VB6? any references?

TQ

WMI And Services
Does anyone know how to change the start type of a service using WMI. I can start and stop them but not set them to manual,auto, or disable them.

Services
Is there a way to take an already written program and run it as a service (other than the task scheduler)

Or write a service with VB?

XP Web Services/IIS App
Tia,

On my old Win98 laptop, I had Personal Web Server. I used it to preview .asp and IIS apps. I now have WinXPHome (at home) and when I go to create an IIS app, VB tells me I need IIS or Peer Web Services in order to continue.

I checked the MS Knowlege Base, but apparently didn't ask the correct questions.

Can someone point me in the right direction?

VB6 Services
I was playing around with this thread that Flyguy pointed out:
http://www.montgomerysoftware.com/Cr...rviceInVB.aspx

Good material for me, since I know nothing about how to create services. My question is that I noticed most if not all SERVICES don't show up in Task Manager, however, mind shows up in Task Manager?

1) How do I make it not show up in Task Manager?

2) When I set it to start Automatically, but it does not do anything until I click the start button of my service. How do I make it, so it "Starts"?

Services
IF made a program in Visual Basic, but I want it to start automatically in Windows 2000. How can I Add a Program to services.

WMI For Services
I'm using WMI in VBScript to install services. I grabbed the following script from MS TechNet from here and modified it into this function:


Code:
Function InstallService(ServiceExe, ServiceLongName, ServiceName, _
UserName, Password)

Const OWN_PROCESS = 16
Const NOT_INTERACTIVE = True
strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\" & strComputer _
& "
ootcimv2")
Set objService = objWMIService.Get("Win32_BaseService")
errReturn = objService.Create (ServiceName, ServiceLongName, _
ServiceExe, OWN_PROCESS ,2 ,"Automatic" , _
NOT_INTERACTIVE, UserName, Password)

InstallService = errReturn
End Function

When I call InstallService("C:appInterfaceSvc.exe", "InterfaceSvc", "InterfaceSvc", ".LocalSystem", ""), I get a return value of 0. Everything's good. If I try to use another username, though, I run into trouble. For username ".Administrator" and password ".password", I get the errorcode 21, which this page says means "Invalid parameters have been passed to the service."

If I change the username/password manually through the Service applet in the control panel, and check the service's username via WMI, I get ".Administrator", so that's not the problem.

Unfortunately, all of Microsoft's samples are for services running under LocalService. Anybody around these parts familiar with WMI?

Whatta first post, huh?

Run As Services
anyone who knows how to run the application as NT services?

How Can I End All The Services In My Pc
hi all,

may be this one a foolish question. but i would like to know how can i end all the services in a single click(through vb code). i searched through the forums...but did not get an answer for this.

saj

Services
I have a program which needs to edit the registry, but it cant when i log on with a limited account. Can i make my program run as a service.

Copyright © 2005-08 www.BigResource.com, All rights reserved