I have the weirdest problem I've ever encountered.

I run a batch file which starts an external program (Scan2PDF) to convert a tif to a pdf file.
If I run it from an elevated command prompt (Right-click on cmd and run as administrator), it executes the command, but not entirely as I expect (it leafs the barcode page in the converted PDF)
If I run it in a normal command prompt (cmd.exe without run as administrator), it executes the command correctly.

I would think that if I execute something with admin rights, the result should be correct and not the other way.

Anyway, that is what I found. I don't know the reason. I tried to change permissions on folders etc.

My question is now: How can I create a Windows service which executes that command I had in the batch file, BUT with the same privileges I executed the batch file from cmd, without admin rights?

If I create it with sc create "Name" binPath= "path", the result is the same as if I would execute cmd WITH admin rights. It creates a service which runs with the local system account. Since this version does not work, I need to be able to tell the service to run in "low" privilege mode.

I already tried to create a local user which is only in the "Guests" group. But it still does not work.

link|improve this question
feedback

migrated from stackoverflow.com Aug 24 '11 at 22:27

This question came from our site for professional and enthusiast programmers.

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
or
required, but never shown