Jump to content

Recommended Posts

Guest Pegasus \(MVP\)
Posted

Re: VBS Scripts

 

 

"Geordie" <geordie_airProp@hotmail.com> wrote in message

news:jmg1hiel9h1$.1xw9t0j8apec2.dlg@40tude.net...

>

> Hi,

> I tried this several times and after typing the final line, cscript

> c:\test.vbs{Enter}

> The small blue box which usually reports an error appeared with the option

> of restore will start in 5 seconds OK etc then seconds later restore will

> start in 10 seconds OK etc.

>

> Regards,

> Geordie

 

This is what I expected. In other words, the first lines of your

script finally do what they are supposed to do. You must have

been off at some far flung corner of the universe when you ran

your previous script.

 

Now continue with the method I outlined before but add one

single line of code at a time to build up your confidence. I will

show you the next version of the script:

 

'Auto Restore Point for Vista

Set WshShell = CreateObject("WScript.Shell")

WshShell.Popup "Restore will start in 5 seconds", _

5, "AutoRestore", 65

WshShell.Popup "It will take 10 seconds" , 4, _

"Creating File",65

Set sr = getobject("winmgmts:\\.\root\default:Systemrestore")

 

Please do not rush into this - take it nice and easy, one

step at a time. When you fail, go back one step and try

again.

Guest Geordie
Posted

Re: VBS Scripts

 

On Wed, 28 May 2008 22:09:50 +0200, Pegasus (MVP) wrote:

> "Geordie" <geordie_airProp@hotmail.com> wrote in message

> news:jmg1hiel9h1$.1xw9t0j8apec2.dlg@40tude.net...

 

OK, I have done that and the blue box pops up just like last time.

Restore will start in 5 seconds OK cancel

after a few seconds

It will take 10 seconds.OK cancel

 

Regard,

Geordie.

>

> This is what I expected. In other words, the first lines of your

> script finally do what they are supposed to do. You must have

> been off at some far flung corner of the universe when you ran

> your previous script.

>

> Now continue with the method I outlined before but add one

> single line of code at a time to build up your confidence. I will

> show you the next version of the script:

>

> 'Auto Restore Point for Vista

> Set WshShell = CreateObject("WScript.Shell")

> WshShell.Popup "Restore will start in 5 seconds", _

> 5, "AutoRestore", 65

> WshShell.Popup "It will take 10 seconds" , 4, _

> "Creating File",65

> Set sr = getobject("winmgmts:\\.\root\default:Systemrestore")

>

> Please do not rush into this - take it nice and easy, one

> step at a time. When you fail, go back one step and try

> again.

 

 

--

Regards,

Geordie.

Please remove (Prop) to crash spam.

Guest Pegasus \(MVP\)
Posted

Re: VBS Scripts

 

 

"Geordie" <geordie_airProp@hotmail.com> wrote in message

news:12dit3p9cmq11.z5ph2s5firtc.dlg@40tude.net...

> On Wed, 28 May 2008 22:09:50 +0200, Pegasus (MVP) wrote:

>

>> "Geordie" <geordie_airProp@hotmail.com> wrote in message

>> news:jmg1hiel9h1$.1xw9t0j8apec2.dlg@40tude.net...

>

> OK, I have done that and the blue box pops up just like last time.

> Restore will start in 5 seconds OK cancel

> after a few seconds

> It will take 10 seconds.OK cancel

>

> Regard,

> Geordie.

>>

 

Good. Now as I said, keep adding lines until you have the

whole script together. You should then spend some time

thinking about what you're doing differently now compared

to before so that you get to understand why your script failed

so persistently on all previous occasions.

Guest Geordie
Posted

Re: VBS Scripts

 

On Thu, 29 May 2008 07:11:20 +0200, Pegasus (MVP) wrote:

> Good. Now as I said, keep adding lines until you have the

> whole script together. You should then spend some time

> thinking about what you're doing differently now compared

> to before so that you get to understand why your script failed

> so persistently on all previous occasions.

 

I tried this approx 10 times yesterday and several times today,it works OK

until I type or copy & paste the following lines as instructed.

----------------------------------------------------

If (sr.createrestorepoint("Automatic Restore Point", 0, 100)) = 0 Then

MsgBox phm

This single line when added brings up the blue box with an error message

Script C:\Test.vbs

Line 12

char 15

Error expected "end"

Code 800A03f6

Source Microsoft VBScript compilation error

-----------------------------------------------------

Else

MsgBox "Restore Point creation Failed!"

End If

----------------------------------------------------

When both lines are added, the error box after going through the 5 & 10

second routine brings up this.

Script C:\Test.vbs

Line 11

char 1

Error No such interface supported

Code 80004002

Source SWbemObjectEx

 

I have copied this file,test.vbs & tried it on 2 other PCs XP (Home SP3)

and it worked fine on both of them.

I believe that this exercise has finally proven that there is a fault on

the OS of this PC & not my typing or double clicking on files which have

been compiled by Doug Knox or Kelly etc with instructions to download,then

double click and do not work on mine but are OK on other PCs.

As PaulM stated, he doesn't know what I am doing wrong because they work

fine on everyone else's PC, this is what I could not understand from the

start of this thread and is why I originally asked for help.

I really don't know what else to try.

--

Regards,

Geordie.

Please remove (Prop) to crash spam.

Guest Pegasus \(MVP\)
Posted

Re: VBS Scripts

 

 

"Geordie" <geordie_airProp@hotmail.com> wrote in message

news:ehkwizmkcg6g.yf0vh8c8t90v$.dlg@40tude.net...

> On Thu, 29 May 2008 07:11:20 +0200, Pegasus (MVP) wrote:

>> Good. Now as I said, keep adding lines until you have the

>> whole script together. You should then spend some time

>> thinking about what you're doing differently now compared

>> to before so that you get to understand why your script failed

>> so persistently on all previous occasions.

>

> I tried this approx 10 times yesterday and several times today,it works OK

> until I type or copy & paste the following lines as instructed.

> ----------------------------------------------------

> If (sr.createrestorepoint("Automatic Restore Point", 0, 100)) = 0 Then

> MsgBox phm

> This single line when added brings up the blue box with an error message

> Script C:\Test.vbs

> Line 12

> char 15

> Error expected "end"

> Code 800A03f6

> Source Microsoft VBScript compilation error

> -----------------------------------------------------

> Else

> MsgBox "Restore Point creation Failed!"

> End If

> ----------------------------------------------------

> When both lines are added, the error box after going through the 5 & 10

> second routine brings up this.

> Script C:\Test.vbs

> Line 11

> char 1

> Error No such interface supported

> Code 80004002

> Source SWbemObjectEx

>

> I have copied this file,test.vbs & tried it on 2 other PCs XP (Home SP3)

> and it worked fine on both of them.

> I believe that this exercise has finally proven that there is a fault on

> the OS of this PC & not my typing or double clicking on files which have

> been compiled by Doug Knox or Kelly etc with instructions to download,then

> double click and do not work on mine but are OK on other PCs.

> As PaulM stated, he doesn't know what I am doing wrong because they work

> fine on everyone else's PC, this is what I could not understand from the

> start of this thread and is why I originally asked for help.

> I really don't know what else to try.

> --

> Regards,

> Geordie.

 

If I was in your situation then I would try the script on

some other machine. There are two possible outcomes:

a) If it works there then there is something wrong with your PC.

You may have to reload Windows from scratch.

b) If it does not work there then there is something wrong with

the way you're doing things. Get someone who knows about

programming to look over your shoulder while you're creating

and running this code.

There is a third option, which I do not recommend: Open up

your PC for remote access so that I can see for myself what's

going on. Drop me a line on pegasus_fnlATyahooDOTcom

if you wish to consider this option. Other than this I will now

stop monitoring this thread.

×
×
  • Create New...