RyanVM Posted April 30, 2004 Share Posted April 30, 2004 Does anybody here have experience registering a service on WinXP? At my workplace, we have some hardware that's controlled by proprietary controller board. It uses a driver file WinRT.sys which needs to be loaded as a service when Windows loads. Here's where things get complicated. I've got an INI file that came with the driver (along with the exe regini for loading what's in it into the registry). When I run the program to load the registry entries, all appears OK. I copied the WinRT.sys file into system32\drivers (which is the path referenced by the ImagePath key). The service is registered, but whenever Windows tries to start the service, I get this error:The WinRT service failed to start due to the following error: The system cannot find the file specified.The sad part is that this exact method worked in the past just fine. For reference, here are the entries being imported into the registry:[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\WinRT]"Type"=dword:00000001"Start"=dword:00000002"ErrorControl"=dword:00000001"Group"="Extended Base""ImagePath"=hex(2):73,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,64,00,\ 72,00,69,00,76,00,65,00,72,00,73,00,5c,00,57,00,69,00,6e,00,52,00,54,00,2e,\ 00,73,00,79,00,73,00,00,00"Description"="Nanomover Stage Control""DisplayName"="WinRT" [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\WinRT\WinRTdev0][HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\WinRT\WinRTdev0\Parameters][HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\WinRT\WinRTdev0\Parameters\Section0]"IoPortAddress"=dword:00000300"IoPortCount"=dword:0000001fThe image path there is an expanded string with the value "system32\drivers\WinRT.sys" (which is exactly where that file is). The sad thing is that I'm looking at other entries for system drivers and they all look the exact same Anybody have an idea? Link to comment Share on other sites More sharing options...
ardnelias Posted April 30, 2004 Share Posted April 30, 2004 Have you checked the Event Viewer? Most services write their error events there. My guess is that it has something to do with the path string. If the string were given as REG_SZ type then you need to put two \\ 's instead of one to get the correct path. Check and let us know... Link to comment Share on other sites More sharing options...
RyanVM Posted April 30, 2004 Author Share Posted April 30, 2004 Yes, the first code block was a direct copy/paste from the event viewer.It's a REG_EXPAND_SZ value, and double \\'s didn't seem to change anything.This is what I get if I try to start the service via command prompt:C:\Documents and Settings\Administrator>net start WinRTSystem error 2 has occurred. The system cannot find the file specified. Link to comment Share on other sites More sharing options...
ardnelias Posted April 30, 2004 Share Posted April 30, 2004 Trying chaning the Imagepath value to the following string:%SystemRoot%\system32\drivers\WinRT.sysThis should get you the full path... Link to comment Share on other sites More sharing options...
RyanVM Posted April 30, 2004 Author Share Posted April 30, 2004 Well, that gave me a new error message C:\Documents and Settings\Administrator>net start WinRTSystem error 3 has occurred. The system cannot find the path specified. Link to comment Share on other sites More sharing options...
ardnelias Posted April 30, 2004 Share Posted April 30, 2004 hmm...Have you tried giving the hardcoded path say:c:\winnt\System32\drivers\winrt.sys Link to comment Share on other sites More sharing options...
RyanVM Posted April 30, 2004 Author Share Posted April 30, 2004 Yet another new error message!C:\Documents and Settings\Administrator>net start winrtSystem error 123 has occurred. The filename, directory name, or volume label syntax is incorrect.I don't think it likes me . Link to comment Share on other sites More sharing options...
BeenThereB4 Posted April 30, 2004 Share Posted April 30, 2004 Normally case would not be relevant, but as a test I would match the case that is found in driver image path as a test:(I cannot think of anything else)System32\DRIVERS\WinRT.sysMatch the capitalization exactly.If that does not work, usually a sys file is just another extension for an exe. Try renaming it to WinRT.exe and running it manually. Link to comment Share on other sites More sharing options...
RyanVM Posted April 30, 2004 Author Share Posted April 30, 2004 OK guys, I'm not sure what happened, but it works now. Somehow, not defining ANY imagepath did it... Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now