win service "access denied"

I have a windows console application that runs and behaves properly when run as a console application. Its cross platform and runs as a user agent on mac just fine. On Win, I am trying to install it with an appliction that I’ve given “Admin” level run rights with the build switch in the IDE. I debug/run/build the service application from it’s own project and then with the “installer” application, I use a build script to copy the service application and all it’s contents to a location, then I use the “installer” application to run shell commands to use “sc” for creating, describing and starting the service - but on test machines I get the “Access denied” 5 error. Im fairly stumped. Shouldn’t the admin level application be admin level shell? IOW, when Im instantiating the shell from that admin level application arent the shells admin level too? What other things could cause the access denied 5 error on test machines? My thinking is that under the above scenario, the console application should get installed by the admin shell and be ok to run? What am I missing?

Is the Super of App ServiceApplication?

Hi Wayne, yes it is. It seems like I may have had the service’s application bundle down too many levels - something along the way on a test machine burped on a long file name and I noticed things not copying during builds and installs so I moved it all the way back out to the application folder along side the actual application and it seems to start up fine and behave now. Thats all pretty un nerving for me though. Could too long of a naming path jam me up like that?

In a Shell, it can.

Does this happen during the install or the run? Does the runas user have have read access to your installed app folder and the exe?

I get my Xojo application itself to create the Windows Service and Start it (via a Shell), rather than the Installer. Seems to work here.
Also you can set the Xojo app to run as Admin or highest level in the IDE.

I meant “Log On As” above.

What happens is the console application (which is the service, and has the super Service Applcation) is built using the normal user level authority in the IDE build switch. I “install it” by running shell commands via another xojo application that has the elevated user authority of Administrator. I would expect that installer application with elevated rights to instantiate elevated shell commands when its doing the sc create etc. The access eror was showing on the installed service. It would get created ok, then I config to change the description, and then finally sc start it. When I would runt he sc start it would fail with the access 5 error and trying manually was having the same result. I noticed some files not copying on a test mahcine and on a hunch moved it way up the installation heirarchy to live next to the main application. That has solved the problem but has not aleviated my concerns over the access issue and why, if it was indeed a path length issue, the error didt reflect that a bit better. Just hoping one of you Win guys has seen such a thing?
@Julian - the service app was in a, “… myapp/myapp resources/myappinstallhelper/myappinstallhelper Resources/myserviceapp” location and I can only guess as to the runas user’s rights. My assumption was that the helper apps elevated status would “bless” the service installation. You have the crux of it here - I dont know if it is the resultof the mixed Win security or the path length.

Paths in command line commands are generally limited to 255 chars. It’s rare to get a really good error description from Microsoft.

And I assume you enclosed the path in quotes, as it contains a space.