AutoHotkey Community

It is currently May 27th, 2012, 11:02 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 11 posts ] 
Author Message
PostPosted: January 9th, 2005, 2:54 am 
I am after making a hotkey that will run a FREE spy remover e.g. adaware spybot etc. update the defs, do a full scan and remove all the spyware and then do a defrag of c.

thank you


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: January 9th, 2005, 3:52 am 
Offline

Joined: November 13th, 2004, 4:08 am
Posts: 2951
Location: Minnesota
That's quite a load there. Those kind of tasks seem too large and dynamic to automate, unless there was a tool specifically made for such automation. I'd recommend simply making a hotkey that will run Adaware, Spybot, and Defragmenter (or whatever defrag software you have), so you can start it yourself. It wouldn't be that much harder I think. Simply run the appropriate .exe's. If you want, you could even tile them on the screen using WinMove, so you wouldn't even have to switch windows.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: January 9th, 2005, 4:10 am 
Offline

Joined: April 1st, 2004, 12:00 am
Posts: 87
Location: Philippines
Well, spybot has File>Check For Problems, so maybe a winMenuItem will do. (too lazy to try it out.) Although there is nothing about updating it. Defrag... apparently, there is a command line defrag, though there is no gui at all, not even text progress indicators. You won't know the progress. (it's "defrag".)


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: January 9th, 2005, 4:01 pm 
Offline

Joined: April 28th, 2004, 1:12 pm
Posts: 349
command-line switches for Spybot S&D-
http://www.safer-networking.org/en/faq/30.html


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: January 9th, 2005, 4:05 pm 
Offline

Joined: April 28th, 2004, 1:12 pm
Posts: 349
Windows disk defragmenter can also be run via the command-line-

Quote:
Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

C:\>defrag
Windows Disk Defragmenter
Copyright (c) 2001 Microsoft Corp. and Executive Software International, Inc.
Usage:
defrag <volume> [-a] [-f] [-v] [-?]
volume drive letter or mount point (d: or d:\vol\mountpoint)
-a Analyze only
-f Force defragmentation even if free space is low
-v Verbose output
-? Display this help text


Report this post
Top
 Profile  
Reply with quote  
 Post subject: defrag error
PostPosted: May 18th, 2007, 9:21 pm 
Offline

Joined: May 11th, 2007, 1:08 pm
Posts: 26
I want to set up an automated script to do the defrag, spyware and antivirus scan. However, the defrag part is not OK. Here is the code-part:

Code:
if(driveFreeSpace/(driveCapacity/100)>15)
   {
   Run C:\WINDOWS\system32\defrag.exe C:\ /v >C:\Documents and Settings\[...]\defraglog_C.txt
   Process, WaitClose, defrag.exe
   MsgBox, defrag finished.
   }


It doesn't run off, just pop up the cmd window, and jump immediately to the MsgBox. :S Variables and expressions are ok.
What am I missing?


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: May 18th, 2007, 9:42 pm 
Offline
User avatar

Joined: August 30th, 2005, 8:43 pm
Posts: 8667
Location: Salem, MA
try putting %comspec% /c before the rest of the defrag command in the run.

_________________
Image
(Common Answers) - New Tutorials Forum - Humongous FAQ


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: May 18th, 2007, 9:52 pm 
Offline

Joined: May 11th, 2007, 1:08 pm
Posts: 26
engunneer wrote:
try putting %comspec% /c before the rest of the defrag command in the run.


I tried, but no differance. :S Could you be a bit more specific, I might have misread your previous comment. Where should I put that exactly?


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: May 18th, 2007, 9:56 pm 
Offline
User avatar

Joined: August 30th, 2005, 8:43 pm
Posts: 8667
Location: Salem, MA
Code:
Run %comspec% /k C:\WINDOWS\system32\defrag.exe C:\ -v > C:\Documents and Settings\[...]\defraglog_C.txt


use -v instead of /v, but run this like (/k is Keep, /c would be Close) to see what your error is. It may not support saving the output to a file with >. You migh need to use CMDRet (search forum for the CMDRet script)

_________________
Image
(Common Answers) - New Tutorials Forum - Humongous FAQ


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: May 18th, 2007, 9:58 pm 
Offline
User avatar

Joined: August 30th, 2005, 8:43 pm
Posts: 8667
Location: Salem, MA
Code:
Run %comspec% /k C:\WINDOWS\system32\defrag.exe C: -v > defraglog_C.txt

appears to work, just set A_WorkingDir before you start to put the file where you want.

_________________
Image
(Common Answers) - New Tutorials Forum - Humongous FAQ


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: May 18th, 2007, 10:07 pm 
Offline

Joined: May 11th, 2007, 1:08 pm
Posts: 26
engunneer wrote:
Code:
Run %comspec% /k C:\WINDOWS\system32\defrag.exe C: -v > defraglog_C.txt

appears to work, just set A_WorkingDir before you start to put the file where you want.


Seem to be OK. :)

Thanks a lot! :)


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 11 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: BrandonHotkey, Edd, Exabot [Bot], HotkeyStick, Yahoo [Bot] and 15 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group