IIS 7 and Above
Execute the appcmd command as Normal user
Last post Mar 12, 2018 02:20 AM by Yuk Ding
Mar 09, 2018 05:38 AM|Durai|LINK
I am using IIS 8 in my machine.
i want to execute the appcmd command in command prompt as Normal user.
while i executing this command. i Got the error as below,
c:\Windows\System32\inetsrv>appcmd.exe list wp
ERROR ( message:The WAS service is not available - try starting the service first. )
It is working , when i open the command prompt as administrator.
How can i achieve this as normal user?
Is there a way to get the application pool name of a worker process from C++ ?
Mar 10, 2018 12:32 AM|lextm|LINK
No, you cannot. IIS API and its supporting utilities require administrator permissions to run in most cases if not in all. Except administrators, why do normal users care about that?
Mar 12, 2018 02:20 AM|Yuk Ding|LINK
I didn't find any document about how to achieve this in c++ language. So maybe you could try other methods to achieve this like use c++ to execute powershell command, cmd prompt or invoke c#.net code from c++ following this link while it is not difficult
to get the app pool name from system.web.administrator: