Installing a prg as a service

Discussion in 'other software & services' started by Fraha, Feb 7, 2005.

Thread Status:
Not open for further replies.
  1. Fraha

    Fraha Registered Member

    Joined:
    Feb 3, 2003
    Posts:
    189
    Location:
    The Hague - Netherlands
    Hi, perhaps this is a better forum to ask this tech question:

    This problem really got me going.
    I'm trying to install a program as a service. (ud.exe and g6 BFTP server)
    When it did not work on this machine I tried another and there it works like a charm.

    The service is installed with this script:

    ==SOF==
    "c:\program files\united devices\instsrv" ud.exe "c:\program files\united devices\srvany.exe"

    reg add HKLM\SYSTEM\CurrentControlSet\Services\ud.exe\Parameters

    reg add HKLM\SYSTEM\CurrentControlSet\Services\ud.exe\Parameters /v AppDirectory /t REG_SZ /d "c:\Program Files\United Devices"

    reg add HKLM\SYSTEM\CurrentControlSet\Services\ud.exe\Parameters /v Application /t REG_SZ /d "c:\Program Files\United Devices\ud.exe"

    ==EOF==

    All files are in place, the service is in fact installed but stopped.
    When trying to start it manually error 193: 0xc1

    What is the problem here?
    Local security? where should I change what?
    I'm not really easy going there but if i must....

    Please help!

    Greetings

    Frans
     
  2. nick s

    nick s Registered Member

    Joined:
    Nov 20, 2002
    Posts:
    1,430
    Hi Fraha,

    Windows may be having trouble locating ud.exe on one machine and not the other. From Event ID 7000 and "%1 Is Not a Valid Win32 Application" Error Message When You Start a Service:

    "This issue may occur if the path of the executable file for the service contains spaces.

    When Windows starts a service, it parses the path of the service from left to right. If both of the following conditions are true:

    • The path of a service’s executable file contains spaces.

    • There is a file or folder on your computer’s hard disk that has the same name as a file or folder in the path to the service's executable file. Windows may locate and try to run the file or folder before it locates and runs the executable file for the service.

    For example, if the path of the executable file for a service is C:\Program Files\MyProgram\MyService.exe, and if a folder that is named C:\Program also exists on your hard disk, Windows locates the C:\Program folder on your hard disk before the C:\Program Files\MyProgram\My Service.exe file, and then tries to run it..."


    Hope it helps.

    Nick
     
  3. Fraha

    Fraha Registered Member

    Joined:
    Feb 3, 2003
    Posts:
    189
    Location:
    The Hague - Netherlands
    Thanks for this!

    The name of the folder is united devices en there is a folder gbefore that called "uninstall info" so 2 characters are the same.
    As this is an xp folder i cannot rename that. do you think this could be the problem?

    does the error msg tell you anything?

    Frans
     
  4. nick s

    nick s Registered Member

    Joined:
    Nov 20, 2002
    Posts:
    1,430
    What error message(s) do you see in your System event log?

    Nick
     
  5. Fraha

    Fraha Registered Member

    Joined:
    Feb 3, 2003
    Posts:
    189
    Location:
    The Hague - Netherlands
    *** Problem Solved***

    YOU ARE AN ACE NICK S :D

    There was a file in c:\program

    What it was I donot know but suddenly all old services where run. Including iomega stuff.
    That machine was sold two years ago!

    Thanks a bundle!

    Happy me.

    Frans
     
Loading...
Thread Status:
Not open for further replies.