Jump to content

Search the Community

Showing results for tags '\#RequireAdmin'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • General
    • Announcements and Site News
    • Administration
  • AutoIt v3
    • AutoIt Help and Support
    • AutoIt Technical Discussion
    • AutoIt Example Scripts
  • Scripting and Development
    • Developer General Discussion
    • Language Specific Discussion
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Categories

  • AutoIt Team
    • Beta
    • MVP
  • AutoIt
    • Automation
    • Databases and web connections
    • Data compression
    • Encryption and hash
    • Games
    • GUI Additions
    • Hardware
    • Information gathering
    • Internet protocol suite
    • Maths
    • Media
    • PDF
    • Security
    • Social Media and other Website API
    • Windows
  • Scripting and Development
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Categories

  • Forum
  • AutoIt

Calendars

  • Community Calendar

Found 7 results

  1. Is it possible to make an AutoIt script/exe always prompt for credentials regardless if the logged in account is admin or not? I know #requireadmin will prompt if the account isn't admin, but I need to run under different credentials regardless. I'm trying to have the script prompt for domain admin credentials even if the user is a local admin. I know how to do it via shortcut (ie. C:\Windows\System32\runas.exe /noprofile /user:domain\user "%windir%\system32\notepad.exe"), but would like it to be all contained cleanly with the one AutoIt script, if possible. Oops - sorry, started this in the wrong section. Can an admin please move?
  2. #RequireAdmin question

    Hello everyone, Question: When adding #RequireAdmin within the script. It runs everything in the script with administrator rights. That's good because there are some functions i like to run with administrator rights. But I'm curious if it possible If within the script i had a option to open IE or Firefox for example. I don't want that to open with administrator rights. Is it possible when you select to open IE or Firefox, it opens that in a standard user? V/r
  3. I have a script that starts up all my work programs. Programs like ventrilo, trillian, and other work stuff. In the past week, I noticed two of these programs not starting up while 6 of them work the same. I investigated and I notice these only start when I run the script as administrator (or add #requireadmin). I use windows 7 and have no UAC. I have not changed anything to my OS except install updates. I'm so confused why only some of these programs now start up and require admin. If I double click the executable or run in command prompt, they startup fine. Does anyone have a clue what happened to cause this change and if I can change it back? Below is the code I ran as a test. Only the last program now starts up unless I add #requireadmin or right click and run the script as admin. Thanks for any help. #include <Misc.au3> RUN("C:\Program Files\Ventrilo\Ventrilo.exe") Sleep(1000) RUN("C:\Program Files (x86)\Trillian\trillian.exe") RUN("C:\Program Files (x86)\Stealth Alerts\SAClient.exe") ; This works just fine
  4. quoting the help file about #RequireAdmin: "In case system doesn't have elevation mechanism (e.g. disabled UAC) new process will run under the same user as the original." just to be clear about correctnone-correct cases regarding #RequireAdmin: 1. if the user is running under a disabled UAC, he wont be able to run as another user with admin rights ? 2. using #RequireAdmin and a disabled UAC wont give any message that user hasn't got admin privileges to run.., but then the script continue's (the script needs a routine to figure this out) ? thanks
  5. Currently, if a program kicks off the UAC, the UAC properly lists the Program name, File origin and Program location. However, the Publisher for my compiled scripts comes up as Unknown. Is there a way to register/publish a script so that this field can be populated when the UAC is requested? Thank you. C-T
  6. I have been using AutoIT for several years now, although mostly with Windows XP. As my company is undertaking a massive Windows 7 conversion, I find that some of the features of AutoIT do not seem to work as I would think they should, which brings about my question today... I use the AutoIt3Wrapper with my compiled scripts and everything works well generally; however, I have a need to include two commands in an AutoIT script that have to be RunAsAdmin. I have the AutoITWrapper set as "#AutoIt3Wrapper_Res_requestedExecutionLevel=requireAdministrator" and I am prompted for UAC elevation. The commands; however, do not seem to be elevating. RunWait(@ComSpec & ' /c bcdedit /set {default} recoveryenabled No', @HomeDrive, @SW_HIDE) RunWait(@ComSpec & ' /c bcdedit /set {default} bootstatuspolicy ignoreallfailures', @HomeDrive, @SW_HIDE) If I post the commands into an elevated command prompt they work correctly, but via the script they seem to be ignored. I appreciate any ideas and/or assistance. Thanks In Advance!!!
  7. I have a general question. Is it possible to tell under program control when #RequireAdmin is needed? Specifically I can WinMove the Date and Time window without #RequireAdmin, however I cannot WinMove the System Properties window without using the #RequireAdmin. This script shows the issue. ;#RequireAdmin ;<-- makes A BIG difference #AutoIt3Wrapper_run_debug_mode=Y ; use this to debug in console window <--- LOOK Opt("WinTitleMatchMode", -2) ;nocase partial match okay ;MoveIt($pgm, $pgm_title) MoveIt("notepad.exe", "notepad") ;works MoveIt("cmd.exe", "cmd") ;works MoveIt("control timedate.cpl", "Date and Time") ;works MoveIt("systempropertiesprotection.exe", "System Properties") ;FAILS - handles correct, Winclose fails, etc. - actually hangs next run command - manually close window after MsgBox winclose pops up - then it will continue correctly MoveIt("control timedate.cpl", "Date and Time") ;works MoveIt("control sysdm.cpl", "System Properties") ;try old version - FAILS ALSO ;??? Is there some special approach needed to move a System Properties box ??? YES YES YES IT REQUIRES #RequireAdmin !!!!! Exit Func MoveIt($pgm, $pgm_title) Send("#r") ;open run box ;wait for it WinWait("Run") ;partial match If Not WinActive("Run") Then WinActivate("Run") WinWaitActive("Run") Send($pgm & @CRLF) ;run program WinWait($pgm_title) ;partial match If Not WinActive($pgm_title) Then WinActivate($pgm_title) WinWaitActive($pgm_title) MsgBox(0,"Debug","Ready to move.") $hl = WinMove($pgm_title, "", 0, 0) MsgBox(0,"Debug","Should be at 0,0 and handle = " & $hl & " (0=not found)") $hl = WinMove($pgm_title, "", 100, 100, Default, Default, 100) ;move slowly keep current size MsgBox(0,"Debug","Should be at 100,100 and handle = " & $hl & " (0=not found)") MsgBox(0,"Debug","Move completed.") $r = WinClose($pgm_title) ;be polite and close it MsgBox(0, "Debug", "WinClose return value = " & $r) EndFunc
×