Cannot Start Openfire Service

I just upgraded from Openfire 3.4 to 3.6 and now I cannot get the Openfire Service to start. Everytime I try to start it, I get the following error:

Could not start the Openfire service on Local Computer

Error 1: Incorrect Function

Every time I try I get an Event ID 7023 in the event logs. I can run the Openfire software fine without the service but I really need to run it as a service. Any suggestions?

try removing the service and recreating it. try reinstalling the latest version of openfire.

I had already tried that but I think I got it working. Just in case someone else comes up on this issue, here is what happened. I copied the openfire-service.exe to the c:\ so that it would be easier to type in the command prompt. Once I used quotation marks and actually installed it from the default location: ‘c:\program files\openfire\bin\openfire-service.exe’ it worked fine.