Hi everyone,
I'm writing a tool that will help my technician adding a user in the local admin group.
1- As the user, at first, is not part of the group, launching the .exe file ask for admin credentials. Thing is, whereas I'm using
RunWait(@ComSpec & ' /c ' & 'Net LocalGroup Administrators' & @username & ' /add' ,"")
The @username macro is taking the admin user account in the variable instead of the current logged user one.
Do you know how can I face this and have the "real" username value returned?
2- do you guys think it's possible to give the admin access temporary? Maybe something to write in the reg? task scheduler? compare dates and execute a .exe? etc...?
Thanks in advance
-31290