Important: Please read the Qt Code of Conduct -

Run cmd command from QProcess without admin privileges

  • Hi,

    I know - my problem is very strange.

    I would like to execute one CMD command from my QT application ( it has admin privileges ) but it must be execute by current user.

    When I execute:


    I execute it with admin privileges, so it doesn't work. I try with "runas", but It doesn't work too ( when I execute it in cmd - I need password and I don't want it ). I try with bat script ( I use windows ). When I double click on it in GUI everything is ok ( in this script I run cmdCommand ). When I execute:
    When I execute:


    The result is the same like using


  • It's not that strange of a problem...It's the pleasures of working in windoze.

Log in to reply