Nyphel
22nd June 2007, 14:08
Hi,
I would like my application to be executed by a speific user under Windows.
The "current" user may not have the necessary rights to create a new file, and I would like this action to be performed by "Administrator" user.
Like my I/O operations are performed in a sub-application, I could simply execute this QProcess as an "Administrator" task... For that I can use the void QProcess::setEnvironment ( const QStringList & environment ) function.
The problem is the fallowing : I don't know the keys corresponding.
Using QStringList environment = QProcess::systemEnvironment(), I know that the user name is store in the key "USERNAME". But, in wich key is stored the password ?!
I've the value of the administrator password, but not the key.
As somebody an idea ?
Thanks for your help.
I would like my application to be executed by a speific user under Windows.
The "current" user may not have the necessary rights to create a new file, and I would like this action to be performed by "Administrator" user.
Like my I/O operations are performed in a sub-application, I could simply execute this QProcess as an "Administrator" task... For that I can use the void QProcess::setEnvironment ( const QStringList & environment ) function.
The problem is the fallowing : I don't know the keys corresponding.
Using QStringList environment = QProcess::systemEnvironment(), I know that the user name is store in the key "USERNAME". But, in wich key is stored the password ?!
I've the value of the administrator password, but not the key.
As somebody an idea ?
Thanks for your help.