none
Error code 1734 The array bounds are invalid when trying to install windows service

    Question

  • Hi

    We are trying to install our application as a windows service on a windows server 2012 R2.
    We use the following windows api to create the service

    SC_HANDLE hService = ::CreateService(
            hSCM, m_szServiceName, m_szServiceName,
            SERVICE_ALL_ACCESS, SERVICE_WIN32_OWN_PROCESS,
            SERVICE_DEMAND_START, SERVICE_ERROR_NORMAL,
            szFilePath, NULL,NULL, depend,
    szUserName, 
    szPasswd)

    Occasionnaly (not on all servers), we get an error code back from this function Error code 1734. The array bounds are invalid
    It occurs only when we are using a domain user (as opposed to a local user) in the service parameters and not on all platform.
    We think it may be related to the validation of the user with active directory services (error code seems to indicate an rpc error) but we did not find any way to solve it.

    Any ideads how to fix this ?
    thanks in advance

    Thursday, April 20, 2017 10:08 AM

All replies

  • Not a correct forum as this is related to application installation on Win2012, however I would suggest to check couple of things.

    Is local User on the server part of Local Admin group? If Yes follow next step

    Can you try adding domain User in Local Admin group?

    run the script/installer with runas admin mode.

    Can you disable any Firewalls whether it is server or AV FW policy?

    Do you have correct / similar Windows build that you are installing the service?


    Regards, Jim MSCS - MCP Disclaimer: This posting is provided AS IS with no warranties or guarantees , and confers no rights. When you see answers and helpful posts, please click Vote As Helpful, Propose As Answer, and/or Mark As Answer

    Thursday, April 20, 2017 12:31 PM
  • Better to ask development questions on MSDN, possibly over here.

    https://social.msdn.microsoft.com/Forums/windowsdesktop/en-US/home?category=windowsdesktopdev

     

     



    Regards, Dave Patrick ....
    Microsoft Certified Professional
    Microsoft MVP [Windows Server] Datacenter Management

    Disclaimer: This posting is provided "AS IS" with no warranties or guarantees, and confers no rights.

    Thursday, April 20, 2017 1:12 PM
  • Thanks
    i will try to post this thread in the appropriate forum and try suggested verifications.
    Thursday, April 20, 2017 3:39 PM
  • Hi,

    Was your issue resolved? If you resolved it using our solution, please "mark it as answer" to help other community members find the helpful reply quickly.

    If you resolve it using your own solution, please share your experience and solution here. It will be very beneficial for other community members who have similar questions. If no, please reply and tell us the current situation in order to provide further help.
    Best Regards,

    Wendy


    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com

    Saturday, April 29, 2017 10:54 AM
    Moderator