Running q as a Service on Windows?

Hi,

I have made a q program which works as a pseudo ticker-plant, by
creating and publishing simulated time-series data at regular
intervals… i.e, currently every 3 seconds.

Now I want to turn that q instance into a Windows Service (ws) by
disseminating data to a virtual gadget which I built, using
OpenLaszlo.

To setup the ws, I am following the Cookbook Instructions.

However, because I have never had to deal with registry insertions
until now, I am a bit stumped about Step 3 in the Cookbook
Instructions…

Here’s what I have done so far:

I downloaded and installed rktools containing srvany.exe from MSFT.

… then copied srvany.exe to C:\q folder.

… then typed … C:\q> instsrv.exe q5010 c:\q\srvany.exe … at the
cmd prompt

The console message informed me that: The service was successfully
added! …

I then opened regedit from the cmd line.

In the treeview, I could see that the creation of the service had
added a key folder at branch …
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\q5010

I navigated down to the q5010 folder to inspect the contents. It
contains various items including,

Names, Types and Data, with Data values for each Name in the folder.
The q5010 folder also has a sub-folder named Security, containing some
data.

Now…Cookbook Instruction 3 says prepare the Windows registry file to
setup the parameters for the q5010 service.

i.e…

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services
\q5010\Parameters]
“Application”=“c:\q\w32\q.exe”
“AppParameters”=“-p 5010 -q”
“AppDirectory”=“c:\q”

That is the bit I don’t understand. How do I insert these parameter
details into the registry file?

Do I need to put those details in some specific file type and
reference the path to that file in the registry… or do put those
details directly in the the registry file using Edit->New->Key …
once or by making multiple insertions??

Thanks in advance.

Q.

Okay, I have found out how to do it.

Open a text editor and save the following data from Step 3 of the Kx
Cookbook Instructions as a .reg file, … I used mykey.reg as a file
name.


Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services
\q5010\Parameters]
“Application”=“c:\q\w32\q.exe”
“AppParameters”=“-p 5010 -q”
“AppDirectory”=“c:\q”


Then navigate to the saved .reg file and double-click to open it. Upon
opening this file you will be asked if you wish to update the registry
keys. Click to confirm the update and then open regedit.exe to check
to see if the key values have been inserted.

Regards,

Q.

Hi,what is value for me to define log file so that stdout/stderr of q canbe piped to it?Thanks,dbOn Feb 24, 10:36?pm, Qurious <funk…> wrote:> Okay, I have found out how to do it.>> Open a text editor and save the following data from Step 3 of the Kx> Cookbook Instructions as a .reg file, … I used mykey.reg as a file> name.>> ---->> Windows Registry Editor Version 5.00>> [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services> \q5010\Parameters]> “Application”=“c:\q\w32\q.exe”> “AppParameters”=“-p 5010 -q”> “AppDirectory”=“c:\q”>> ---->> Then navigate to the saved .reg file and double-click to open it. Upon> opening this file you will be asked if you wish to update the registry> keys. Click to confirm the update and then open regedit.exe to check> to see if the key values have been inserted.>> Regards,>> Q.</funk…>

Hi all, just wonder, any follow up about this question? I am also interested in setting Q as a service at windows