Jump to content

Recommended Posts

Guest Geordie
Posted

Hi,

I am unable to run VBS Scripts,when I double click on them the following

message appears.

Line 1

char 18

Error Expected end of statement

code 800A0401

source Microsoft VBScript compilation error.

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

Windows XP home SP3

Any advice on how to fix this problem would be much appreciated.

--

Regards,

Geordie.

Please remove (Prop) to crash spam.

Guest Pegasus \(MVP\)
Posted

Re: VBS Scripts

 

 

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

news:1u36g1xyan53x$.1drjh3q97q06o.dlg@40tude.net...

> Hi,

> I am unable to run VBS Scripts,when I double click on them the following

> message appears.

> Line 1

> char 18

> Error Expected end of statement

> code 800A0401

> source Microsoft VBScript compilation error.

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

> Windows XP home SP3

> Any advice on how to fix this problem would be much appreciated.

> --

> Regards,

> Geordie.

> Please remove (Prop) to crash spam.

 

Let's have a look at your script!

Guest PaulM
Posted

Re: VBS Scripts

 

Can you post the script here?

 

--

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

http://www.paulsxp.com

http://www.paulsxp.com/forum

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

 

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

news:1u36g1xyan53x$.1drjh3q97q06o.dlg@40tude.net...

> Hi,

> I am unable to run VBS Scripts,when I double click on them the following

> message appears.

> Line 1

> char 18

> Error Expected end of statement

> code 800A0401

> source Microsoft VBScript compilation error.

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

> Windows XP home SP3

> Any advice on how to fix this problem would be much appreciated.

> --

> Regards,

> Geordie.

> Please remove (Prop) to crash spam.

Guest Geordie
Posted

Re: VBS Scripts

 

On Mon, 26 May 2008 22:07:56 +0200, Pegasus (MVP) wrote:

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

> news:1u36g1xyan53x$.1drjh3q97q06o.dlg@40tude.net...

>> Hi,

>> I am unable to run VBS Scripts,when I double click on them the following

>> message appears.

>> Line 1

>> char 18

>> Error Expected end of statement

>> code 800A0401

>> source Microsoft VBScript compilation error.

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

>> Windows XP home SP3

>> Any advice on how to fix this problem would be much appreciated.

>> --

>> Regards,

>> Geordie.

>> Please remove (Prop) to crash spam.

>

> Let's have a look at your script!

 

Thanks for the reply,

 

This is one of them.

 

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

MYRP = IRP.createrestorepoint ("Quick Restore Point", 0, 100)

--

Regards,

Geordie.

Please remove (Prop) to crash spam.

Guest Geordie
Posted

Re: VBS Scripts

 

On Mon, 26 May 2008 17:42:05 -0400, PaulM wrote:

> Can you post the script here?

 

Hi,

 

This is another one downloaded from Doug Knox's site.

 

'Unattended System Restore Point

'sysrestorepoint.vbs

'© Doug Knox - rev 02/11/2002

'Downloaded from http://www.dougknox.com

'Extracted from original code by Bill James - http://www.billsway.com

 

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

 

msg = "New Restore Point successfully created." & vbCR

msg = msg & "It is listed as: " & vbCR

msg = msg & "Automatic Restore Point " & Date & " " & Time

 

'Put a ' in front of the next five lines to disable the Success Failed

Prompt.

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

MsgBox msg

Else

MsgBox "Restore Point creation Failed!"

End If

 

'Remove the ' from the next 3 lines to only alert you if the process failed

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

' MsgBox "Restore Point creation Failed!"

'End If

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

This is the error message for this one

Script C:\downloads\xpsysrestorepoint.

line 14

char 1

Error no such interface supported

Code 80004002

Source SWbemObjectEX

--

Regards,

Geordie.

Please remove (Prop) to crash spam.

Guest PaulM
Posted

Re: VBS Scripts

 

Are you saying the script from Doug's site does not work?

 

--

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

http://www.paulsxp.com

http://www.paulsxp.com/forum

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

 

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

news:1q2wtpq1kq336.1if170kw7zs10$.dlg@40tude.net...

> On Mon, 26 May 2008 17:42:05 -0400, PaulM wrote:

>

>> Can you post the script here?

>

> Hi,

>

> This is another one downloaded from Doug Knox's site.

>

> 'Unattended System Restore Point

> 'sysrestorepoint.vbs

> '© Doug Knox - rev 02/11/2002

> 'Downloaded from http://www.dougknox.com

> 'Extracted from original code by Bill James - http://www.billsway.com

>

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

>

> msg = "New Restore Point successfully created." & vbCR

> msg = msg & "It is listed as: " & vbCR

> msg = msg & "Automatic Restore Point " & Date & " " & Time

>

> 'Put a ' in front of the next five lines to disable the Success Failed

> Prompt.

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

> MsgBox msg

> Else

> MsgBox "Restore Point creation Failed!"

> End If

>

> 'Remove the ' from the next 3 lines to only alert you if the process

> failed

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

> ' MsgBox "Restore Point creation Failed!"

> 'End If

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

> This is the error message for this one

> Script C:\downloads\xpsysrestorepoint.

> line 14

> char 1

> Error no such interface supported

> Code 80004002

> Source SWbemObjectEX

> --

> Regards,

> Geordie.

> Please remove (Prop) to crash spam.

Guest Geordie
Posted

Re: VBS Scripts

 

On Mon, 26 May 2008 21:54:08 -0400, PaulM wrote:

> Are you saying the script from Doug's site does not work?

 

Hi,

Yes,that is correct both scripts from Doug's site do not work.

--

Regards,

Geordie.

Please remove (Prop) to crash spam.

Guest PaulM
Posted

Re: VBS Scripts

 

You mean this script does not work:

 

 

WScript.Echo "Click Ok to Start Restore Point, this will take about 10

seconds."

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

msg = "New Restore Point successfully created." & vbCR

msg = msg & "It is listed as: " & vbCR

msg = msg & "Automatic Restore Point " & Date & " " & Time

 

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

MsgBox msg

Else

MsgBox "Restore Point creation Failed!"

End If

 

Set sr = Nothing

 

--

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

http://www.paulsxp.com

http://www.paulsxp.com/forum

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

 

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

news:1dcn90fx9in9$.j2hp5r5rbkrf.dlg@40tude.net...

> On Mon, 26 May 2008 21:54:08 -0400, PaulM wrote:

>

>> Are you saying the script from Doug's site does not work?

>

> Hi,

> Yes,that is correct both scripts from Doug's site do not work.

> --

> Regards,

> Geordie.

> Please remove (Prop) to crash spam.

Guest Geordie
Posted

Re: VBS Scripts

 

On Tue, 27 May 2008 00:02:05 -0400, PaulM wrote:

> You mean this script does not work:

>

>

> WScript.Echo "Click Ok to Start Restore Point, this will take about 10

> seconds."

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

> msg = "New Restore Point successfully created." & vbCR

> msg = msg & "It is listed as: " & vbCR

> msg = msg & "Automatic Restore Point " & Date & " " & Time

>

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

> MsgBox msg

> Else

> MsgBox "Restore Point creation Failed!"

> End If

>

> Set sr = Nothing

 

That is correct, it does not work.

--

Regards,

Geordie.

Please remove (Prop) to crash spam.

Guest PaulM
Posted

Re: VBS Scripts

 

And what is the error?

 

 

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

news:1qb9ltqgwr2pi.1wciumb8iqqyh.dlg@40tude.net...

> On Tue, 27 May 2008 00:02:05 -0400, PaulM wrote:

>

>> You mean this script does not work:

>>

>>

>> WScript.Echo "Click Ok to Start Restore Point, this will take about 10

>> seconds."

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

>> msg = "New Restore Point successfully created." & vbCR

>> msg = msg & "It is listed as: " & vbCR

>> msg = msg & "Automatic Restore Point " & Date & " " & Time

>>

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

>> MsgBox msg

>> Else

>> MsgBox "Restore Point creation Failed!"

>> End If

>>

>> Set sr = Nothing

>

> That is correct, it does not work.

> --

> Regards,

> Geordie.

> Please remove (Prop) to crash spam.

Guest Geordie
Posted

Re: VBS Scripts

 

On Tue, 27 May 2008 00:17:22 -0400, PaulM wrote:

> And what is the error?

line 1

char 72

Error unterminated string constant

code 800A0409

Source Micosoft VB Script compilation error

 

 

--

Regards,

Geordie.

Please remove (Prop) to crash spam.

Guest Pegasus \(MVP\)
Posted

Re: VBS Scripts

 

 

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

news:rpkxqb9zvo09$.1keq3poip55ua.dlg@40tude.net...

> On Tue, 27 May 2008 00:17:22 -0400, PaulM wrote:

>

>> And what is the error?

> line 1

> char 72

> Error unterminated string constant

> code 800A0409

> Source Micosoft VB Script compilation error

>

>

> --

> Regards,

> Geordie.

> Please remove (Prop) to crash spam.

 

What happens when you run this code?

 

WScript.Echo "Click Ok to Start"

 

and this one:

 

WScript.Echo "Click Ok to Start"

line = "winmgmts:\\.\root\default:Systemrestore"

Set sr = GetObject(line)

msg = "New Restore Point created." & vbCr

msg = msg & "It is listed as: " & vbCr

line = "Automatic Restore Point"

If (sr.createrestorepoint("Line", 0, 100)) = 0 Then

MsgBox msg

Else

MsgBox "Restore Point creation Failed!"

End If

Guest PaulM
Posted

Re: VBS Scripts

 

Line 1 does not have 72 chars in it?

Did you edit the script in any way?

Because it works on XP and Vista.

 

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

news:rpkxqb9zvo09$.1keq3poip55ua.dlg@40tude.net...

> On Tue, 27 May 2008 00:17:22 -0400, PaulM wrote:

>

>> And what is the error?

> line 1

> char 72

> Error unterminated string constant

> code 800A0409

> Source Micosoft VB Script compilation error

>

>

> --

> Regards,

> Geordie.

> Please remove (Prop) to crash spam.

Guest Pegasus \(MVP\)
Posted

Re: VBS Scripts

 

 

"PaulM" <paul@paulsxp.com> wrote in message

news:OSogMB8vIHA.5448@TK2MSFTNGP04.phx.gbl...

> Line 1 does not have 72 chars in it?

> Did you edit the script in any way?

> Because it works on XP and Vista.

 

I have a strong suspicion that the OP is saving his

script in one file and that he is executing a completly

different file. This would explain all of his problems.

Guest PaulM
Posted

Re: VBS Scripts

 

He is doing something wrong. I even redid some of the script and I tested it

on XP and Vista and it works.

 

 

"Pegasus (MVP)" <I.can@fly.com.oz> wrote in message

news:ep6RSD8vIHA.2292@TK2MSFTNGP05.phx.gbl...

>

> "PaulM" <paul@paulsxp.com> wrote in message

> news:OSogMB8vIHA.5448@TK2MSFTNGP04.phx.gbl...

>> Line 1 does not have 72 chars in it?

>> Did you edit the script in any way?

>> Because it works on XP and Vista.

>

> I have a strong suspicion that the OP is saving his

> script in one file and that he is executing a completly

> different file. This would explain all of his problems.

>

Guest PaulM
Posted

Re: VBS Scripts

 

Here is the new one.

 

 

'Auto Restore Point for Vista

set WshShell = CreateObject("WScript.Shell")

Result = WshShell.Popup("System Restore will start in 5 seconds", 5,

"AutoRestore", 65)

Result = WshShell.Popup("It will take about 10 seconds to create the file."

,4, "Creating File",65)

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

phm = "New Restore Point successfully created." & vbCR

phm = phm & "It is listed as: "

phm = phm & "Automatic Restore Point " & vbCR & Date & " " & Time

 

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

MsgBox phm

Else

MsgBox "Restore Point creation Failed!"

End If

 

Set sr = Nothing

 

"Pegasus (MVP)" <I.can@fly.com.oz> wrote in message

news:ep6RSD8vIHA.2292@TK2MSFTNGP05.phx.gbl...

>

> "PaulM" <paul@paulsxp.com> wrote in message

> news:OSogMB8vIHA.5448@TK2MSFTNGP04.phx.gbl...

>> Line 1 does not have 72 chars in it?

>> Did you edit the script in any way?

>> Because it works on XP and Vista.

>

> I have a strong suspicion that the OP is saving his

> script in one file and that he is executing a completly

> different file. This would explain all of his problems.

>

Guest Geordie
Posted

Re: VBS Scripts

 

On Tue, 27 May 2008 07:07:25 +0200, Pegasus (MVP) wrote:

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

> news:rpkxqb9zvo09$.1keq3poip55ua.dlg@40tude.net...

>> On Tue, 27 May 2008 00:17:22 -0400, PaulM wrote:

>>

>>> And what is the error?

>> line 1

>> char 72

>> Error unterminated string constant

>> code 800A0409

>> Source Micosoft VB Script compilation error

>>

>>

>> --

>> Regards,

>> Geordie.

>> Please remove (Prop) to crash spam.

>

> What happens when you run this code?

>

> WScript.Echo "Click Ok to Start"

>

> and this one:

>

> WScript.Echo "Click Ok to Start"

> line = "winmgmts:\\.\root\default:Systemrestore"

> Set sr = GetObject(line)

> msg = "New Restore Point created." & vbCr

> msg = msg & "It is listed as: " & vbCr

> line = "Automatic Restore Point"

> If (sr.createrestorepoint("Line", 0, 100)) = 0 Then

> MsgBox msg

> Else

> MsgBox "Restore Point creation Failed!"

> End If

 

Hi,

When the above is run, this is the error message that I get.

 

line 8

char 1

Error no such interface supported.

Code 80004002

Source SWbemObjectEx

--

Regards,

Geordie.

Please remove (Prop) to crash spam.

Guest Geordie
Posted

Re: VBS Scripts

 

On Tue, 27 May 2008 02:21:10 -0400, PaulM wrote:

> Here is the new one.

>

>

> 'Auto Restore Point for Vista

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

> Result = WshShell.Popup("System Restore will start in 5 seconds", 5,

> "AutoRestore", 65)

> Result = WshShell.Popup("It will take about 10 seconds to create the file."

> ,4, "Creating File",65)

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

> phm = "New Restore Point successfully created." & vbCR

> phm = phm & "It is listed as: "

> phm = phm & "Automatic Restore Point " & vbCR & Date & " " & Time

>

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

> MsgBox phm

> Else

> MsgBox "Restore Point creation Failed!"

> End If

 

Hi,

Thanks for your help,when I try to use the above script,this is the error

message that appears.

 

line 1

char 14

Error Expected end of statement

code 800A0401

source microsoft VBScript compilation error

 

 

--

Regards,

Geordie.

Please remove (Prop) to crash spam.

Guest PaulM
Posted

Re: VBS Scripts

 

I do not know what you are doing wrong, but the script works for everyone

else.

 

--

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

http://www.paulsxp.com

http://www.paulsxp.com/forum

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

 

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

news:18anuej700yfd.1u5rvh4w162lh.dlg@40tude.net...

> On Tue, 27 May 2008 07:07:25 +0200, Pegasus (MVP) wrote:

>

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

>> news:rpkxqb9zvo09$.1keq3poip55ua.dlg@40tude.net...

>>> On Tue, 27 May 2008 00:17:22 -0400, PaulM wrote:

>>>

>>>> And what is the error?

>>> line 1

>>> char 72

>>> Error unterminated string constant

>>> code 800A0409

>>> Source Micosoft VB Script compilation error

>>>

>>>

>>> --

>>> Regards,

>>> Geordie.

>>> Please remove (Prop) to crash spam.

>>

>> What happens when you run this code?

>>

>> WScript.Echo "Click Ok to Start"

>>

>> and this one:

>>

>> WScript.Echo "Click Ok to Start"

>> line = "winmgmts:\\.\root\default:Systemrestore"

>> Set sr = GetObject(line)

>> msg = "New Restore Point created." & vbCr

>> msg = msg & "It is listed as: " & vbCr

>> line = "Automatic Restore Point"

>> If (sr.createrestorepoint("Line", 0, 100)) = 0 Then

>> MsgBox msg

>> Else

>> MsgBox "Restore Point creation Failed!"

>> End If

>

> Hi,

> When the above is run, this is the error message that I get.

>

> line 8

> char 1

> Error no such interface supported.

> Code 80004002

> Source SWbemObjectEx

> --

> Regards,

> Geordie.

> Please remove (Prop) to crash spam.

Guest Pegasus \(MVP\)
Posted

Re: VBS Scripts

 

As I said before, I can smell a rat. Let's try and nail this one

down. Please follow the instructions below ***verbatim***,

without deviating one bit!

1. Click Start / Run / cmd{OK}

This will give you a black Command Prompt screen.

2. Type these commands:

echo wscript.echo "Hello world" > c:\test.vbs{Enter}

%SystemRoot%\system32\cscript.exe c:\test.vbs{Enter}

3. Report what you see on the screen.

Guest Geordie
Posted

Re: VBS Scripts

 

On Tue, 27 May 2008 22:13:28 +0200, Pegasus (MVP) wrote:

> As I said before, I can smell a rat. Let's try and nail this one

> down. Please follow the instructions below ***verbatim***,

> without deviating one bit!

> 1. Click Start / Run / cmd{OK}

> This will give you a black Command Prompt screen.

> 2. Type these commands:

> echo wscript.echo "Hello world" > c:\test.vbs{Enter}

> %SystemRoot%\system32\cscript.exe c:\test.vbs{Enter}

> 3. Report what you see on the screen.

 

Hi,

Thanks for your help & patience.

These are the results.

Clicked Start..Run..typed cmd...OK

Black screen appeared with this. C:\Documents and Setting\Maurice>

I typed in. echo wscript.echo "Hello world" > c:\test.vbs then Enter

The screen then went to. C:\Documents and Setting\Maurice>

I then typed.%SystemRoot%\system32\cscript.exe c:\test.vbs then Enter

Screen reported this Microsoft <R> Windows Script Host Version 5.6

copyright <C> Microsoft Corp 1996-2001 all rights reserved.

Hello world

C:\Documents and Setting\Maurice>

 

What started this thread, I had a restore.vbs file which I got off Doug's

site,it has been on my PC for at least 2 years and has not been altered or

even moved,it used to work on numerous occasions until I upgraded to SP3

then I started to get the error message.I copied the file and tested it on

another PC the same as mine XP home SP3 and it worked fine.

I only used to double click the file and it would work,I don't understand

what I can be doing wrong with a simple double click.

Thanks

 

--

Regards,

Geordie.

Please remove (Prop) to crash spam.

Guest Pegasus \(MVP\)
Posted

Re: VBS Scripts

 

 

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

news:i928oc1qhjc9$.wnig5o5rux1o.dlg@40tude.net...

> On Tue, 27 May 2008 22:13:28 +0200, Pegasus (MVP) wrote:

>

>> As I said before, I can smell a rat. Let's try and nail this one

>> down. Please follow the instructions below ***verbatim***,

>> without deviating one bit!

>> 1. Click Start / Run / cmd{OK}

>> This will give you a black Command Prompt screen.

>> 2. Type these commands:

>> echo wscript.echo "Hello world" > c:\test.vbs{Enter}

>> %SystemRoot%\system32\cscript.exe c:\test.vbs{Enter}

>> 3. Report what you see on the screen.

>

> Hi,

> Thanks for your help & patience.

> These are the results.

> Clicked Start..Run..typed cmd...OK

> Black screen appeared with this. C:\Documents and Setting\Maurice>

> I typed in. echo wscript.echo "Hello world" > c:\test.vbs then Enter

> The screen then went to. C:\Documents and Setting\Maurice>

> I then typed.%SystemRoot%\system32\cscript.exe c:\test.vbs then Enter

> Screen reported this Microsoft <R> Windows Script Host Version 5.6

> copyright <C> Microsoft Corp 1996-2001 all rights reserved.

> Hello world

> C:\Documents and Setting\Maurice>

>

> What started this thread, I had a restore.vbs file which I got off Doug's

> site,it has been on my PC for at least 2 years and has not been altered or

> even moved,it used to work on numerous occasions until I upgraded to SP3

> then I started to get the error message.I copied the file and tested it on

> another PC the same as mine XP home SP3 and it worked fine.

> I only used to double click the file and it would work,I don't understand

> what I can be doing wrong with a simple double click.

> Thanks

>

> --

> Regards,

> Geordie.

> Please remove (Prop) to crash spam.

 

The result of this test proves that in the previous tests you ran

a script other than the one you thought you were running. You

should now build up on this knowledge by doing the following:

1. Click Start / Run / cmd{OK}

This will give you a black Command Prompt screen.

2. Type these commands:

cd /d c:\Windows{Enter}

notepad restore.vbs{Enter}

{Paste the lines from Doug Knox's site into this file}

{Save & close the file}

%SystemRoot%\system32\cscript.exe c:\windows\restore.vbs{Enter}

c:\windows\restore.vbs{Enter}

3. Report what you see on the screen. I expect the results from the

last two commands to be the same.

Guest Geordie
Posted

Re: VBS Scripts

 

On Tue, 27 May 2008 23:57:18 +0200, Pegasus (MVP) wrote:

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

> news:i928oc1qhjc9$.wnig5o5rux1o.dlg@40tude.net...

>> On Tue, 27 May 2008 22:13:28 +0200, Pegasus (MVP) wrote:

>>

>>> As I said before, I can smell a rat. Let's try and nail this one

>>> down. Please follow the instructions below ***verbatim***,

>>> without deviating one bit!

>>> 1. Click Start / Run / cmd{OK}

>>> This will give you a black Command Prompt screen.

>>> 2. Type these commands:

>>> echo wscript.echo "Hello world" > c:\test.vbs{Enter}

>>> %SystemRoot%\system32\cscript.exe c:\test.vbs{Enter}

>>> 3. Report what you see on the screen.

>>

>> Hi,

>> Thanks for your help & patience.

>> These are the results.

>> Clicked Start..Run..typed cmd...OK

>> Black screen appeared with this. C:\Documents and Setting\Maurice>

>> I typed in. echo wscript.echo "Hello world" > c:\test.vbs then Enter

>> The screen then went to. C:\Documents and Setting\Maurice>

>> I then typed.%SystemRoot%\system32\cscript.exe c:\test.vbs then Enter

>> Screen reported this Microsoft <R> Windows Script Host Version 5.6

>> copyright <C> Microsoft Corp 1996-2001 all rights reserved.

>> Hello world

>> C:\Documents and Setting\Maurice>

>>

>> What started this thread, I had a restore.vbs file which I got off Doug's

>> site,it has been on my PC for at least 2 years and has not been altered or

>> even moved,it used to work on numerous occasions until I upgraded to SP3

>> then I started to get the error message.I copied the file and tested it on

>> another PC the same as mine XP home SP3 and it worked fine.

>> I only used to double click the file and it would work,I don't understand

>> what I can be doing wrong with a simple double click.

>> Thanks

>>

>> --

>> Regards,

>> Geordie.

>> Please remove (Prop) to crash spam.

>

> The result of this test proves that in the previous tests you ran

> a script other than the one you thought you were running. You

> should now build up on this knowledge by doing the following:

> 1. Click Start / Run / cmd{OK}

> This will give you a black Command Prompt screen.

> 2. Type these commands:

> cd /d c:\Windows{Enter}

> notepad restore.vbs{Enter}

> {Paste the lines from Doug Knox's site into this file}

> {Save & close the file}

> %SystemRoot%\system32\cscript.exe c:\windows\restore.vbs{Enter}

> c:\windows\restore.vbs{Enter}

> 3. Report what you see on the screen. I expect the results from the

> last two commands to be the same.

 

Hi,

When I get to this part

%SystemRoot%\system32\cscript.exe c:\windows\restore.vbs{Enter}

I get this message on the screen

Microsoft <R> windows scripthost Ver 5.6

copyright <C> Microsoft Corp 1996-2001 all rights reserved.

c:\windows\restore.vbs <2, 17> SWbemObject:no such interface reported.

Then after c:\windows\restore.vbs{Enter}

A error messagae appears in a small blue box with the heading Windows

Script Host

line 2

char 1

Error No such interface supported

Code 80004002

Source SWbemObjectEX

 

--

Regards,

Geordie.

Please remove (Prop) to crash spam.

Guest Pegasus \(MVP\)
Posted

Re: VBS Scripts

 

 

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

news:wpqlfpmzd5ec.eft4thaqaxk2$.dlg@40tude.net...

> On Tue, 27 May 2008 02:21:10 -0400, PaulM wrote:

>

>> Here is the new one.

>>

>>

>> 'Auto Restore Point for Vista

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

>> Result = WshShell.Popup("System Restore will start in 5 seconds", 5,

>> "AutoRestore", 65)

>> Result = WshShell.Popup("It will take about 10 seconds to create the

>> file."

>> ,4, "Creating File",65)

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

>> phm = "New Restore Point successfully created." & vbCR

>> phm = phm & "It is listed as: "

>> phm = phm & "Automatic Restore Point " & vbCR & Date & " " & Time

>>

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

>> MsgBox phm

>> Else

>> MsgBox "Restore Point creation Failed!"

>> End If

>

> Hi,

> Thanks for your help,when I try to use the above script,this is the error

> message that appears.

>

> line 1

> char 14

> Error Expected end of statement

> code 800A0401

> source microsoft VBScript compilation error

>

>

> --

> Regards,

> Geordie.

> Please remove (Prop) to crash spam.

 

Sorry, your response is inherently contradictory. Line 1 of the code

you show is a comment line, hence it cannot possible generate an

error message.

 

Instead of trying to leap shortly after you have learnt to crawl, try

to walk first. Here is how you can it it, using your own script as a

starting point.

1. Click Start / Run / cmd{OK}.

2. Type this commands:

cd /d c:\{Enter}

notepad c:\test.vbs{Enter}

{Click OK when prompted to create a new file}

{copy & paste these 6 lines into your notepad session:}

'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

{Save & close the file}

cscript c:\test.vbs{Enter}

3. Report the result

Guest Geordie
Posted

Re: VBS Scripts

 

 

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

 

 

> Sorry, your response is inherently contradictory. Line 1 of the code

> you show is a comment line, hence it cannot possible generate an

> error message.

>

> Instead of trying to leap shortly after you have learnt to crawl, try

> to walk first. Here is how you can it it, using your own script as a

> starting point.

> 1. Click Start / Run / cmd{OK}.

> 2. Type this commands:

> cd /d c:\{Enter}

> notepad c:\test.vbs{Enter}

> {Click OK when prompted to create a new file}

> {copy & paste these 6 lines into your notepad session:}

> '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

> {Save & close the file}

> cscript c:\test.vbs{Enter}

> 3. Report the result

 

 

--

Regards,

Geordie.

Please remove (Prop) to crash spam.

×
×
  • Create New...