Hello,
Let me first apploigize as I am sure this question sounds like it is all over the place. I am trying to write a c++ program that will install software on a users PC. The problem that I am having is that the program will not run correctly for a normal user account (in Windows XP, users need elevated privs to install software). Basically, I am using c++ and cmd line arguments to make everything happen.
I have tried to use a runas command, but Windows does not allow you to hardcode passwords into anything (batch files and ect.)
Does anyone know of a way to pass a parameter to the console during runtime...from the program itself? Any thoughts would be appreciated.
In a nutshell, here is what I have so far (Specifics have been removed for security reasons):
When my program gets to the "runas" section the console stops and prompts for a password. I would like this password to come straight from my coding and not require any user interaction. Any thoughts or suggestions would be greatly appreciated!