Hey there, I've got an job scheduling utility that I'd like to run the ADImport command line utility with regularly to import all new users, update their group memberships, and disable deleted users. One of the issues I'm running into is that the utility looks to require the run as an administrator. Even if UAC is disabled, the security prompt still pops up. Meaning trying to automate this utility outside of a scheduled task hack, is a bit troublesome. I did a bit of research into this, and it ultimately comes down to how the utility is being built, and the properties in it's manifest.
Wondering if anyone else has run across this, what they did to fix it, and if Kentico plans to change this permission demand in the future. As a side note, I'm not sure whey we need that to run as an admin when really it only needs access to do LDAP queries and update the SQL DB....
Running as administrator is pretty simple. Take a look at this post and if that doesn't work you can find the actual .exe and right click on it and click Troubleshoot Problems. There you can walk through setting it up to run as administrator all the time as well.
Yep, I know how to do that. However, this is a scheduled job that doesn't interact with the desktop. So when it runs, it can't answer the elevate request. I think that the app manifest has requestedExecutionLevel set and that's requiring the prompt.
So that's where the second part of my answer comes into play. Find the actual EXE and right click on it and click Troubleshoot Problems and walk through that. It will essentially allow you to run that EXE as admin whenever it is executed, no interaction at all.
Please, sign in to be able to submit a new answer.