Jump to content

This site uses cookies. By continuing to browse the site you are agreeing to our use of cookies. Find out more here. X
X


Photo

Continue after reboot


  • Please log in to reply
8 replies to this topic

#1 willichan

willichan

    Go ahead. You know you want to scan it.

  • Active Members
  • PipPipPipPipPipPip
  • 707 posts

Posted 18 February 2011 - 07:48 PM

I have seen a few requests for the ability to continue a script after a reboot. I do this all the time, especially during holiday shutdown each year when I have a laundry list of tasks to perform on all systems. I have had as many as 40+ tasks, many of which reboot themselves, or won't continue if they see another installation that has not reboot yet (gotta love Microsoft).

Here is the shell script that I used to get it done.

Version 1
Spoiler


------
Here's my new version. Some people had trouble remembering not to skip numbers, or to keep them in order, so this one puts it all in an array, so you don't have to manually keep track of task IDs.

Version 2
Spoiler


------
MSUpdates Module
Spoiler


--Edit--
Added Version 2 of script
modified log path in Version 2 (see posts 5&6)
Added MSUpdates module

Edited by willichan, 30 December 2011 - 05:43 PM.

  • notime likes this







#2 guinness

guinness

    all-consuming swarm in inconspicuous disguise

  • Developers
  • 17,232 posts

Posted 18 February 2011 - 08:29 PM

Nice! Haven't tested yet but I did something similar too.

Example List: _AdapterConnections()_AlwaysRun()_AppMon()_AppMonEx()_BinaryBin()_CheckMsgBox()_CmdLineRaw()_ContextMenu()_ConvertLHWebColor()/_ConvertSHWebColor()_DesktopDimensions()_DisplayPassword()_Fibonacci()_FileCompare()_FileCompareContents()_FileNameByHandle()_FilePrefix/SRE()_FindInFile()_GetBackgroundColor()/_SetBackgroundColor()_GetConrolID()_GetCtrlClass()_GetDirectoryFormat()_GetDriveMediaType()_GetFilename()/_GetFilenameExt()_GetHardwareID()_GetIP()_GetIP_Country()_GetOSLanguage()_GetSavedSource()_GetStringSize()_GetSystemPaths()_GetURLImage()_GIFImage()_GoogleWeather()_GUICtrlCreateGroup()_GUICtrlListBox_CreateArray()_GUICtrlListView_CreateArray()_GUICtrlListView_SaveCSV()_GUICtrlListView_SaveHTML()_GUICtrlListView_SaveTxt()_GUICtrlListView_SaveXML()_GUICtrlMenu_Recent()_GUICtrlMenu_SetItemImage()_GUICtrlTreeView_CreateArray()_GUIDisable()_GUIImageList_SetIconFromHandle()_GUIRegisterMsg()_GUISetIcon()_Icon_Clear()/_Icon_Set()_IdleTime()_InetGet()_InetGetGUI()_InetGetProgress()_IPDetails()_IsFileOlder()_IsGUID()_IsHex()_IsPalindrome()_IsRegKey()_IsStringRegExp()_IsSystemDrive()_IsUPX()_IsValidType()_IsWebColor()_Language()_Log()_MicrosoftInternetConnectivity()_MSDNDataType()_PathFull/GetRelative/Split()_PathSplitEx()_PrintFromArray()_ProgressSetMarquee()_ReDim()_RockPaperScissors()/_RockPaperScissorsLizardSpock()_ScrollingCredits_SelfDelete()_SelfRename()_SelfUpdate()_SendTo()_ShellAll()_ShellFile()_ShellFolder()_SingletonHWID()_SingletonPID()_Startup()_StringCompact()_StringIsValid()_StringRegExpMetaCharacters()_StringReplaceWholeWord()_StringStripChars()_Temperature()_TrialPeriod()_UKToUSDate()/_USToUKDate()_WinAPI_Create_CTL_CODE()_WinAPI_CreateGUID()_WMIDateStringToDate()/_DateToWMIDateString()Au3 script parsingAutoIt SearchAutoIt3 PortableAutoIt3WrapperToPragmaAutoItWinGetTitle()/AutoItWinSetTitle()CodingDirToHTML5FileInstallrGeoIP databaseGUI - Only Close ButtonGUI ExamplesGUICtrlDeleteImage()GUICtrlGetBkColor()GUICtrlGetStyle()GUIEventsGUIGetBkColor()LockFile()Mapping CtrlIDsParseHeadersToSciTE()PasswordValidPasteBinPosts Per DayPreExpandQueue()Resource UpdateResourcesExSciTE JumpSettings INISHELLHOOKShunting-YardSignature CreatorStack()Stopwatch()StringAddLF()/StringStripLF()StringEOLToCRLF()VSCROLLWM_COPYDATAMore Examples...
Updated: 30/07/2014


#3 willichan

willichan

    Go ahead. You know you want to scan it.

  • Active Members
  • PipPipPipPipPipPip
  • 707 posts

Posted 28 December 2011 - 09:24 PM

I did a rewrite of this shell to accommodate some people that were editing my scripts, but couldn't remember to keep tasks IDs consecutive. This new one is going into use for 2011 end-of-year cleanup. See post #1 for both versions.

#4 Chimaera

Chimaera

    Sorry .. Where am i again?

  • Active Members
  • PipPipPipPipPipPip
  • 1,952 posts

Posted 29 December 2011 - 07:37 AM

Thanks for sharing, ill have a look and report back.

If Ive just helped you ... miracles do happen. Chimaera 

 

CopyRobo() * Hidden Admin Account Enabler * Software Location From Registry * Find Display Resolution * _ChangeServices()


#5 guinness

guinness

    all-consuming swarm in inconspicuous disguise

  • Developers
  • 17,232 posts

Posted 29 December 2011 - 08:28 AM

I personally wouldn't hard-code the C: drive destination but instead opt for saving to a different location such as @AppDataCommonDir.

Example List: _AdapterConnections()_AlwaysRun()_AppMon()_AppMonEx()_BinaryBin()_CheckMsgBox()_CmdLineRaw()_ContextMenu()_ConvertLHWebColor()/_ConvertSHWebColor()_DesktopDimensions()_DisplayPassword()_Fibonacci()_FileCompare()_FileCompareContents()_FileNameByHandle()_FilePrefix/SRE()_FindInFile()_GetBackgroundColor()/_SetBackgroundColor()_GetConrolID()_GetCtrlClass()_GetDirectoryFormat()_GetDriveMediaType()_GetFilename()/_GetFilenameExt()_GetHardwareID()_GetIP()_GetIP_Country()_GetOSLanguage()_GetSavedSource()_GetStringSize()_GetSystemPaths()_GetURLImage()_GIFImage()_GoogleWeather()_GUICtrlCreateGroup()_GUICtrlListBox_CreateArray()_GUICtrlListView_CreateArray()_GUICtrlListView_SaveCSV()_GUICtrlListView_SaveHTML()_GUICtrlListView_SaveTxt()_GUICtrlListView_SaveXML()_GUICtrlMenu_Recent()_GUICtrlMenu_SetItemImage()_GUICtrlTreeView_CreateArray()_GUIDisable()_GUIImageList_SetIconFromHandle()_GUIRegisterMsg()_GUISetIcon()_Icon_Clear()/_Icon_Set()_IdleTime()_InetGet()_InetGetGUI()_InetGetProgress()_IPDetails()_IsFileOlder()_IsGUID()_IsHex()_IsPalindrome()_IsRegKey()_IsStringRegExp()_IsSystemDrive()_IsUPX()_IsValidType()_IsWebColor()_Language()_Log()_MicrosoftInternetConnectivity()_MSDNDataType()_PathFull/GetRelative/Split()_PathSplitEx()_PrintFromArray()_ProgressSetMarquee()_ReDim()_RockPaperScissors()/_RockPaperScissorsLizardSpock()_ScrollingCredits_SelfDelete()_SelfRename()_SelfUpdate()_SendTo()_ShellAll()_ShellFile()_ShellFolder()_SingletonHWID()_SingletonPID()_Startup()_StringCompact()_StringIsValid()_StringRegExpMetaCharacters()_StringReplaceWholeWord()_StringStripChars()_Temperature()_TrialPeriod()_UKToUSDate()/_USToUKDate()_WinAPI_Create_CTL_CODE()_WinAPI_CreateGUID()_WMIDateStringToDate()/_DateToWMIDateString()Au3 script parsingAutoIt SearchAutoIt3 PortableAutoIt3WrapperToPragmaAutoItWinGetTitle()/AutoItWinSetTitle()CodingDirToHTML5FileInstallrGeoIP databaseGUI - Only Close ButtonGUI ExamplesGUICtrlDeleteImage()GUICtrlGetBkColor()GUICtrlGetStyle()GUIEventsGUIGetBkColor()LockFile()Mapping CtrlIDsParseHeadersToSciTE()PasswordValidPasteBinPosts Per DayPreExpandQueue()Resource UpdateResourcesExSciTE JumpSettings INISHELLHOOKShunting-YardSignature CreatorStack()Stopwatch()StringAddLF()/StringStripLF()StringEOLToCRLF()VSCROLLWM_COPYDATAMore Examples...
Updated: 30/07/2014


#6 willichan

willichan

    Go ahead. You know you want to scan it.

  • Active Members
  • PipPipPipPipPipPip
  • 707 posts

Posted 29 December 2011 - 04:30 PM

I personally wouldn't hard-code the C: drive


I agree with you. This script comes from an internal end-of-year cleanup script, and the log file location was decided on "by committee", and gets deleted in a few days anyway. I'll change it in the top post though, when I get a few minutes this morning.

#7 JScript

JScript

    I'm back ... I miss, why not!

  • Active Members
  • PipPipPipPipPipPip
  • 1,218 posts

Posted 29 December 2011 - 11:11 PM

Very nice, thanks for sharing!!!

Regards,

João Carlos.
http://forum.autoitbrasil.com/ (AutoIt v3 Brazil!!!)
Spoiler

dropbo10.pngDownload Dropbox - Simplify your life!
Your virtual HD wherever you go, anywhere!       


#8 engjcowi

engjcowi

    Polymath

  • Active Members
  • PipPipPipPip
  • 245 posts

Posted 30 December 2011 - 01:28 PM

Great stuff look forward to testing
Drunken Frat-Boy Monkey Garbage

#9 willichan

willichan

    Go ahead. You know you want to scan it.

  • Active Members
  • PipPipPipPipPipPip
  • 707 posts

Posted 30 December 2011 - 05:48 PM

Ok. I have had alot of people contacting me, both from the forum and from without, wanting the MS Updates script. I went ahead added it to post #1.
I am glad to see that so many people are able to make use of this shell script.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users