Anyone have a V8.0.1 program running as an NT Service?

VA Smalltalk is a "100% VisualAge compatible" IDE that includes the original VisualAge technology and the popular VA Assist and WidgetKit add-ons.

Moderators: Eric Clayberg, wembley, tc, Diane Engles, solveig

Anyone have a V8.0.1 program running as an NT Service?

Postby PhotonDemon » Fri Jan 14, 2011 8:33 am

Hi All,

Does anyone have a V8.0.1 program running as an NT Service? I have a bunch of VAST 5.5.2 programs that run as Windows NT services just fine. I had a V8.0.0 Seaside program that after some work packaged okay and ran as an NT service without a problem.

When I moved from Windows 2000 to Windows 7, I installed V8.0.1 instead of V8.0.0. By then the Seaside project was dead and the only stuff I have packaged with V8.0.1 are GUI programs. I have a little free time so I thought I would get ready for V8.0.3, I want to move all the VAST 5.5.2 NT services up to it.

I have been trying to package a very simple test Seaside app under V8.0.1 both with and without XD images. Getting a clean package is not easy, both XD and non-XD have different problems. I have also been trying to package a very simple (non-Seaside) test NT service, that packages easily without a problem (non-XD).

Once packaged and installed as an NT service, Windows has a problem starting them. It takes quite a while and then displays error 1053, the service doesn't respond. It looks like it never gets to the code that registers the service.

I don't see what's going wrong here, especially with the non-Seaside program, that packages easily and does almost nothing. Am I going nuts or is there something I'm missing?

Lou
Louis LaBrunda
Keystone Software Corp.
SkypeMe callto://PhotonDemon
mailto:Lou@Keystone-Software.com http://www.Keystone-Software.com
PhotonDemon
[|]
 
Posts: 176
Joined: Thu Dec 20, 2007 1:45 pm

Re: Anyone have a V8.0.1 program running as an NT Service?

Postby TriSebastian » Fri Jan 14, 2011 9:42 am

Hi!

Did you set the PATH Environment Variable to point to your VAST-bin folder? And rebooted the system?

This step is often fogotten while doing service registation quite seldom ;-)

Sebastian
TriSebastian
 
Posts: 76
Joined: Sun Jul 20, 2008 9:40 pm
Location: Nanaimo, BC, Canada

Re: Anyone have a V8.0.1 program running as an NT Service?

Postby marten » Fri Jan 14, 2011 10:02 am

Are you sure, that 8.0.1 is suitable for Windows 7 ?
Marten Feldtmann, Principal Smalltalk User, Private
SkypeMe callto://marten.feldtmann
marten
[|]
 
Posts: 641
Joined: Sat Oct 14, 2006 7:10 am
Location: Hamburg - Germany

Re: Anyone have a V8.0.1 program running as an NT Service?

Postby PhotonDemon » Fri Jan 14, 2011 12:56 pm

Thank you Sebastian and Marten for your prompt replies.

Sebastian asked:
Did you set the PATH Environment Variable to point to your VAST-bin folder? And rebooted the system?


I don't use the PATH Environment Variable to point to the VAST bin folder. I do setup a VAST bin folder with the needed DLLs and a copy of the nodialog.exe file named to match the image. Being that the EXE file is in the same folder as the DLLs, a path doesn't need to be set. I use multiple copies of the nodialog.exe file named to match the image to make it easier to keep track of things in Windows, otherwise Windows shows each service as running the program.

Code: Select all
Marten asked:
Are you sure, that 8.0.1 is suitable for Windows 7?


I think it should be. I test all my VAST 5.5.2 NT services on my Windows 7 system and they work just fine. If V8.0.1 packaged NT services don't work with Windows 7 (or at all) then there is a problem with V8.0.1, that is why I asked if anyone had them working. I'm not saying there is a problem with V8.0.1, I've probably just missed something but at the moment I don't see what.

Maybe I'm missing a DLL or something as the VAST 5.5.2 stuff (that works) has its own bin folder. I will check again.

Lou
Louis LaBrunda
Keystone Software Corp.
SkypeMe callto://PhotonDemon
mailto:Lou@Keystone-Software.com http://www.Keystone-Software.com
PhotonDemon
[|]
 
Posts: 176
Joined: Thu Dec 20, 2007 1:45 pm

Re: Anyone have a V8.0.1 program running as an NT Service?

Postby marten » Fri Jan 14, 2011 1:55 pm

PhotonDemon wrote:
I don't use the PATH Environment Variable to point to the VAST bin folder. I do setup a VAST bin folder with the needed DLLs and a copy of the nodialog.exe file named to match the image. Being that the EXE file is in the same folder as the DLLs, a path doesn't need to be set. I use multiple copies of the nodialog.exe file named to match the image to make it easier to keep track of things in Windows, otherwise Windows shows each service as running the program.



nodialog.exe for a NT-Service ? I've never done this, but I thought, there was a special binary to be used for a NT-Service ?
Marten Feldtmann, Principal Smalltalk User, Private
SkypeMe callto://marten.feldtmann
marten
[|]
 
Posts: 641
Joined: Sat Oct 14, 2006 7:10 am
Location: Hamburg - Germany

Re: Anyone have a V8.0.1 program running as an NT Service?

Postby PhotonDemon » Fri Jan 14, 2011 1:59 pm

Problem solved. At least I have the non-Seaside service working (I will try the Seaside one soon).

I must be getting old. After writing a few times in my last post, that I copy nodialog.exe with the name of my NT service image to the bin folder, I realized I should have been using abtntsrv.exe. I have knows this for years (many years), why I used nodialog.exe I don't know. Maybe I have a case of CRS (can't remember s**t).



Thanks, Lou
Louis LaBrunda
Keystone Software Corp.
SkypeMe callto://PhotonDemon
mailto:Lou@Keystone-Software.com http://www.Keystone-Software.com
PhotonDemon
[|]
 
Posts: 176
Joined: Thu Dec 20, 2007 1:45 pm

Re: Anyone have a V8.0.1 program running as an NT Service?

Postby TriSebastian » Sat Jan 15, 2011 4:05 pm

Hi again,

well that's what I wanted to accomplish.

Error 1053 could mean that the service registry ba windows wasn't able to find the abtntsrv.exe.
Have a look at the properties of your NTService in the local service overview of windows.
Sorry I don't now the exact name on the english version of Windows. It's the list of services in the computer control.
There's a exe-Path information displayed.
Must be something like C:\xyz\abtntsrv.exe -i myNTService.icx

You could also copy this path into the commandshell and execute it. Maybe you will find a little more information on the issues with your other image.

Pointing your Path environment variable to abtntsrv.exe's path would have been one solution.
Copying it is fine, too.

Sebastian
TriSebastian
 
Posts: 76
Joined: Sun Jul 20, 2008 9:40 pm
Location: Nanaimo, BC, Canada

Re: Anyone have a V8.0.1 program running as an NT Service?

Postby PhotonDemon » Sun Jan 16, 2011 8:16 am

Hey Sebastian,

I think you were on the right track. But the way I set up the NT service it is not the path that was the problem. The problem was that I copied nodialog.exe to create KscTestNTService.Exe and should have copied abtntsrv.exe.

Until now all my NT services were based upon VAST 5.5.2 and its copy of abtntsrv.exe. When I create a new service, I pick any of the EXEs at random and copy it with the new name, there by not having to remember to copy abtntsrv.exe. Now that I tried to make an NT service based upon VA Smalltalk V8 and it's new abtntsrv.exe, I needed to start with abtntsrv.exe and not nodialog.exe.

I keep all the VA Smalltalk binary files in ....\binV8\ and the files for each service in their own folder. I use a small Smalltalk MT program to install and setup the NT service. Here is an example of the result on an install:

C:\Program Files\Common Files\Keystone Software Corp\binV8\KscTestNTService.Exe -srvName KscTestNTService -i.\KscTestNTService.icx -lKscTestNTService.log -srvWorkingDir C:\PROGRA~1\KEYSTO~1\KSCTES~1"


It uses the copy of abtntsrv.exe with a name that matches the service name that lives in the VA Smalltalk bin folder (binV8) there by eliminating the need for a path statement. With -srvWorkingDir it points to the folder with the image and the run time log file. You may notice that the parameter to -srvWorkingDir is a short DOS style path. I forget if this is a problem with setting up NT services in general or with my use of the Windows SC program to setup the service.

I thank both you and Marten for your help. I made a dumb mistake, sometimes talking about it helps one to see what was done wrong. That is the case here.

Lou
Louis LaBrunda
Keystone Software Corp.
SkypeMe callto://PhotonDemon
mailto:Lou@Keystone-Software.com http://www.Keystone-Software.com
PhotonDemon
[|]
 
Posts: 176
Joined: Thu Dec 20, 2007 1:45 pm

Re: Anyone have a V8.0.1 program running as an NT Service?

Postby TriSebastian » Sun Jan 16, 2011 4:01 pm

Just to make sure...

Are you aware of those two comandshell lines?

C:\"Program Files (x86)"\Instantiations\"VA Smalltalk"\8.0\bin\abtntsir -install seasideTest -srvDisplayName "mySeasideTestServer" -l.\serverlog.log -wc:.\seasideTest.ini -srvWorkingDir C:\Smalltalk\Images\vast802

and

C:\"Program Files (x86)"\Instantiations\"VA Smalltalk"\8.0\bin\abtntsir -remove seasideTest

In my casethis leads to a relative registered Windows service where I alswas need to give my environment the PATH to the abtntserv.exe.....

Sebastian
TriSebastian
 
Posts: 76
Joined: Sun Jul 20, 2008 9:40 pm
Location: Nanaimo, BC, Canada

Re: Anyone have a V8.0.1 program running as an NT Service?

Postby PhotonDemon » Tue Jan 18, 2011 7:23 am

Hi Sebastian,

I am aware of abtntsir but IIRC it doesn't do everything I want or just the way I would like it to. I send NT services and GUI programs to customers, who must install them. I like to set things up so that the bin files are in a common folder and in such a way that setting paths is not needed (at least for the NT services). At one customer, the NT services need to run with a userid and password to access MS/SQL. I don't think abtntsir can do that.

As I said I wrote a Smalltalk MT program that uses the Windows SC.Exe program. It's not perfect but it gets the job done. I'm now thinking about rewriting it in VA Smalltalk. It will be easer to maintain and if all goes well I may post it here.

Lou
Louis LaBrunda
Keystone Software Corp.
SkypeMe callto://PhotonDemon
mailto:Lou@Keystone-Software.com http://www.Keystone-Software.com
PhotonDemon
[|]
 
Posts: 176
Joined: Thu Dec 20, 2007 1:45 pm

Re: Anyone have a V8.0.1 program running as an NT Service?

Postby tstalzer » Tue Jan 18, 2011 12:15 pm

Hi Lou

I just read through the thread.

Instead of using a Smalltalk program to install/remove a service, we just use a plain ol´batch file

Code: Select all
@echo off
echo Install VASERControl as service
setLocal
sc create VASERControl start= auto binPath= "\"%ProgramFiles%\vServer\abtntsrv.exe\" -mcd -srvName vServer_HL4 -srvWorkingDir \"%ProgramFiles%\vServer\" -i\"%ProgramFiles%\vserver\vserver_XD.ic\" -lvcontrol.log"
endLocal
pause


and then use the following batch file to remove it (if required...)

Code: Select all
@echo off
echo Install VASERControl as service
setLocal
sc delete vServer_HL
endLocal
pause


The batch files are called from the system directly, during the installation process or via a programstarter from VAST.

Thomas
tstalzer
[|]
 
Posts: 65
Joined: Mon Oct 16, 2006 12:07 am
Location: Palma de Mallorca - Spain

Re: Anyone have a V8.0.1 program running as an NT Service?

Postby TriSebastian » Wed Jan 19, 2011 7:06 am

Hi Thomas!

Thank you very much for this information. This sounds interesting!

@Lou: I'm not quite sure about the authentification at NT services,... Aren't you able to give the registered service another user accout than the Window's SYSTEM account? What happens if you switch this user account to WINDOWSUSER? (sorry again I have no idea how this user specific account is named under the englisch Windows version.)

Sebastian
TriSebastian
 
Posts: 76
Joined: Sun Jul 20, 2008 9:40 pm
Location: Nanaimo, BC, Canada

Re: Anyone have a V8.0.1 program running as an NT Service?

Postby PhotonDemon » Wed Jan 19, 2011 7:30 am

Hi Sebastian,

@Lou: I'm not quite sure about the authentification at NT services,... Aren't you able to give the registered service another user accout than the Window's SYSTEM account? What happens if you switch this user account to WINDOWSUSER? (sorry again I have no idea how this user specific account is named under the englisch Windows version.)


I don't know a lot about the authentication either. Basically, you can restrict an NT service by defining it as being logged on as a given user. So, there are values for the userId and password that can be set when the service is created. If you don't specify anything, it is defined as "Local System". Sorry, I don't know what defining the service under WINDOWSUSER would mean.

Lou
Louis LaBrunda
Keystone Software Corp.
SkypeMe callto://PhotonDemon
mailto:Lou@Keystone-Software.com http://www.Keystone-Software.com
PhotonDemon
[|]
 
Posts: 176
Joined: Thu Dec 20, 2007 1:45 pm


Return to VA Smalltalk 7.0, 7.5 & 8.0

Who is online

Users browsing this forum: Google [Bot] and 1 guest

cron