stiv Posted February 15 Share Posted February 15 (edited) Hello all of you, I have a problem, what happens is that I want to execute BlockInput in my code, since when I carry out a scheduled process it does not work for me unless I execute it as administrator by clicking manually. I would like to know if there is any way to include the administrator user with the password in the code so that it runs with elevated permissions. I tried to use runes, but it doesn't do anything or I don't know if the syntax is wrong #include <WinAPI. $usuario = "dominio\administrador" $contrasena = "contraseña" ; Ejecutar AutoIt como administrador RunAs($usuario, "",$contrasena, 0, @AutoItExe & " " & '"' & @ScriptFullPath & '" ') ; Bloquear entrada BlockInput(1) Sleep(15000) BlockInput(0) MsgBox(64, "prueba", "termino la ejecucion") Thank you so much Edited February 15 by stiv Link to comment Share on other sites More sharing options...
argumentum Posted February 15 Share Posted February 15 (edited) Congratulations in you 35th post since 2021 ! Is good to see that you learned about font size and code posting. Edited February 15 by argumentum Andreik and SOLVE-SMART 2 Follow the link to my code contribution ( and other things too ). FAQ - Please Read Before Posting. Link to comment Share on other sites More sharing options...
stiv Posted February 15 Author Share Posted February 15 @argumentum thanks for the corrections to my syntax argumentum 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now