Jump to content

Birdy1499

Members
  • Posts

    2
  • Joined

  • Last visited

Birdy1499's Achievements

Seeker

Seeker (1/7)

0

Reputation

  1. Thanks a bunch runs great, cleaned up the code as well, #include <MsgBoxConstants.au3> #RequireAdmin Reboot() Func Reboot() ; Asks the user to enter a time in minutes. Local $Sec = InputBox("SET TIME FOR REBOOT", "IN MINUTES", "") $Min = 60 $Reboot = $Sec * $Min $command = ("C:\Windows\System32\shutdown.exe /r /t " & $Reboot) Run ($command) EndFunc
  2. I am trying to reboot a pc after user inputs in how many minutes until the pc reboots, I know I am overlooking something and spent about 5 hours searching for an answer with no luck. here is the code #include <MsgBoxConstants.au3> #RequireAdmin Reboot() Func Reboot() ; Asks the user to enter a time in minutes. Local $Time = InputBox("SET TIME FOR REBOOT", "IN MINUTES", "") $Min = 60 $Reboot = $Time * $Min $command = ("C:\Windows\System32\shutdown.exe /r /t" $Reboot) Run ($command) EndFunc The rest of my code after this runs fine. Basically the program autoit runs can kill a remote session and a reboot brings it back. There is no way but guessing a good reboot time so a set time does not help. It does work great when I use Run ("C:\Windows\System32\shutdown.exe /r /t 1800") I need to set the reboot time from user input.
×
×
  • Create New...