Jump to content

fawder

Members
  • Posts

    12
  • Joined

  • Last visited

fawder's Achievements

Seeker

Seeker (1/7)

1

Reputation

  1. worked!!! ty @Subz
  2. @Bilgus correction: i just ran it again. First window opened, stopped the service and then sits at: C:\Windows\system32> once i exit, the second line runs and starts the service.
  3. Hi @Bilgus i tried that, but it opened two command windows and ran both commands at the same time. one was successful in stopping the service, the other was not successful as the service wasn't fully stopped for it to start. thanks!!
  4. my workaround for now until i can learn how to code and have the commands(stop and start the service) within the AutoIT executable. #RequireAdmin Local $sUserName = "localAdmin" Local $sPassword = "localAdminPW" RunAsWait($sUserName, @ComputerName, $sPassword, 0, "C:\Directory\file.bat", @WorkingDir)
  5. well. i think the hard part is done. I will need to figure out how to start it in the same script
  6. got it to run. thanks a bunch all!! RunAsWait($sUserName, $sDomain, $sPassword, 0, @ComSpec & ' /k net stop "' & $sServiceName)
  7. i will try this. thanks Earthshine!
  8. Thanks @gillesg getting an error: System error 5 has occurred. Access is denied. C:\Users\username\Downloads\Auto IT\> -- #RequireAdmin - does this mean I need to be an administrator to run this? if so, this will not work. -- Context: End users have an application that sometimes requires the service to be restarted(stopped/started) They do not have admin rights to the computer. I'd like to create an executable that does this for them without me having to enter in the admin credentials at a prompt. -- i appreciate everyone's ideas.
  9. Thanks Earthshine - sorry i am not good at this stuff. been searching forums for the past week for this and how-to guides...
  10. Hi @Subz when I test run, I get- error: syntax error (illegal character) and a yellow dot to the left of the last line. thanks!!
  11. RunAs("username", "hostname", "password", 0, "") $CMD = 'net stop "service name has spaces"' RunWait('"' & @ComSpec & '" /k ' & $CMD, @SystemDir) I get this in the command window: System error 5 has occurred. Access is denied. C:\Windows\SysWOW64> @TheSaint i was reading old posts and saw that you had a bunch of samples out there, but was not able to see/download any of them. appreciate your help!!
  12. how can this be ran as a local admin?
×
×
  • Create New...