Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.
Keywords: WinBatch Native Service .EXS Parameters
My command looks like this:
wntSvcStart(``, vServiceNm, 0, `test1 test2 test3`, ` `)The call correctly starts the service however, the parameters seem to be lost in transit and never make it to the my service.
This is the first block of code in my service.
If IsDefined(param1) Then vPar1 = param1 Else vPar1 = `Param1 Not Defined` End If Message(`Param1`, vPar1)The service always comes back with `Param1 Not Defined`
I am trying to understand what happens to the parameters from call to service. Did I miss something completely to allow the service to receive parameters?
Thank you for any guidance.
Note: If you place command line parameters in the registry 'imagepath' value for the service, they can apparently be accessed via the usual param0 through param9 variables inside the compiled service script.
SvcKeyName = `My Service Name` root = @REGMACHINE keyname = `SYSTEM\CurrentControlSet\Services\My Service Name` item = `[imagepath]` params = `"1" "2" "3"` ; Grab image path imagepath = RegQueryExpSz( root, keyname:item) ; Include parameters in ImagePath RegSetExpSz( root, keyname:item , `"`:imagepath:`" `:params )
Article ID: W18005
Filename: WinBatch Service Not Getting Parameters Passed by wntSvcStart.txt
File Created: 2009:06:04:09:15:26
Last Updated: 2009:06:04:09:15:26