Author Topic: Boot Time Scan  (Read 5249 times)

0 Members and 1 Guest are viewing this topic.

lee16

  • Guest
Boot Time Scan
« on: April 05, 2005, 07:19:18 PM »
Hi all,

Is there something i can type into Start > Run to schedule a boot time scan, as i want to be able to schedule one faster then i currently can.

Thanks

--lee

Offline Lisandro

  • Avast team
  • Certainly Bot
  • *
  • Posts: 67194
Re: Boot Time Scan
« Reply #1 on: April 05, 2005, 07:42:54 PM »
Is there something i can type into Start > Run to schedule a boot time scan, as i want to be able to schedule one faster then i currently can.

I think you must 'write' an script to do it.
Do you use AutoIt to make Windows macros? I can send you the 'possible' code...
It won't be possible by a link on startup as you must change the Windows Registry to schedule...
The best things in life are free.

lee16

  • Guest
Re: Boot Time Scan
« Reply #2 on: April 05, 2005, 09:53:11 PM »
Hi Technical,

Quote
Do you use AutoIt to make Windows macros?

Nope, never heard of it.


Quote
I can send you the 'possible' code


OK

Quote
It won't be possible by a link on startup as you must change the Windows Registry to schedule...

I only ever schedule for 'next boot'

--lee

Offline Lisandro

  • Avast team
  • Certainly Bot
  • *
  • Posts: 67194
Re: Boot Time Scan
« Reply #3 on: April 05, 2005, 10:26:28 PM »
Nope, never heard of it.
http://www.autoitscript.com/autoit3/
It will be better if first you say if you would install and use it... Then I'll send you the code...

I only ever schedule for 'next boot'
I know, but to do that, it will be necessary to change the Windows Registry: you can use the avast internal command or do it manually or do it using AutoIt  :)

The best things in life are free.

lee16

  • Guest
Re: Boot Time Scan
« Reply #4 on: April 05, 2005, 10:48:58 PM »
OK ill have a practice with 'autoit' first, then ill ask for the code  :)

--lee

lee16

  • Guest
Re: Boot Time Scan
« Reply #5 on: April 05, 2005, 11:06:32 PM »
Hi Technical,

I am at a loss on how to use this program, could maybe you talk me though this (By PM if you find it easier)

--lee

Offline Lisandro

  • Avast team
  • Certainly Bot
  • *
  • Posts: 67194
Re: Boot Time Scan
« Reply #6 on: April 06, 2005, 12:13:02 AM »
I am at a loss on how to use this program, could maybe you talk me though this (By PM if you find it easier)
Lee, no problem. I can follow this thread.
Maybe the others will discover AutoIt this way.

The code will be more or less this:

Code: [Select]
Opt("TrayIconHide", 0)          ;0=show, 1=hide tray icon
$var = RegRead("HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager", "BootExecute")
$schedule = 'aswBoot.exe /A:"*" /L:"English" /archives'
RegWrite("HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager", "BootExecute", "REG_MULTI_SZ", $var & @LF & $schedule)
$end = RegRead("HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager", "BootExecute")
MsgBox(64, "avast! boot time scanning", "Sucessful!" & @LF & "Don't run this program twice!", 3)
Exit

Save it as Schedule.au3 for instance and run it!  ;)
The best things in life are free.

lee16

  • Guest
Re: Boot Time Scan
« Reply #7 on: April 06, 2005, 11:48:37 AM »
Hi Technical,

This may seem very stupid, but i can't work out where to put the code, im looking around the autoit folder (i used the Zip file install), but i can't see what to do  :-[

--lee

lee16

  • Guest
Re: Boot Time Scan
« Reply #8 on: April 06, 2005, 12:52:12 PM »
OK Technical, i worked it out  ;D

Read the help file and saw that you need something like notpad, so i used that (although i have downloaded 'Source Edit' now), but it works fine, boot time scan is working and compiled into a .exe file, and is now sitting safely on my objectdock for quick use.

Thanks Technical for the help  ;)

--lee

Offline Lisandro

  • Avast team
  • Certainly Bot
  • *
  • Posts: 67194
Re: Boot Time Scan
« Reply #9 on: April 06, 2005, 02:07:06 PM »
You're welcome...
The improvent should be read the string of the Registry key and find if the schedule is already done.
The code must be upgraded to avoid doubled scheduling...
Anyway, enjoy the best Windows macro maker  8)
The best things in life are free.

lee16

  • Guest
Re: Boot Time Scan
« Reply #10 on: April 06, 2005, 02:19:22 PM »
Hi Technical,

I'm looking at the code but I'm not sure how to stop double scheduling.

Although this code does remind me a bit of VB6 (which i can use), but looking at it logically, i would need to use an IF statement right?  ???

Something like:

Code: [Select]
$var = RegRead("HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager", "BootExecute")
IF $schedule = 'aswBoot.exe /A:"*" /L:"English" /archives' Then
MsgBox(64, "Can't Run twice", 1)


Although this could be completely wrong, as i not use this programming language before.

--lee

Offline Lisandro

  • Avast team
  • Certainly Bot
  • *
  • Posts: 67194
Re: Boot Time Scan
« Reply #11 on: April 06, 2005, 04:47:03 PM »
Yeah, you would need an IF (ELSE, ENDIF) and the StringInStr command...  ;)
The best things in life are free.

lee16

  • Guest
Re: Boot Time Scan
« Reply #12 on: April 06, 2005, 04:51:17 PM »
Quote
StringInStr command

Sorry, not used the StringInStr command before, not sure how to use it at all in fact, but ill keep looking

-lee