Auto Program Needed Need a program to carry out fixed operations on my PC automatically
#1
Posted 08 November 2010 - 08:08 AM
I would be grateful for any help this group can give me, thank you.
#4
Posted 08 November 2010 - 01:04 PM
#5
Posted 08 November 2010 - 06:49 PM
#6
Posted 09 November 2010 - 10:00 AM
So for example:
Const OverwriteExisting = True
Set objFSO = CreateObject("Scripting.FileSystemObject")
objFSO.CopyFile "C:\FSO\ScriptLog.txt" , "D:\Archive\", OverwriteExisting
becomes:
Const OverwriteExisting = True
Set objFSO = CreateObject("Scripting.FileSystemObject")
objFSO.CopyFile "<location of file>" , "<location to save file>", OverwriteExisting
Just put in the path names.
All the scripts you should need are here:
http://www.activexperts.com/activmonitor/windowsmanagement/adminscripts/filesfolders/files/
So in order to teach yourself how to do this, you create a test script that moves a single file from one place to another, and set it to run on shutdown. Reboot your computer and see if it worked.
EDIT: This example uses VBScripts to accomplish what you want, but you certainly could use batch files, shell scripts, etc.
This post has been edited by groovicus: 09 November 2010 - 10:39 AM
Reason for edit: clarification
#7
Posted 09 November 2010 - 03:28 PM
First of all I need to overcome the first hurdle, where do I write the script. Looking at information online it appears I have to open a notepad and write the script in that. Then it says I have to write it's name and extension - .bat with the option Save as: All files.
Am I right so far?
#8
Posted 09 November 2010 - 04:47 PM
Quote
MsgBox "Hello World!"
Save it as "HelloWorld.vbs" (Or any name with a .vbs extension. You need to save it with the quotes if you are using the default Windows behavior of hiding file extensions). Open up Explorer, find the file you just saved, and double-click it. Yes, it's that easy.
Try another simple one: Again start up Notepad, but enter this text:
strMyName = InputBox ("Enter your name")
MsgBox strMyName & " is my master!"
Again, save it (any name with a .vbs extension) and double-click it. Easy.
Source
Quote
It is programming, but fortunately there are so many examples freely available that you do not need to reinvent the wheel. You just need to put parts and pieces together with minor modifications.
#9
Posted 09 November 2010 - 05:31 PM
#10
Posted 09 November 2010 - 06:05 PM
strMyName = InputBox "Tony" MsgBox strMyName & " is my master!"
I got an error message saying
Script: C:\Documents and Settings\Tony\Desktop\Tony.vbs
Line: 1
Char: 22
Error: Expected end of statement
Code: 800A0401
Source: Microsoft VBScript compilation error
Still, I am happy. At least I got over that first hurdle and know how begin writing scripts. Now other scripts will begin to make sense, even to a PC dummy like me. Thanks to your help.
#11
Posted 09 November 2010 - 06:12 PM
strMyName = InputBox "Tony MsgBox strMyName & is my master!"
#12
Posted 09 November 2010 - 08:08 PM
See here : http://www.trishtech.com/win7/run_a_script_at_shutdown_in_windows_7.php
Also : http://www.windows-help-central.com/windows-shutdown-script.html
This post has been edited by Romeo29: 09 November 2010 - 08:09 PM
#13
Posted 09 November 2010 - 08:10 PM
Sounds like you are off and running!
#14
Posted 10 November 2010 - 02:33 PM
groovicus, on 09 November 2010 - 08:10 PM, said:
Sounds like you are off and running!
Yes, you've got me started on something I think I am really going to enjoy doing in the future. Obviously there is a lot to learn yet, but I will play safe by only practising with new scripts when I have my Returnil program is switched on just in case I do something really silly.
I realised later that the reason the second script didn't work properly was because I did not save the notepad with quotes like you showed me to. I'm very grateful for you suggesting script to me and only wish I had known about it years ago.
Thanks again
#15
Posted 10 November 2010 - 02:35 PM
Romeo29, on 09 November 2010 - 08:08 PM, said:
See here : http://www.trishtech.com/win7/run_a_script_at_shutdown_in_windows_7.php
Also : http://www.windows-help-central.com/windows-shutdown-script.html
Thanks, I like that first link you gave me, that's just what I was looking for.

Help


Back to top










