Windows Vista Task Scheduler Problem

  • Thread starter Thread starter Keith
  • Start date Start date
K

Keith

Guest
I have a vbs script that I use to copy files from my local drive to a network
drive as a backup. The script works fine on its own (by double-clicking it
or by running it from the command prompt). I created a scheduled task to
have it run automatically, but it doesn't seem to work. It says that it
completed successfully, but it didn't really do anything. Even if I select
it in the Task Scheduler and then click "Run" in the Actions pane, it says
it's status is "Running", but nothing is happening. What am I doing wrong?

Thanks,

Keith
 
Re: Task Scheduler Problem

Create a script or bat file that runs the command:
runas /user:<yourUserName> "cscript \"yourScript.VBS\" "

--
Was this helpful? Then click the Ratings button. Voting helps the web
interface.
http://www.microsoft.com/wn3/locales/help/help_en-us.htm#RateAPostAsAnswer
Mark L. Ferguson
..

"Keith" <Keith@discussions.microsoft.com> wrote in message
news:6C1064A5-5A80-4970-A1DB-58C0A05A8415@microsoft.com...
> I have a vbs script that I use to copy files from my local drive to a
> network
> drive as a backup. The script works fine on its own (by double-clicking
> it
> or by running it from the command prompt). I created a scheduled task to
> have it run automatically, but it doesn't seem to work. It says that it
> completed successfully, but it didn't really do anything. Even if I
> select
> it in the Task Scheduler and then click "Run" in the Actions pane, it says
> it's status is "Running", but nothing is happening. What am I doing
> wrong?
>
> Thanks,
>
> Keith
 
Re: Task Scheduler Problem

Mark,

Thanks for the response. I tried creating a script which calls my script as
you suggested, and then created a scheduled task to run that new script, but
I got the same result. Do you have any other suggestions?

Thanks,

Keith


"Mark L. Ferguson" wrote:

> Create a script or bat file that runs the command:
> runas /user:<yourUserName> "cscript \"yourScript.VBS\" "
>
> --
> Was this helpful? Then click the Ratings button. Voting helps the web
> interface.
> http://www.microsoft.com/wn3/locales/help/help_en-us.htm#RateAPostAsAnswer
> Mark L. Ferguson
> .
>
> "Keith" <Keith@discussions.microsoft.com> wrote in message
> news:6C1064A5-5A80-4970-A1DB-58C0A05A8415@microsoft.com...
> > I have a vbs script that I use to copy files from my local drive to a
> > network
> > drive as a backup. The script works fine on its own (by double-clicking
> > it
> > or by running it from the command prompt). I created a scheduled task to
> > have it run automatically, but it doesn't seem to work. It says that it
> > completed successfully, but it didn't really do anything. Even if I
> > select
> > it in the Task Scheduler and then click "Run" in the Actions pane, it says
> > it's status is "Running", but nothing is happening. What am I doing
> > wrong?
> >
> > Thanks,
> >
> > Keith

>
 
Re: Task Scheduler Problem

It's very likely that the script won't run because it's calling something
that needs you to 'run as administrator'. There are several ways you might
accomplish this, but I'm not sure which one would work from Scheduled Tasks.
One direct method might be to enable the default admin, and 'runas' that
user.
Go to Start/all programs/accessories/run, and type:

control userpasswords2

Advanced tab, Advanced button, Users folder, rightclick Administrator,
Properties, uncheck checkbox for "Account is disabled"
Restart Windows.

There could be other methods, but 'runas /user:Administrator ...' would be
tested this way and you could look for other ways to accomplish this.
--
Was this helpful? Then click the Ratings button. Voting helps the web
interface.
http://www.microsoft.com/wn3/locales/help/help_en-us.htm#RateAPostAsAnswer
Mark L. Ferguson
..

"Keith" <Keith@discussions.microsoft.com> wrote in message
news:747F1A15-4206-466E-9679-AA6060305894@microsoft.com...
> Mark,
>
> Thanks for the response. I tried creating a script which calls my script
> as
> you suggested, and then created a scheduled task to run that new script,
> but
> I got the same result. Do you have any other suggestions?
>
> Thanks,
>
> Keith
>
>
> "Mark L. Ferguson" wrote:
>
>> Create a script or bat file that runs the command:
>> runas /user:<yourUserName> "cscript \"yourScript.VBS\" "
>>
>> --
>> Was this helpful? Then click the Ratings button. Voting helps the web
>> interface.
>> http://www.microsoft.com/wn3/locales/help/help_en-us.htm#RateAPostAsAnswer
>> Mark L. Ferguson
>> .
>>
>> "Keith" <Keith@discussions.microsoft.com> wrote in message
>> news:6C1064A5-5A80-4970-A1DB-58C0A05A8415@microsoft.com...
>> > I have a vbs script that I use to copy files from my local drive to a
>> > network
>> > drive as a backup. The script works fine on its own (by
>> > double-clicking
>> > it
>> > or by running it from the command prompt). I created a scheduled task
>> > to
>> > have it run automatically, but it doesn't seem to work. It says that
>> > it
>> > completed successfully, but it didn't really do anything. Even if I
>> > select
>> > it in the Task Scheduler and then click "Run" in the Actions pane, it
>> > says
>> > it's status is "Running", but nothing is happening. What am I doing
>> > wrong?
>> >
>> > Thanks,
>> >
>> > Keith

>>
 
Re: Task Scheduler Problem

Mark,

Thanks again for your input. I enabled the default Administrator as you
suggested, but I'm not sure what that will do. I have another vbs script
that also doesn't work properly. All it's supposed to do is pop up a msgbox
reminding me to do something. What's weird is that the backup one I
originally posted about says that it completed successfully, even though it
didn't do anything. I never receive any error message, it just doesn't do
what it's supposed to.

Following is the script for the backup, just in case that helps:

Dim PathVar
Dim RefNo
Dim objFSO
Dim objShell
Dim ShellString
Dim retvalue
Dim VarFilename

set objShell = Wscript.CreateObject("Wscript.Shell")

VarFilename= "xcopy " & chr(34) & "C:\Users\kgrabske\Documents\*.*" &
chr(34) & chr(32) & chr(34) & "Z:\backup\Keith\Documents\*.*" & chr(34)
VarFilename=VarFilename & " /e /y /c /h /d
/EXCLUDE:C:\Users\kgrabske\Documents\BackupExclusions.txt"

objShell.run VarFilename

There isn't much to it, and I can't figure out why special permissions would
be required. I am already running the task using my login, and I am an
administrator.

Do you have any other thoughts? I may see if Macro Scheduler will work. I
used to use that a lot, but I moved away from it in favor of XP's scheduled
tasks, which see to work much better than Vista's.

Thanks,

Keith


"Mark L. Ferguson" wrote:

> It's very likely that the script won't run because it's calling something
> that needs you to 'run as administrator'. There are several ways you might
> accomplish this, but I'm not sure which one would work from Scheduled Tasks.
> One direct method might be to enable the default admin, and 'runas' that
> user.
> Go to Start/all programs/accessories/run, and type:
>
> control userpasswords2
>
> Advanced tab, Advanced button, Users folder, rightclick Administrator,
> Properties, uncheck checkbox for "Account is disabled"
> Restart Windows.
>
> There could be other methods, but 'runas /user:Administrator ...' would be
> tested this way and you could look for other ways to accomplish this.
> --
> Was this helpful? Then click the Ratings button. Voting helps the web
> interface.
> http://www.microsoft.com/wn3/locales/help/help_en-us.htm#RateAPostAsAnswer
> Mark L. Ferguson
> ..
>
> "Keith" <Keith@discussions.microsoft.com> wrote in message
> news:747F1A15-4206-466E-9679-AA6060305894@microsoft.com...
> > Mark,
> >
> > Thanks for the response. I tried creating a script which calls my script
> > as
> > you suggested, and then created a scheduled task to run that new script,
> > but
> > I got the same result. Do you have any other suggestions?
> >
> > Thanks,
> >
> > Keith
> >
> >
> > "Mark L. Ferguson" wrote:
> >
> >> Create a script or bat file that runs the command:
> >> runas /user:<yourUserName> "cscript \"yourScript.VBS\" "
> >>
> >> --
> >> Was this helpful? Then click the Ratings button. Voting helps the web
> >> interface.
> >> http://www.microsoft.com/wn3/locales/help/help_en-us.htm#RateAPostAsAnswer
> >> Mark L. Ferguson
> >> .
> >>
> >> "Keith" <Keith@discussions.microsoft.com> wrote in message
> >> news:6C1064A5-5A80-4970-A1DB-58C0A05A8415@microsoft.com...
> >> > I have a vbs script that I use to copy files from my local drive to a
> >> > network
> >> > drive as a backup. The script works fine on its own (by
> >> > double-clicking
> >> > it
> >> > or by running it from the command prompt). I created a scheduled task
> >> > to
> >> > have it run automatically, but it doesn't seem to work. It says that
> >> > it
> >> > completed successfully, but it didn't really do anything. Even if I
> >> > select
> >> > it in the Task Scheduler and then click "Run" in the Actions pane, it
> >> > says
> >> > it's status is "Running", but nothing is happening. What am I doing
> >> > wrong?
> >> >
> >> > Thanks,
> >> >
> >> > Keith
> >>

>
 
Re: Task Scheduler Problem

I would log on as default "Administrator" and schedule the task., or at
least test the run.
If it's a permissions error, that should solve it.
--
Was this helpful? Then click the Ratings button. Voting helps the web
interface.
http://www.microsoft.com/wn3/locales/help/help_en-us.htm#RateAPostAsAnswer
Mark L. Ferguson
..

"Keith" <Keith@discussions.microsoft.com> wrote in message
news:6F83A395-D52F-4458-A692-6DCFA611F76C@microsoft.com...
> Mark,
>
> Thanks again for your input. I enabled the default Administrator as you
> suggested, but I'm not sure what that will do. I have another vbs script
> that also doesn't work properly. All it's supposed to do is pop up a
> msgbox
> reminding me to do something. What's weird is that the backup one I
> originally posted about says that it completed successfully, even though
> it
> didn't do anything. I never receive any error message, it just doesn't do
> what it's supposed to.
>
> Following is the script for the backup, just in case that helps:
>
> Dim PathVar
> Dim RefNo
> Dim objFSO
> Dim objShell
> Dim ShellString
> Dim retvalue
> Dim VarFilename
>
> set objShell = Wscript.CreateObject("Wscript.Shell")
>
> VarFilename= "xcopy " & chr(34) & "C:\Users\kgrabske\Documents\*.*" &
> chr(34) & chr(32) & chr(34) & "Z:\backup\Keith\Documents\*.*" & chr(34)
> VarFilename=VarFilename & " /e /y /c /h /d
> /EXCLUDE:C:\Users\kgrabske\Documents\BackupExclusions.txt"
>
> objShell.run VarFilename
>
> There isn't much to it, and I can't figure out why special permissions
> would
> be required. I am already running the task using my login, and I am an
> administrator.
>
> Do you have any other thoughts? I may see if Macro Scheduler will work.
> I
> used to use that a lot, but I moved away from it in favor of XP's
> scheduled
> tasks, which see to work much better than Vista's.
>
> Thanks,
>
> Keith
>
>
> "Mark L. Ferguson" wrote:
>
>> It's very likely that the script won't run because it's calling something
>> that needs you to 'run as administrator'. There are several ways you
>> might
>> accomplish this, but I'm not sure which one would work from Scheduled
>> Tasks.
>> One direct method might be to enable the default admin, and 'runas' that
>> user.
>> Go to Start/all programs/accessories/run, and type:
>>
>> control userpasswords2
>>
>> Advanced tab, Advanced button, Users folder, rightclick Administrator,
>> Properties, uncheck checkbox for "Account is disabled"
>> Restart Windows.
>>
>> There could be other methods, but 'runas /user:Administrator ...' would
>> be
>> tested this way and you could look for other ways to accomplish this.
>> --
>> Was this helpful? Then click the Ratings button. Voting helps the web
>> interface.
>> http://www.microsoft.com/wn3/locales/help/help_en-us.htm#RateAPostAsAnswer
>> Mark L. Ferguson
>> ..
>>
>> "Keith" <Keith@discussions.microsoft.com> wrote in message
>> news:747F1A15-4206-466E-9679-AA6060305894@microsoft.com...
>> > Mark,
>> >
>> > Thanks for the response. I tried creating a script which calls my
>> > script
>> > as
>> > you suggested, and then created a scheduled task to run that new
>> > script,
>> > but
>> > I got the same result. Do you have any other suggestions?
>> >
>> > Thanks,
>> >
>> > Keith
>> >
>> >
>> > "Mark L. Ferguson" wrote:
>> >
>> >> Create a script or bat file that runs the command:
>> >> runas /user:<yourUserName> "cscript \"yourScript.VBS\" "
>> >>
>> >> --
>> >> Was this helpful? Then click the Ratings button. Voting helps the web
>> >> interface.
>> >> http://www.microsoft.com/wn3/locales/help/help_en-us.htm#RateAPostAsAnswer
>> >> Mark L. Ferguson
>> >> .
>> >>
>> >> "Keith" <Keith@discussions.microsoft.com> wrote in message
>> >> news:6C1064A5-5A80-4970-A1DB-58C0A05A8415@microsoft.com...
>> >> > I have a vbs script that I use to copy files from my local drive to
>> >> > a
>> >> > network
>> >> > drive as a backup. The script works fine on its own (by
>> >> > double-clicking
>> >> > it
>> >> > or by running it from the command prompt). I created a scheduled
>> >> > task
>> >> > to
>> >> > have it run automatically, but it doesn't seem to work. It says
>> >> > that
>> >> > it
>> >> > completed successfully, but it didn't really do anything. Even if I
>> >> > select
>> >> > it in the Task Scheduler and then click "Run" in the Actions pane,
>> >> > it
>> >> > says
>> >> > it's status is "Running", but nothing is happening. What am I doing
>> >> > wrong?
>> >> >
>> >> > Thanks,
>> >> >
>> >> > Keith
>> >>

>>
 
Re: Task Scheduler Problem

Mark,

I tried logging on as administrator, and my scheduled task did the same
thing. Then I created a new scheduled task while still logged on as
administrator, and I got the same results...task completed when nothing
actually happened. Unless I can come up with a solution to this problem
soon, I will have to investigate alternatives like Macro Scheduler. I
suppose there's no guarantee that it will work any better, but I've got to do
something.

Thanks again for all of your help. I really appreciate it, even if we
haven't yet come up with a solution.

Sincerely,

Keith




"Mark L. Ferguson" wrote:

> I would log on as default "Administrator" and schedule the task., or at
> least test the run.
> If it's a permissions error, that should solve it.
> --
> Was this helpful? Then click the Ratings button. Voting helps the web
> interface.
> http://www.microsoft.com/wn3/locales/help/help_en-us.htm#RateAPostAsAnswer
> Mark L. Ferguson
> ..
>
> "Keith" <Keith@discussions.microsoft.com> wrote in message
> news:6F83A395-D52F-4458-A692-6DCFA611F76C@microsoft.com...
> > Mark,
> >
> > Thanks again for your input. I enabled the default Administrator as you
> > suggested, but I'm not sure what that will do. I have another vbs script
> > that also doesn't work properly. All it's supposed to do is pop up a
> > msgbox
> > reminding me to do something. What's weird is that the backup one I
> > originally posted about says that it completed successfully, even though
> > it
> > didn't do anything. I never receive any error message, it just doesn't do
> > what it's supposed to.
> >
> > Following is the script for the backup, just in case that helps:
> >
> > Dim PathVar
> > Dim RefNo
> > Dim objFSO
> > Dim objShell
> > Dim ShellString
> > Dim retvalue
> > Dim VarFilename
> >
> > set objShell = Wscript.CreateObject("Wscript.Shell")
> >
> > VarFilename= "xcopy " & chr(34) & "C:\Users\kgrabske\Documents\*.*" &
> > chr(34) & chr(32) & chr(34) & "Z:\backup\Keith\Documents\*.*" & chr(34)
> > VarFilename=VarFilename & " /e /y /c /h /d
> > /EXCLUDE:C:\Users\kgrabske\Documents\BackupExclusions.txt"
> >
> > objShell.run VarFilename
> >
> > There isn't much to it, and I can't figure out why special permissions
> > would
> > be required. I am already running the task using my login, and I am an
> > administrator.
> >
> > Do you have any other thoughts? I may see if Macro Scheduler will work.
> > I
> > used to use that a lot, but I moved away from it in favor of XP's
> > scheduled
> > tasks, which see to work much better than Vista's.
> >
> > Thanks,
> >
> > Keith
> >
> >
> > "Mark L. Ferguson" wrote:
> >
> >> It's very likely that the script won't run because it's calling something
> >> that needs you to 'run as administrator'. There are several ways you
> >> might
> >> accomplish this, but I'm not sure which one would work from Scheduled
> >> Tasks.
> >> One direct method might be to enable the default admin, and 'runas' that
> >> user.
> >> Go to Start/all programs/accessories/run, and type:
> >>
> >> control userpasswords2
> >>
> >> Advanced tab, Advanced button, Users folder, rightclick Administrator,
> >> Properties, uncheck checkbox for "Account is disabled"
> >> Restart Windows.
> >>
> >> There could be other methods, but 'runas /user:Administrator ...' would
> >> be
> >> tested this way and you could look for other ways to accomplish this.
> >> --
> >> Was this helpful? Then click the Ratings button. Voting helps the web
> >> interface.
> >> http://www.microsoft.com/wn3/locales/help/help_en-us.htm#RateAPostAsAnswer
> >> Mark L. Ferguson
> >> ..
> >>
> >> "Keith" <Keith@discussions.microsoft.com> wrote in message
> >> news:747F1A15-4206-466E-9679-AA6060305894@microsoft.com...
> >> > Mark,
> >> >
> >> > Thanks for the response. I tried creating a script which calls my
> >> > script
> >> > as
> >> > you suggested, and then created a scheduled task to run that new
> >> > script,
> >> > but
> >> > I got the same result. Do you have any other suggestions?
> >> >
> >> > Thanks,
> >> >
> >> > Keith
> >> >
> >> >
> >> > "Mark L. Ferguson" wrote:
> >> >
> >> >> Create a script or bat file that runs the command:
> >> >> runas /user:<yourUserName> "cscript \"yourScript.VBS\" "
> >> >>
> >> >> --
> >> >> Was this helpful? Then click the Ratings button. Voting helps the web
> >> >> interface.
> >> >> http://www.microsoft.com/wn3/locales/help/help_en-us.htm#RateAPostAsAnswer
> >> >> Mark L. Ferguson
> >> >> .
> >> >>
> >> >> "Keith" <Keith@discussions.microsoft.com> wrote in message
> >> >> news:6C1064A5-5A80-4970-A1DB-58C0A05A8415@microsoft.com...
> >> >> > I have a vbs script that I use to copy files from my local drive to
> >> >> > a
> >> >> > network
> >> >> > drive as a backup. The script works fine on its own (by
> >> >> > double-clicking
> >> >> > it
> >> >> > or by running it from the command prompt). I created a scheduled
> >> >> > task
> >> >> > to
> >> >> > have it run automatically, but it doesn't seem to work. It says
> >> >> > that
> >> >> > it
> >> >> > completed successfully, but it didn't really do anything. Even if I
> >> >> > select
> >> >> > it in the Task Scheduler and then click "Run" in the Actions pane,
> >> >> > it
> >> >> > says
> >> >> > it's status is "Running", but nothing is happening. What am I doing
> >> >> > wrong?
> >> >> >
> >> >> > Thanks,
> >> >> >
> >> >> > Keith
> >> >>
> >>

>
 
Re: Task Scheduler Problem

It's acting like you get 'access denied' on the xcopy, but that other
script's failure on simply running a popup dialog indicates something
deeper. You don't get the wscript object at all. I would say that indicates
a Policy setting against script, except that you can run a script in other
than Scheduled Tasks.
Let's write a vbs that runs in CScript, with some echos, to get a console
window.
command: cscript go.vbs
--go.vbs--
wscript.sleep 1000
wscript.echo "Echo works"
wscript.sleep 1000
shell=createobject("wscript.shell")
if shell is nothing then
wscript.echo "No Shell"
end if
wscript.sleep 3000
wscript.exit
--end file-
--
Was this helpful? Then click the Ratings button. Voting helps the web
interface.
http://www.microsoft.com/wn3/locales/help/help_en-us.htm#RateAPostAsAnswer
Mark L. Ferguson
..

"Keith" <Keith@discussions.microsoft.com> wrote in message
news:4AFCE5F0-DE85-4FC3-A5BA-B39EC4DC1BA3@microsoft.com...
> Mark,
>
> I tried logging on as administrator, and my scheduled task did the same
> thing. Then I created a new scheduled task while still logged on as
> administrator, and I got the same results...task completed when nothing
> actually happened. Unless I can come up with a solution to this problem
> soon, I will have to investigate alternatives like Macro Scheduler. I
> suppose there's no guarantee that it will work any better, but I've got to
> do
> something.
>
> Thanks again for all of your help. I really appreciate it, even if we
> haven't yet come up with a solution.
>
> Sincerely,
>
> Keith
>
>
>
>
> "Mark L. Ferguson" wrote:
>
>> I would log on as default "Administrator" and schedule the task., or at
>> least test the run.
>> If it's a permissions error, that should solve it.
>> --
>> Was this helpful? Then click the Ratings button. Voting helps the web
>> interface.
>> http://www.microsoft.com/wn3/locales/help/help_en-us.htm#RateAPostAsAnswer
>> Mark L. Ferguson
>> ..
>>
>> "Keith" <Keith@discussions.microsoft.com> wrote in message
>> news:6F83A395-D52F-4458-A692-6DCFA611F76C@microsoft.com...
>> > Mark,
>> >
>> > Thanks again for your input. I enabled the default Administrator as
>> > you
>> > suggested, but I'm not sure what that will do. I have another vbs
>> > script
>> > that also doesn't work properly. All it's supposed to do is pop up a
>> > msgbox
>> > reminding me to do something. What's weird is that the backup one I
>> > originally posted about says that it completed successfully, even
>> > though
>> > it
>> > didn't do anything. I never receive any error message, it just doesn't
>> > do
>> > what it's supposed to.
>> >
>> > Following is the script for the backup, just in case that helps:
>> >
>> > Dim PathVar
>> > Dim RefNo
>> > Dim objFSO
>> > Dim objShell
>> > Dim ShellString
>> > Dim retvalue
>> > Dim VarFilename
>> >
>> > set objShell = Wscript.CreateObject("Wscript.Shell")
>> >
>> > VarFilename= "xcopy " & chr(34) & "C:\Users\kgrabske\Documents\*.*" &
>> > chr(34) & chr(32) & chr(34) & "Z:\backup\Keith\Documents\*.*" & chr(34)
>> > VarFilename=VarFilename & " /e /y /c /h /d
>> > /EXCLUDE:C:\Users\kgrabske\Documents\BackupExclusions.txt"
>> >
>> > objShell.run VarFilename
>> >
>> > There isn't much to it, and I can't figure out why special permissions
>> > would
>> > be required. I am already running the task using my login, and I am an
>> > administrator.
>> >
>> > Do you have any other thoughts? I may see if Macro Scheduler will
>> > work.
>> > I
>> > used to use that a lot, but I moved away from it in favor of XP's
>> > scheduled
>> > tasks, which see to work much better than Vista's.
>> >
>> > Thanks,
>> >
>> > Keith
>> >
>> >
>> > "Mark L. Ferguson" wrote:
>> >
>> >> It's very likely that the script won't run because it's calling
>> >> something
>> >> that needs you to 'run as administrator'. There are several ways you
>> >> might
>> >> accomplish this, but I'm not sure which one would work from Scheduled
>> >> Tasks.
>> >> One direct method might be to enable the default admin, and 'runas'
>> >> that
>> >> user.
>> >> Go to Start/all programs/accessories/run, and type:
>> >>
>> >> control userpasswords2
>> >>
>> >> Advanced tab, Advanced button, Users folder, rightclick Administrator,
>> >> Properties, uncheck checkbox for "Account is disabled"
>> >> Restart Windows.
>> >>
>> >> There could be other methods, but 'runas /user:Administrator ...'
>> >> would
>> >> be
>> >> tested this way and you could look for other ways to accomplish this.
>> >> --
>> >> Was this helpful? Then click the Ratings button. Voting helps the web
>> >> interface.
>> >> http://www.microsoft.com/wn3/locales/help/help_en-us.htm#RateAPostAsAnswer
>> >> Mark L. Ferguson
>> >> ..
>> >>
>> >> "Keith" <Keith@discussions.microsoft.com> wrote in message
>> >> news:747F1A15-4206-466E-9679-AA6060305894@microsoft.com...
>> >> > Mark,
>> >> >
>> >> > Thanks for the response. I tried creating a script which calls my
>> >> > script
>> >> > as
>> >> > you suggested, and then created a scheduled task to run that new
>> >> > script,
>> >> > but
>> >> > I got the same result. Do you have any other suggestions?
>> >> >
>> >> > Thanks,
>> >> >
>> >> > Keith
>> >> >
>> >> >
>> >> > "Mark L. Ferguson" wrote:
>> >> >
>> >> >> Create a script or bat file that runs the command:
>> >> >> runas /user:<yourUserName> "cscript \"yourScript.VBS\" "
>> >> >>
>> >> >> --
>> >> >> Was this helpful? Then click the Ratings button. Voting helps the
>> >> >> web
>> >> >> interface.
>> >> >> http://www.microsoft.com/wn3/locales/help/help_en-us.htm#RateAPostAsAnswer
>> >> >> Mark L. Ferguson
>> >> >> .
>> >> >>
>> >> >> "Keith" <Keith@discussions.microsoft.com> wrote in message
>> >> >> news:6C1064A5-5A80-4970-A1DB-58C0A05A8415@microsoft.com...
>> >> >> > I have a vbs script that I use to copy files from my local drive
>> >> >> > to
>> >> >> > a
>> >> >> > network
>> >> >> > drive as a backup. The script works fine on its own (by
>> >> >> > double-clicking
>> >> >> > it
>> >> >> > or by running it from the command prompt). I created a scheduled
>> >> >> > task
>> >> >> > to
>> >> >> > have it run automatically, but it doesn't seem to work. It says
>> >> >> > that
>> >> >> > it
>> >> >> > completed successfully, but it didn't really do anything. Even
>> >> >> > if I
>> >> >> > select
>> >> >> > it in the Task Scheduler and then click "Run" in the Actions
>> >> >> > pane,
>> >> >> > it
>> >> >> > says
>> >> >> > it's status is "Running", but nothing is happening. What am I
>> >> >> > doing
>> >> >> > wrong?
>> >> >> >
>> >> >> > Thanks,
>> >> >> >
>> >> >> > Keith
>> >> >>
>> >>

>>
 
Re: Task Scheduler Problem

Mark,

I copied and pasted the code you supplied into a text file an then tried to
run the script from the command line. Following are the results:

---------------------------------------------------------------------------------------------
C:\Documents and Settings\kgrabske\Documents\AAScripts>cscript go.vbs
Microsoft (R) Windows Script Host Version 5.7
Copyright (C) Microsoft Corporation. All rights reserved.

Echo works
C:\Documents and Settings\kgrabske\Documents\AAScripts\go.vbs(5, 1)
Microsoft VB
Script runtime error: Object doesn't support this property or method: 'shell'
------------------------------------------------------------------------------------------------

I'm not really an expert on scripting, but it looks like the problem is on
the following line:

shell=createobject("wscript.shell")

Am I right in assuming that we need to get the script working from the
command line before we can use it to test the Task Scheduler?

Thanks,

Keith





"Mark L. Ferguson" wrote:

> It's acting like you get 'access denied' on the xcopy, but that other
> script's failure on simply running a popup dialog indicates something
> deeper. You don't get the wscript object at all. I would say that indicates
> a Policy setting against script, except that you can run a script in other
> than Scheduled Tasks.
> Let's write a vbs that runs in CScript, with some echos, to get a console
> window.
> command: cscript go.vbs
> --go.vbs--
> wscript.sleep 1000
> wscript.echo "Echo works"
> wscript.sleep 1000
> shell=createobject("wscript.shell")
> if shell is nothing then
> wscript.echo "No Shell"
> end if
> wscript.sleep 3000
> wscript.exit
> --end file-
> --
> Was this helpful? Then click the Ratings button. Voting helps the web
> interface.
> http://www.microsoft.com/wn3/locales/help/help_en-us.htm#RateAPostAsAnswer
> Mark L. Ferguson
> ..
>
> "Keith" <Keith@discussions.microsoft.com> wrote in message
> news:4AFCE5F0-DE85-4FC3-A5BA-B39EC4DC1BA3@microsoft.com...
> > Mark,
> >
> > I tried logging on as administrator, and my scheduled task did the same
> > thing. Then I created a new scheduled task while still logged on as
> > administrator, and I got the same results...task completed when nothing
> > actually happened. Unless I can come up with a solution to this problem
> > soon, I will have to investigate alternatives like Macro Scheduler. I
> > suppose there's no guarantee that it will work any better, but I've got to
> > do
> > something.
> >
> > Thanks again for all of your help. I really appreciate it, even if we
> > haven't yet come up with a solution.
> >
> > Sincerely,
> >
> > Keith
> >
> >
> >
> >
> > "Mark L. Ferguson" wrote:
> >
> >> I would log on as default "Administrator" and schedule the task., or at
> >> least test the run.
> >> If it's a permissions error, that should solve it.
> >> --
> >> Was this helpful? Then click the Ratings button. Voting helps the web
> >> interface.
> >> http://www.microsoft.com/wn3/locales/help/help_en-us.htm#RateAPostAsAnswer
> >> Mark L. Ferguson
> >> ..
> >>
> >> "Keith" <Keith@discussions.microsoft.com> wrote in message
> >> news:6F83A395-D52F-4458-A692-6DCFA611F76C@microsoft.com...
> >> > Mark,
> >> >
> >> > Thanks again for your input. I enabled the default Administrator as
> >> > you
> >> > suggested, but I'm not sure what that will do. I have another vbs
> >> > script
> >> > that also doesn't work properly. All it's supposed to do is pop up a
> >> > msgbox
> >> > reminding me to do something. What's weird is that the backup one I
> >> > originally posted about says that it completed successfully, even
> >> > though
> >> > it
> >> > didn't do anything. I never receive any error message, it just doesn't
> >> > do
> >> > what it's supposed to.
> >> >
> >> > Following is the script for the backup, just in case that helps:
> >> >
> >> > Dim PathVar
> >> > Dim RefNo
> >> > Dim objFSO
> >> > Dim objShell
> >> > Dim ShellString
> >> > Dim retvalue
> >> > Dim VarFilename
> >> >
> >> > set objShell = Wscript.CreateObject("Wscript.Shell")
> >> >
> >> > VarFilename= "xcopy " & chr(34) & "C:\Users\kgrabske\Documents\*.*" &
> >> > chr(34) & chr(32) & chr(34) & "Z:\backup\Keith\Documents\*.*" & chr(34)
> >> > VarFilename=VarFilename & " /e /y /c /h /d
> >> > /EXCLUDE:C:\Users\kgrabske\Documents\BackupExclusions.txt"
> >> >
> >> > objShell.run VarFilename
> >> >
> >> > There isn't much to it, and I can't figure out why special permissions
> >> > would
> >> > be required. I am already running the task using my login, and I am an
> >> > administrator.
> >> >
> >> > Do you have any other thoughts? I may see if Macro Scheduler will
> >> > work.
> >> > I
> >> > used to use that a lot, but I moved away from it in favor of XP's
> >> > scheduled
> >> > tasks, which see to work much better than Vista's.
> >> >
> >> > Thanks,
> >> >
> >> > Keith
> >> >
> >> >
> >> > "Mark L. Ferguson" wrote:
> >> >
> >> >> It's very likely that the script won't run because it's calling
> >> >> something
> >> >> that needs you to 'run as administrator'. There are several ways you
> >> >> might
> >> >> accomplish this, but I'm not sure which one would work from Scheduled
> >> >> Tasks.
> >> >> One direct method might be to enable the default admin, and 'runas'
> >> >> that
> >> >> user.
> >> >> Go to Start/all programs/accessories/run, and type:
> >> >>
> >> >> control userpasswords2
> >> >>
> >> >> Advanced tab, Advanced button, Users folder, rightclick Administrator,
> >> >> Properties, uncheck checkbox for "Account is disabled"
> >> >> Restart Windows.
> >> >>
> >> >> There could be other methods, but 'runas /user:Administrator ...'
> >> >> would
> >> >> be
> >> >> tested this way and you could look for other ways to accomplish this.
> >> >> --
> >> >> Was this helpful? Then click the Ratings button. Voting helps the web
> >> >> interface.
> >> >> http://www.microsoft.com/wn3/locales/help/help_en-us.htm#RateAPostAsAnswer
> >> >> Mark L. Ferguson
> >> >> ..
> >> >>
> >> >> "Keith" <Keith@discussions.microsoft.com> wrote in message
> >> >> news:747F1A15-4206-466E-9679-AA6060305894@microsoft.com...
> >> >> > Mark,
> >> >> >
> >> >> > Thanks for the response. I tried creating a script which calls my
> >> >> > script
> >> >> > as
> >> >> > you suggested, and then created a scheduled task to run that new
> >> >> > script,
> >> >> > but
> >> >> > I got the same result. Do you have any other suggestions?
> >> >> >
> >> >> > Thanks,
> >> >> >
> >> >> > Keith
> >> >> >
> >> >> >
> >> >> > "Mark L. Ferguson" wrote:
> >> >> >
> >> >> >> Create a script or bat file that runs the command:
> >> >> >> runas /user:<yourUserName> "cscript \"yourScript.VBS\" "
> >> >> >>
> >> >> >> --
> >> >> >> Was this helpful? Then click the Ratings button. Voting helps the
> >> >> >> web
> >> >> >> interface.
> >> >> >> http://www.microsoft.com/wn3/locales/help/help_en-us.htm#RateAPostAsAnswer
> >> >> >> Mark L. Ferguson
> >> >> >> .
> >> >> >>
> >> >> >> "Keith" <Keith@discussions.microsoft.com> wrote in message
> >> >> >> news:6C1064A5-5A80-4970-A1DB-58C0A05A8415@microsoft.com...
> >> >> >> > I have a vbs script that I use to copy files from my local drive
> >> >> >> > to
> >> >> >> > a
> >> >> >> > network
> >> >> >> > drive as a backup. The script works fine on its own (by
> >> >> >> > double-clicking
> >> >> >> > it
> >> >> >> > or by running it from the command prompt). I created a scheduled
> >> >> >> > task
> >> >> >> > to
> >> >> >> > have it run automatically, but it doesn't seem to work. It says
> >> >> >> > that
> >> >> >> > it
> >> >> >> > completed successfully, but it didn't really do anything. Even
> >> >> >> > if I
> >> >> >> > select
> >> >> >> > it in the Task Scheduler and then click "Run" in the Actions
> >> >> >> > pane,
> >> >> >> > it
> >> >> >> > says
> >> >> >> > it's status is "Running", but nothing is happening. What am I
> >> >> >> > doing
> >> >> >> > wrong?
> >> >> >> >
> >> >> >> > Thanks,
> >> >> >> >
> >> >> >> > Keith
> >> >> >>
> >> >>
> >>

>
 
Re: Task Scheduler Problem

yes, I missed the 'set' command.
set shell=create...
--
Was this helpful? Then click the Ratings button. Voting helps the web
interface.
http://www.microsoft.com/wn3/locales/help/help_en-us.htm#RateAPostAsAnswer
Mark L. Ferguson
..

"Keith" <Keith@discussions.microsoft.com> wrote in message
news:AA069875-90ED-4068-97A6-24F5D817F39F@microsoft.com...
> Mark,
>
> I copied and pasted the code you supplied into a text file an then tried
> to
> run the script from the command line. Following are the results:
>
> ---------------------------------------------------------------------------------------------
> C:\Documents and Settings\kgrabske\Documents\AAScripts>cscript go.vbs
> Microsoft (R) Windows Script Host Version 5.7
> Copyright (C) Microsoft Corporation. All rights reserved.
>
> Echo works
> C:\Documents and Settings\kgrabske\Documents\AAScripts\go.vbs(5, 1)
> Microsoft VB
> Script runtime error: Object doesn't support this property or method:
> 'shell'
> ------------------------------------------------------------------------------------------------
>
> I'm not really an expert on scripting, but it looks like the problem is on
> the following line:
>
> shell=createobject("wscript.shell")
>
> Am I right in assuming that we need to get the script working from the
> command line before we can use it to test the Task Scheduler?
>
> Thanks,
>
> Keith
>
>
>
>
>
> "Mark L. Ferguson" wrote:
>
>> It's acting like you get 'access denied' on the xcopy, but that other
>> script's failure on simply running a popup dialog indicates something
>> deeper. You don't get the wscript object at all. I would say that
>> indicates
>> a Policy setting against script, except that you can run a script in
>> other
>> than Scheduled Tasks.
>> Let's write a vbs that runs in CScript, with some echos, to get a console
>> window.
>> command: cscript go.vbs
>> --go.vbs--
>> wscript.sleep 1000
>> wscript.echo "Echo works"
>> wscript.sleep 1000
>> shell=createobject("wscript.shell")
>> if shell is nothing then
>> wscript.echo "No Shell"
>> end if
>> wscript.sleep 3000
>> wscript.exit
>> --end file-
>> --
>> Was this helpful? Then click the Ratings button. Voting helps the web
>> interface.
>> http://www.microsoft.com/wn3/locales/help/help_en-us.htm#RateAPostAsAnswer
>> Mark L. Ferguson
>> ..
>>
>> "Keith" <Keith@discussions.microsoft.com> wrote in message
>> news:4AFCE5F0-DE85-4FC3-A5BA-B39EC4DC1BA3@microsoft.com...
>> > Mark,
>> >
>> > I tried logging on as administrator, and my scheduled task did the same
>> > thing. Then I created a new scheduled task while still logged on as
>> > administrator, and I got the same results...task completed when nothing
>> > actually happened. Unless I can come up with a solution to this
>> > problem
>> > soon, I will have to investigate alternatives like Macro Scheduler. I
>> > suppose there's no guarantee that it will work any better, but I've got
>> > to
>> > do
>> > something.
>> >
>> > Thanks again for all of your help. I really appreciate it, even if we
>> > haven't yet come up with a solution.
>> >
>> > Sincerely,
>> >
>> > Keith
>> >
>> >
>> >
>> >
>> > "Mark L. Ferguson" wrote:
>> >
>> >> I would log on as default "Administrator" and schedule the task., or
>> >> at
>> >> least test the run.
>> >> If it's a permissions error, that should solve it.
>> >> --
>> >> Was this helpful? Then click the Ratings button. Voting helps the web
>> >> interface.
>> >> http://www.microsoft.com/wn3/locales/help/help_en-us.htm#RateAPostAsAnswer
>> >> Mark L. Ferguson
>> >> ..
>> >>
>> >> "Keith" <Keith@discussions.microsoft.com> wrote in message
>> >> news:6F83A395-D52F-4458-A692-6DCFA611F76C@microsoft.com...
>> >> > Mark,
>> >> >
>> >> > Thanks again for your input. I enabled the default Administrator as
>> >> > you
>> >> > suggested, but I'm not sure what that will do. I have another vbs
>> >> > script
>> >> > that also doesn't work properly. All it's supposed to do is pop up
>> >> > a
>> >> > msgbox
>> >> > reminding me to do something. What's weird is that the backup one I
>> >> > originally posted about says that it completed successfully, even
>> >> > though
>> >> > it
>> >> > didn't do anything. I never receive any error message, it just
>> >> > doesn't
>> >> > do
>> >> > what it's supposed to.
>> >> >
>> >> > Following is the script for the backup, just in case that helps:
>> >> >
>> >> > Dim PathVar
>> >> > Dim RefNo
>> >> > Dim objFSO
>> >> > Dim objShell
>> >> > Dim ShellString
>> >> > Dim retvalue
>> >> > Dim VarFilename
>> >> >
>> >> > set objShell = Wscript.CreateObject("Wscript.Shell")
>> >> >
>> >> > VarFilename= "xcopy " & chr(34) & "C:\Users\kgrabske\Documents\*.*"
>> >> > &
>> >> > chr(34) & chr(32) & chr(34) & "Z:\backup\Keith\Documents\*.*" &
>> >> > chr(34)
>> >> > VarFilename=VarFilename & " /e /y /c /h /d
>> >> > /EXCLUDE:C:\Users\kgrabske\Documents\BackupExclusions.txt"
>> >> >
>> >> > objShell.run VarFilename
>> >> >
>> >> > There isn't much to it, and I can't figure out why special
>> >> > permissions
>> >> > would
>> >> > be required. I am already running the task using my login, and I am
>> >> > an
>> >> > administrator.
>> >> >
>> >> > Do you have any other thoughts? I may see if Macro Scheduler will
>> >> > work.
>> >> > I
>> >> > used to use that a lot, but I moved away from it in favor of XP's
>> >> > scheduled
>> >> > tasks, which see to work much better than Vista's.
>> >> >
>> >> > Thanks,
>> >> >
>> >> > Keith
>> >> >
>> >> >
>> >> > "Mark L. Ferguson" wrote:
>> >> >
>> >> >> It's very likely that the script won't run because it's calling
>> >> >> something
>> >> >> that needs you to 'run as administrator'. There are several ways
>> >> >> you
>> >> >> might
>> >> >> accomplish this, but I'm not sure which one would work from
>> >> >> Scheduled
>> >> >> Tasks.
>> >> >> One direct method might be to enable the default admin, and 'runas'
>> >> >> that
>> >> >> user.
>> >> >> Go to Start/all programs/accessories/run, and type:
>> >> >>
>> >> >> control userpasswords2
>> >> >>
>> >> >> Advanced tab, Advanced button, Users folder, rightclick
>> >> >> Administrator,
>> >> >> Properties, uncheck checkbox for "Account is disabled"
>> >> >> Restart Windows.
>> >> >>
>> >> >> There could be other methods, but 'runas /user:Administrator ...'
>> >> >> would
>> >> >> be
>> >> >> tested this way and you could look for other ways to accomplish
>> >> >> this.
>> >> >> --
>> >> >> Was this helpful? Then click the Ratings button. Voting helps the
>> >> >> web
>> >> >> interface.
>> >> >> http://www.microsoft.com/wn3/locales/help/help_en-us.htm#RateAPostAsAnswer
>> >> >> Mark L. Ferguson
>> >> >> ..
>> >> >>
>> >> >> "Keith" <Keith@discussions.microsoft.com> wrote in message
>> >> >> news:747F1A15-4206-466E-9679-AA6060305894@microsoft.com...
>> >> >> > Mark,
>> >> >> >
>> >> >> > Thanks for the response. I tried creating a script which calls
>> >> >> > my
>> >> >> > script
>> >> >> > as
>> >> >> > you suggested, and then created a scheduled task to run that new
>> >> >> > script,
>> >> >> > but
>> >> >> > I got the same result. Do you have any other suggestions?
>> >> >> >
>> >> >> > Thanks,
>> >> >> >
>> >> >> > Keith
>> >> >> >
>> >> >> >
>> >> >> > "Mark L. Ferguson" wrote:
>> >> >> >
>> >> >> >> Create a script or bat file that runs the command:
>> >> >> >> runas /user:<yourUserName> "cscript \"yourScript.VBS\" "
>> >> >> >>
>> >> >> >> --
>> >> >> >> Was this helpful? Then click the Ratings button. Voting helps
>> >> >> >> the
>> >> >> >> web
>> >> >> >> interface.
>> >> >> >> http://www.microsoft.com/wn3/locales/help/help_en-us.htm#RateAPostAsAnswer
>> >> >> >> Mark L. Ferguson
>> >> >> >> .
>> >> >> >>
>> >> >> >> "Keith" <Keith@discussions.microsoft.com> wrote in message
>> >> >> >> news:6C1064A5-5A80-4970-A1DB-58C0A05A8415@microsoft.com...
>> >> >> >> > I have a vbs script that I use to copy files from my local
>> >> >> >> > drive
>> >> >> >> > to
>> >> >> >> > a
>> >> >> >> > network
>> >> >> >> > drive as a backup. The script works fine on its own (by
>> >> >> >> > double-clicking
>> >> >> >> > it
>> >> >> >> > or by running it from the command prompt). I created a
>> >> >> >> > scheduled
>> >> >> >> > task
>> >> >> >> > to
>> >> >> >> > have it run automatically, but it doesn't seem to work. It
>> >> >> >> > says
>> >> >> >> > that
>> >> >> >> > it
>> >> >> >> > completed successfully, but it didn't really do anything.
>> >> >> >> > Even
>> >> >> >> > if I
>> >> >> >> > select
>> >> >> >> > it in the Task Scheduler and then click "Run" in the Actions
>> >> >> >> > pane,
>> >> >> >> > it
>> >> >> >> > says
>> >> >> >> > it's status is "Running", but nothing is happening. What am I
>> >> >> >> > doing
>> >> >> >> > wrong?
>> >> >> >> >
>> >> >> >> > Thanks,
>> >> >> >> >
>> >> >> >> > Keith
>> >> >> >>
>> >> >>
>> >>

>>
 
Re: Task Scheduler Problem

Mark,

Here are my results from the command line now:

C:\Documents and Settings\kgrabske\Documents\AAScripts>cscript go.vbs
Microsoft (R) Windows Script Host Version 5.7
Copyright (C) Microsoft Corporation. All rights reserved.

Echo works
C:\Documents and Settings\kgrabske\Documents\AAScripts\go.vbs(10, 1) Microsoft
BScript runtime error: Object doesn't support this property or method:
'wscript
exit'

Thanks again for your help and patience!

Keith


"Mark L. Ferguson" wrote:

> yes, I missed the 'set' command.
> set shell=create...
> --
> Was this helpful? Then click the Ratings button. Voting helps the web
> interface.
> http://www.microsoft.com/wn3/locales/help/help_en-us.htm#RateAPostAsAnswer
> Mark L. Ferguson
> ..
>
> "Keith" <Keith@discussions.microsoft.com> wrote in message
> news:AA069875-90ED-4068-97A6-24F5D817F39F@microsoft.com...
> > Mark,
> >
> > I copied and pasted the code you supplied into a text file an then tried
> > to
> > run the script from the command line. Following are the results:
> >
> > ---------------------------------------------------------------------------------------------
> > C:\Documents and Settings\kgrabske\Documents\AAScripts>cscript go.vbs
> > Microsoft (R) Windows Script Host Version 5.7
> > Copyright (C) Microsoft Corporation. All rights reserved.
> >
> > Echo works
> > C:\Documents and Settings\kgrabske\Documents\AAScripts\go.vbs(5, 1)
> > Microsoft VB
> > Script runtime error: Object doesn't support this property or method:
> > 'shell'
> > ------------------------------------------------------------------------------------------------
> >
> > I'm not really an expert on scripting, but it looks like the problem is on
> > the following line:
> >
> > shell=createobject("wscript.shell")
> >
> > Am I right in assuming that we need to get the script working from the
> > command line before we can use it to test the Task Scheduler?
> >
> > Thanks,
> >
> > Keith
> >
> >
> >
> >
> >
> > "Mark L. Ferguson" wrote:
> >
> >> It's acting like you get 'access denied' on the xcopy, but that other
> >> script's failure on simply running a popup dialog indicates something
> >> deeper. You don't get the wscript object at all. I would say that
> >> indicates
> >> a Policy setting against script, except that you can run a script in
> >> other
> >> than Scheduled Tasks.
> >> Let's write a vbs that runs in CScript, with some echos, to get a console
> >> window.
> >> command: cscript go.vbs
> >> --go.vbs--
> >> wscript.sleep 1000
> >> wscript.echo "Echo works"
> >> wscript.sleep 1000
> >> shell=createobject("wscript.shell")
> >> if shell is nothing then
> >> wscript.echo "No Shell"
> >> end if
> >> wscript.sleep 3000
> >> wscript.exit
> >> --end file-
> >> --
> >> Was this helpful? Then click the Ratings button. Voting helps the web
> >> interface.
> >> http://www.microsoft.com/wn3/locales/help/help_en-us.htm#RateAPostAsAnswer
> >> Mark L. Ferguson
> >> ..
> >>
> >> "Keith" <Keith@discussions.microsoft.com> wrote in message
> >> news:4AFCE5F0-DE85-4FC3-A5BA-B39EC4DC1BA3@microsoft.com...
> >> > Mark,
> >> >
> >> > I tried logging on as administrator, and my scheduled task did the same
> >> > thing. Then I created a new scheduled task while still logged on as
> >> > administrator, and I got the same results...task completed when nothing
> >> > actually happened. Unless I can come up with a solution to this
> >> > problem
> >> > soon, I will have to investigate alternatives like Macro Scheduler. I
> >> > suppose there's no guarantee that it will work any better, but I've got
> >> > to
> >> > do
> >> > something.
> >> >
> >> > Thanks again for all of your help. I really appreciate it, even if we
> >> > haven't yet come up with a solution.
> >> >
> >> > Sincerely,
> >> >
> >> > Keith
> >> >
> >> >
> >> >
> >> >
> >> > "Mark L. Ferguson" wrote:
> >> >
> >> >> I would log on as default "Administrator" and schedule the task., or
> >> >> at
> >> >> least test the run.
> >> >> If it's a permissions error, that should solve it.
> >> >> --
> >> >> Was this helpful? Then click the Ratings button. Voting helps the web
> >> >> interface.
> >> >> http://www.microsoft.com/wn3/locales/help/help_en-us.htm#RateAPostAsAnswer
> >> >> Mark L. Ferguson
> >> >> ..
> >> >>
> >> >> "Keith" <Keith@discussions.microsoft.com> wrote in message
> >> >> news:6F83A395-D52F-4458-A692-6DCFA611F76C@microsoft.com...
> >> >> > Mark,
> >> >> >
> >> >> > Thanks again for your input. I enabled the default Administrator as
> >> >> > you
> >> >> > suggested, but I'm not sure what that will do. I have another vbs
> >> >> > script
> >> >> > that also doesn't work properly. All it's supposed to do is pop up
> >> >> > a
> >> >> > msgbox
> >> >> > reminding me to do something. What's weird is that the backup one I
> >> >> > originally posted about says that it completed successfully, even
> >> >> > though
> >> >> > it
> >> >> > didn't do anything. I never receive any error message, it just
> >> >> > doesn't
> >> >> > do
> >> >> > what it's supposed to.
> >> >> >
> >> >> > Following is the script for the backup, just in case that helps:
> >> >> >
> >> >> > Dim PathVar
> >> >> > Dim RefNo
> >> >> > Dim objFSO
> >> >> > Dim objShell
> >> >> > Dim ShellString
> >> >> > Dim retvalue
> >> >> > Dim VarFilename
> >> >> >
> >> >> > set objShell = Wscript.CreateObject("Wscript.Shell")
> >> >> >
> >> >> > VarFilename= "xcopy " & chr(34) & "C:\Users\kgrabske\Documents\*.*"
> >> >> > &
> >> >> > chr(34) & chr(32) & chr(34) & "Z:\backup\Keith\Documents\*.*" &
> >> >> > chr(34)
> >> >> > VarFilename=VarFilename & " /e /y /c /h /d
> >> >> > /EXCLUDE:C:\Users\kgrabske\Documents\BackupExclusions.txt"
> >> >> >
> >> >> > objShell.run VarFilename
> >> >> >
> >> >> > There isn't much to it, and I can't figure out why special
> >> >> > permissions
> >> >> > would
> >> >> > be required. I am already running the task using my login, and I am
> >> >> > an
> >> >> > administrator.
> >> >> >
> >> >> > Do you have any other thoughts? I may see if Macro Scheduler will
> >> >> > work.
> >> >> > I
> >> >> > used to use that a lot, but I moved away from it in favor of XP's
> >> >> > scheduled
> >> >> > tasks, which see to work much better than Vista's.
> >> >> >
> >> >> > Thanks,
> >> >> >
> >> >> > Keith
> >> >> >
> >> >> >
> >> >> > "Mark L. Ferguson" wrote:
> >> >> >
> >> >> >> It's very likely that the script won't run because it's calling
> >> >> >> something
> >> >> >> that needs you to 'run as administrator'. There are several ways
> >> >> >> you
> >> >> >> might
> >> >> >> accomplish this, but I'm not sure which one would work from
> >> >> >> Scheduled
> >> >> >> Tasks.
> >> >> >> One direct method might be to enable the default admin, and 'runas'
> >> >> >> that
> >> >> >> user.
> >> >> >> Go to Start/all programs/accessories/run, and type:
> >> >> >>
> >> >> >> control userpasswords2
> >> >> >>
> >> >> >> Advanced tab, Advanced button, Users folder, rightclick
> >> >> >> Administrator,
> >> >> >> Properties, uncheck checkbox for "Account is disabled"
> >> >> >> Restart Windows.
> >> >> >>
> >> >> >> There could be other methods, but 'runas /user:Administrator ...'
> >> >> >> would
> >> >> >> be
> >> >> >> tested this way and you could look for other ways to accomplish
> >> >> >> this.
> >> >> >> --
> >> >> >> Was this helpful? Then click the Ratings button. Voting helps the
> >> >> >> web
> >> >> >> interface.
> >> >> >> http://www.microsoft.com/wn3/locales/help/help_en-us.htm#RateAPostAsAnswer
> >> >> >> Mark L. Ferguson
> >> >> >> ..
> >> >> >>
> >> >> >> "Keith" <Keith@discussions.microsoft.com> wrote in message
> >> >> >> news:747F1A15-4206-466E-9679-AA6060305894@microsoft.com...
> >> >> >> > Mark,
> >> >> >> >
> >> >> >> > Thanks for the response. I tried creating a script which calls
> >> >> >> > my
> >> >> >> > script
> >> >> >> > as
> >> >> >> > you suggested, and then created a scheduled task to run that new
> >> >> >> > script,
> >> >> >> > but
> >> >> >> > I got the same result. Do you have any other suggestions?
> >> >> >> >
> >> >> >> > Thanks,
> >> >> >> >
> >> >> >> > Keith
> >> >> >> >
> >> >> >> >
> >> >> >> > "Mark L. Ferguson" wrote:
> >> >> >> >
> >> >> >> >> Create a script or bat file that runs the command:
> >> >> >> >> runas /user:<yourUserName> "cscript \"yourScript.VBS\" "
> >> >> >> >>
> >> >> >> >> --
> >> >> >> >> Was this helpful? Then click the Ratings button. Voting helps
> >> >> >> >> the
> >> >> >> >> web
> >> >> >> >> interface.
> >> >> >> >> http://www.microsoft.com/wn3/locales/help/help_en-us.htm#RateAPostAsAnswer
> >> >> >> >> Mark L. Ferguson
> >> >> >> >> .
> >> >> >> >>
> >> >> >> >> "Keith" <Keith@discussions.microsoft.com> wrote in message
> >> >> >> >> news:6C1064A5-5A80-4970-A1DB-58C0A05A8415@microsoft.com...
> >> >> >> >> > I have a vbs script that I use to copy files from my local
> >> >> >> >> > drive
> >> >> >> >> > to
> >> >> >> >> > a
> >> >> >> >> > network
> >> >> >> >> > drive as a backup. The script works fine on its own (by
> >> >> >> >> > double-clicking
> >> >> >> >> > it
> >> >> >> >> > or by running it from the command prompt). I created a
> >> >> >> >> > scheduled
> >> >> >> >> > task
> >> >> >> >> > to
> >> >> >> >> > have it run automatically, but it doesn't seem to work. It
> >> >> >> >> > says
> >> >> >> >> > that
> >> >> >> >> > it
> >> >> >> >> > completed successfully, but it didn't really do anything.
> >> >> >> >> > Even
> >> >> >> >> > if I
> >> >> >> >> > select
> >> >> >> >> > it in the Task Scheduler and then click "Run" in the Actions
> >> >> >> >> > pane,
> >> >> >> >> > it
> >> >> >> >> > says
> >> >> >> >> > it's status is "Running", but nothing is happening. What am I
> >> >> >> >> > doing
> >> >> >> >> > wrong?
> >> >> >> >> >
> >> >> >> >> > Thanks,
> >> >> >> >> >
> >> >> >> >> > Keith
> >> >> >> >>
> >> >> >>
> >> >>
> >>

>
 
Re: Task Scheduler Problem

Ha, I should test my script. It's quit, exit is dos
wscript.quit
If I ever successfully write a working script, you are probably not getting
the 'no shell' and if not, I can't see another test.
I haven't searched the Knowledgebase for scheduled tasks bugs, but it would
be next.

--
Was this helpful? Then click the Ratings button. Voting helps the web
interface.
http://www.microsoft.com/wn3/locales/help/help_en-us.htm#RateAPostAsAnswer
Mark L. Ferguson
..

"Keith" <Keith@discussions.microsoft.com> wrote in message
news:6952370C-9986-49C3-97B9-DA7259F2B476@microsoft.com...
> Mark,
>
> Here are my results from the command line now:
>
> C:\Documents and Settings\kgrabske\Documents\AAScripts>cscript go.vbs
> Microsoft (R) Windows Script Host Version 5.7
> Copyright (C) Microsoft Corporation. All rights reserved.
>
> Echo works
> C:\Documents and Settings\kgrabske\Documents\AAScripts\go.vbs(10, 1)
> Microsoft
> BScript runtime error: Object doesn't support this property or method:
> 'wscript
> exit'
>
> Thanks again for your help and patience!
>
> Keith
>
>
> "Mark L. Ferguson" wrote:
>
>> yes, I missed the 'set' command.
>> set shell=create...
>> --
>> Was this helpful? Then click the Ratings button. Voting helps the web
>> interface.
>> http://www.microsoft.com/wn3/locales/help/help_en-us.htm#RateAPostAsAnswer
>> Mark L. Ferguson
>> ..
>>
>> "Keith" <Keith@discussions.microsoft.com> wrote in message
>> news:AA069875-90ED-4068-97A6-24F5D817F39F@microsoft.com...
>> > Mark,
>> >
>> > I copied and pasted the code you supplied into a text file an then
>> > tried
>> > to
>> > run the script from the command line. Following are the results:
>> >
>> > ---------------------------------------------------------------------------------------------
>> > C:\Documents and Settings\kgrabske\Documents\AAScripts>cscript go.vbs
>> > Microsoft (R) Windows Script Host Version 5.7
>> > Copyright (C) Microsoft Corporation. All rights reserved.
>> >
>> > Echo works
>> > C:\Documents and Settings\kgrabske\Documents\AAScripts\go.vbs(5, 1)
>> > Microsoft VB
>> > Script runtime error: Object doesn't support this property or method:
>> > 'shell'
>> > ------------------------------------------------------------------------------------------------
>> >
>> > I'm not really an expert on scripting, but it looks like the problem is
>> > on
>> > the following line:
>> >
>> > shell=createobject("wscript.shell")
>> >
>> > Am I right in assuming that we need to get the script working from the
>> > command line before we can use it to test the Task Scheduler?
>> >
>> > Thanks,
>> >
>> > Keith
>> >
>> >
>> >
>> >
>> >
>> > "Mark L. Ferguson" wrote:
>> >
>> >> It's acting like you get 'access denied' on the xcopy, but that other
>> >> script's failure on simply running a popup dialog indicates something
>> >> deeper. You don't get the wscript object at all. I would say that
>> >> indicates
>> >> a Policy setting against script, except that you can run a script in
>> >> other
>> >> than Scheduled Tasks.
>> >> Let's write a vbs that runs in CScript, with some echos, to get a
>> >> console
>> >> window.
>> >> command: cscript go.vbs
>> >> --go.vbs--
>> >> wscript.sleep 1000
>> >> wscript.echo "Echo works"
>> >> wscript.sleep 1000
>> >> shell=createobject("wscript.shell")
>> >> if shell is nothing then
>> >> wscript.echo "No Shell"
>> >> end if
>> >> wscript.sleep 3000
>> >> wscript.exit
>> >> --end file-
>> >> --
>> >> Was this helpful? Then click the Ratings button. Voting helps the web
>> >> interface.
>> >> http://www.microsoft.com/wn3/locales/help/help_en-us.htm#RateAPostAsAnswer
>> >> Mark L. Ferguson
>> >> ..
>> >>
>> >> "Keith" <Keith@discussions.microsoft.com> wrote in message
>> >> news:4AFCE5F0-DE85-4FC3-A5BA-B39EC4DC1BA3@microsoft.com...
>> >> > Mark,
>> >> >
>> >> > I tried logging on as administrator, and my scheduled task did the
>> >> > same
>> >> > thing. Then I created a new scheduled task while still logged on as
>> >> > administrator, and I got the same results...task completed when
>> >> > nothing
>> >> > actually happened. Unless I can come up with a solution to this
>> >> > problem
>> >> > soon, I will have to investigate alternatives like Macro Scheduler.
>> >> > I
>> >> > suppose there's no guarantee that it will work any better, but I've
>> >> > got
>> >> > to
>> >> > do
>> >> > something.
>> >> >
>> >> > Thanks again for all of your help. I really appreciate it, even if
>> >> > we
>> >> > haven't yet come up with a solution.
>> >> >
>> >> > Sincerely,
>> >> >
>> >> > Keith
>> >> >
>> >> >
>> >> >
>> >> >
>> >> > "Mark L. Ferguson" wrote:
>> >> >
>> >> >> I would log on as default "Administrator" and schedule the task.,
>> >> >> or
>> >> >> at
>> >> >> least test the run.
>> >> >> If it's a permissions error, that should solve it.
>> >> >> --
>> >> >> Was this helpful? Then click the Ratings button. Voting helps the
>> >> >> web
>> >> >> interface.
>> >> >> http://www.microsoft.com/wn3/locales/help/help_en-us.htm#RateAPostAsAnswer
>> >> >> Mark L. Ferguson
>> >> >> ..
>> >> >>
>> >> >> "Keith" <Keith@discussions.microsoft.com> wrote in message
>> >> >> news:6F83A395-D52F-4458-A692-6DCFA611F76C@microsoft.com...
>> >> >> > Mark,
>> >> >> >
>> >> >> > Thanks again for your input. I enabled the default Administrator
>> >> >> > as
>> >> >> > you
>> >> >> > suggested, but I'm not sure what that will do. I have another
>> >> >> > vbs
>> >> >> > script
>> >> >> > that also doesn't work properly. All it's supposed to do is pop
>> >> >> > up
>> >> >> > a
>> >> >> > msgbox
>> >> >> > reminding me to do something. What's weird is that the backup
>> >> >> > one I
>> >> >> > originally posted about says that it completed successfully, even
>> >> >> > though
>> >> >> > it
>> >> >> > didn't do anything. I never receive any error message, it just
>> >> >> > doesn't
>> >> >> > do
>> >> >> > what it's supposed to.
>> >> >> >
>> >> >> > Following is the script for the backup, just in case that helps:
>> >> >> >
>> >> >> > Dim PathVar
>> >> >> > Dim RefNo
>> >> >> > Dim objFSO
>> >> >> > Dim objShell
>> >> >> > Dim ShellString
>> >> >> > Dim retvalue
>> >> >> > Dim VarFilename
>> >> >> >
>> >> >> > set objShell = Wscript.CreateObject("Wscript.Shell")
>> >> >> >
>> >> >> > VarFilename= "xcopy " & chr(34) &
>> >> >> > "C:\Users\kgrabske\Documents\*.*"
>> >> >> > &
>> >> >> > chr(34) & chr(32) & chr(34) & "Z:\backup\Keith\Documents\*.*" &
>> >> >> > chr(34)
>> >> >> > VarFilename=VarFilename & " /e /y /c /h /d
>> >> >> > /EXCLUDE:C:\Users\kgrabske\Documents\BackupExclusions.txt"
>> >> >> >
>> >> >> > objShell.run VarFilename
>> >> >> >
>> >> >> > There isn't much to it, and I can't figure out why special
>> >> >> > permissions
>> >> >> > would
>> >> >> > be required. I am already running the task using my login, and I
>> >> >> > am
>> >> >> > an
>> >> >> > administrator.
>> >> >> >
>> >> >> > Do you have any other thoughts? I may see if Macro Scheduler
>> >> >> > will
>> >> >> > work.
>> >> >> > I
>> >> >> > used to use that a lot, but I moved away from it in favor of XP's
>> >> >> > scheduled
>> >> >> > tasks, which see to work much better than Vista's.
>> >> >> >
>> >> >> > Thanks,
>> >> >> >
>> >> >> > Keith
>> >> >> >
>> >> >> >
>> >> >> > "Mark L. Ferguson" wrote:
>> >> >> >
>> >> >> >> It's very likely that the script won't run because it's calling
>> >> >> >> something
>> >> >> >> that needs you to 'run as administrator'. There are several ways
>> >> >> >> you
>> >> >> >> might
>> >> >> >> accomplish this, but I'm not sure which one would work from
>> >> >> >> Scheduled
>> >> >> >> Tasks.
>> >> >> >> One direct method might be to enable the default admin, and
>> >> >> >> 'runas'
>> >> >> >> that
>> >> >> >> user.
>> >> >> >> Go to Start/all programs/accessories/run, and type:
>> >> >> >>
>> >> >> >> control userpasswords2
>> >> >> >>
>> >> >> >> Advanced tab, Advanced button, Users folder, rightclick
>> >> >> >> Administrator,
>> >> >> >> Properties, uncheck checkbox for "Account is disabled"
>> >> >> >> Restart Windows.
>> >> >> >>
>> >> >> >> There could be other methods, but 'runas /user:Administrator
>> >> >> >> ...'
>> >> >> >> would
>> >> >> >> be
>> >> >> >> tested this way and you could look for other ways to accomplish
>> >> >> >> this.
>> >> >> >> --
>> >> >> >> Was this helpful? Then click the Ratings button. Voting helps
>> >> >> >> the
>> >> >> >> web
>> >> >> >> interface.
>> >> >> >> http://www.microsoft.com/wn3/locales/help/help_en-us.htm#RateAPostAsAnswer
>> >> >> >> Mark L. Ferguson
>> >> >> >> ..
>> >> >> >>
>> >> >> >> "Keith" <Keith@discussions.microsoft.com> wrote in message
>> >> >> >> news:747F1A15-4206-466E-9679-AA6060305894@microsoft.com...
>> >> >> >> > Mark,
>> >> >> >> >
>> >> >> >> > Thanks for the response. I tried creating a script which
>> >> >> >> > calls
>> >> >> >> > my
>> >> >> >> > script
>> >> >> >> > as
>> >> >> >> > you suggested, and then created a scheduled task to run that
>> >> >> >> > new
>> >> >> >> > script,
>> >> >> >> > but
>> >> >> >> > I got the same result. Do you have any other suggestions?
>> >> >> >> >
>> >> >> >> > Thanks,
>> >> >> >> >
>> >> >> >> > Keith
>> >> >> >> >
>> >> >> >> >
>> >> >> >> > "Mark L. Ferguson" wrote:
>> >> >> >> >
>> >> >> >> >> Create a script or bat file that runs the command:
>> >> >> >> >> runas /user:<yourUserName> "cscript \"yourScript.VBS\" "
>> >> >> >> >>
>> >> >> >> >> --
>> >> >> >> >> Was this helpful? Then click the Ratings button. Voting helps
>> >> >> >> >> the
>> >> >> >> >> web
>> >> >> >> >> interface.
>> >> >> >> >> http://www.microsoft.com/wn3/locales/help/help_en-us.htm#RateAPostAsAnswer
>> >> >> >> >> Mark L. Ferguson
>> >> >> >> >> .
>> >> >> >> >>
>> >> >> >> >> "Keith" <Keith@discussions.microsoft.com> wrote in message
>> >> >> >> >> news:6C1064A5-5A80-4970-A1DB-58C0A05A8415@microsoft.com...
>> >> >> >> >> > I have a vbs script that I use to copy files from my local
>> >> >> >> >> > drive
>> >> >> >> >> > to
>> >> >> >> >> > a
>> >> >> >> >> > network
>> >> >> >> >> > drive as a backup. The script works fine on its own (by
>> >> >> >> >> > double-clicking
>> >> >> >> >> > it
>> >> >> >> >> > or by running it from the command prompt). I created a
>> >> >> >> >> > scheduled
>> >> >> >> >> > task
>> >> >> >> >> > to
>> >> >> >> >> > have it run automatically, but it doesn't seem to work. It
>> >> >> >> >> > says
>> >> >> >> >> > that
>> >> >> >> >> > it
>> >> >> >> >> > completed successfully, but it didn't really do anything.
>> >> >> >> >> > Even
>> >> >> >> >> > if I
>> >> >> >> >> > select
>> >> >> >> >> > it in the Task Scheduler and then click "Run" in the
>> >> >> >> >> > Actions
>> >> >> >> >> > pane,
>> >> >> >> >> > it
>> >> >> >> >> > says
>> >> >> >> >> > it's status is "Running", but nothing is happening. What
>> >> >> >> >> > am I
>> >> >> >> >> > doing
>> >> >> >> >> > wrong?
>> >> >> >> >> >
>> >> >> >> >> > Thanks,
>> >> >> >> >> >
>> >> >> >> >> > Keith
>> >> >> >> >>
>> >> >> >>
>> >> >>
>> >>

>>
 
Re: Task Scheduler Problem

Mark,

I got the corrected script to work from the command line...and from the Task
Scheduler as well!!! What exactly is ccsript? Anyway, then I figured I
would try the same type of thing with my script, basically changing the
Action in the scheduled task to run cscript with my vbs file as an argument.
Unfortunately, I got the same results as before...the task says it completed
but nothing really happened. I also tried the same thing with my little
reminder script that shows a msgbox, but it too seemed to do nothing.

I tried searching the knowledgebase using the following search string (in
Technet):

vista AND "task scheduler"

but that didn't seem to turn up anything either. There we 13 topics, but
nothing similar to what I'm experiencing.

If you have any other ideas, I'd sure like to hear them.

Thanks,

Keith


"Mark L. Ferguson" wrote:

> Ha, I should test my script. It's quit, exit is dos
> wscript.quit
> If I ever successfully write a working script, you are probably not getting
> the 'no shell' and if not, I can't see another test.
> I haven't searched the Knowledgebase for scheduled tasks bugs, but it would
> be next.
>
> --
> Was this helpful? Then click the Ratings button. Voting helps the web
> interface.
> http://www.microsoft.com/wn3/locales/help/help_en-us.htm#RateAPostAsAnswer
> Mark L. Ferguson
> .
>
> "Keith" <Keith@discussions.microsoft.com> wrote in message
> news:6952370C-9986-49C3-97B9-DA7259F2B476@microsoft.com...
> > Mark,
> >
> > Here are my results from the command line now:
> >
> > C:\Documents and Settings\kgrabske\Documents\AAScripts>cscript go.vbs
> > Microsoft (R) Windows Script Host Version 5.7
> > Copyright (C) Microsoft Corporation. All rights reserved.
> >
> > Echo works
> > C:\Documents and Settings\kgrabske\Documents\AAScripts\go.vbs(10, 1)
> > Microsoft
> > BScript runtime error: Object doesn't support this property or method:
> > 'wscript
> > exit'
> >
> > Thanks again for your help and patience!
> >
> > Keith
> >
> >
> > "Mark L. Ferguson" wrote:
> >
> >> yes, I missed the 'set' command.
> >> set shell=create...
> >> --
> >> Was this helpful? Then click the Ratings button. Voting helps the web
> >> interface.
> >> http://www.microsoft.com/wn3/locales/help/help_en-us.htm#RateAPostAsAnswer
> >> Mark L. Ferguson
> >> ..
> >>
> >> "Keith" <Keith@discussions.microsoft.com> wrote in message
> >> news:AA069875-90ED-4068-97A6-24F5D817F39F@microsoft.com...
> >> > Mark,
> >> >
> >> > I copied and pasted the code you supplied into a text file an then
> >> > tried
> >> > to
> >> > run the script from the command line. Following are the results:
> >> >
> >> > ---------------------------------------------------------------------------------------------
> >> > C:\Documents and Settings\kgrabske\Documents\AAScripts>cscript go.vbs
> >> > Microsoft (R) Windows Script Host Version 5.7
> >> > Copyright (C) Microsoft Corporation. All rights reserved.
> >> >
> >> > Echo works
> >> > C:\Documents and Settings\kgrabske\Documents\AAScripts\go.vbs(5, 1)
> >> > Microsoft VB
> >> > Script runtime error: Object doesn't support this property or method:
> >> > 'shell'
> >> > ------------------------------------------------------------------------------------------------
> >> >
> >> > I'm not really an expert on scripting, but it looks like the problem is
> >> > on
> >> > the following line:
> >> >
> >> > shell=createobject("wscript.shell")
> >> >
> >> > Am I right in assuming that we need to get the script working from the
> >> > command line before we can use it to test the Task Scheduler?
> >> >
> >> > Thanks,
> >> >
> >> > Keith
> >> >
> >> >
> >> >
> >> >
> >> >
> >> > "Mark L. Ferguson" wrote:
> >> >
> >> >> It's acting like you get 'access denied' on the xcopy, but that other
> >> >> script's failure on simply running a popup dialog indicates something
> >> >> deeper. You don't get the wscript object at all. I would say that
> >> >> indicates
> >> >> a Policy setting against script, except that you can run a script in
> >> >> other
> >> >> than Scheduled Tasks.
> >> >> Let's write a vbs that runs in CScript, with some echos, to get a
> >> >> console
> >> >> window.
> >> >> command: cscript go.vbs
> >> >> --go.vbs--
> >> >> wscript.sleep 1000
> >> >> wscript.echo "Echo works"
> >> >> wscript.sleep 1000
> >> >> shell=createobject("wscript.shell")
> >> >> if shell is nothing then
> >> >> wscript.echo "No Shell"
> >> >> end if
> >> >> wscript.sleep 3000
> >> >> wscript.exit
> >> >> --end file-
> >> >> --
> >> >> Was this helpful? Then click the Ratings button. Voting helps the web
> >> >> interface.
> >> >> http://www.microsoft.com/wn3/locales/help/help_en-us.htm#RateAPostAsAnswer
> >> >> Mark L. Ferguson
> >> >> ..
> >> >>
> >> >> "Keith" <Keith@discussions.microsoft.com> wrote in message
> >> >> news:4AFCE5F0-DE85-4FC3-A5BA-B39EC4DC1BA3@microsoft.com...
> >> >> > Mark,
> >> >> >
> >> >> > I tried logging on as administrator, and my scheduled task did the
> >> >> > same
> >> >> > thing. Then I created a new scheduled task while still logged on as
> >> >> > administrator, and I got the same results...task completed when
> >> >> > nothing
> >> >> > actually happened. Unless I can come up with a solution to this
> >> >> > problem
> >> >> > soon, I will have to investigate alternatives like Macro Scheduler.
> >> >> > I
> >> >> > suppose there's no guarantee that it will work any better, but I've
> >> >> > got
> >> >> > to
> >> >> > do
> >> >> > something.
> >> >> >
> >> >> > Thanks again for all of your help. I really appreciate it, even if
> >> >> > we
> >> >> > haven't yet come up with a solution.
> >> >> >
> >> >> > Sincerely,
> >> >> >
> >> >> > Keith
> >> >> >
> >> >> >
> >> >> >
> >> >> >
> >> >> > "Mark L. Ferguson" wrote:
> >> >> >
> >> >> >> I would log on as default "Administrator" and schedule the task.,
> >> >> >> or
> >> >> >> at
> >> >> >> least test the run.
> >> >> >> If it's a permissions error, that should solve it.
> >> >> >> --
> >> >> >> Was this helpful? Then click the Ratings button. Voting helps the
> >> >> >> web
> >> >> >> interface.
> >> >> >> http://www.microsoft.com/wn3/locales/help/help_en-us.htm#RateAPostAsAnswer
> >> >> >> Mark L. Ferguson
> >> >> >> ..
> >> >> >>
> >> >> >> "Keith" <Keith@discussions.microsoft.com> wrote in message
> >> >> >> news:6F83A395-D52F-4458-A692-6DCFA611F76C@microsoft.com...
> >> >> >> > Mark,
> >> >> >> >
> >> >> >> > Thanks again for your input. I enabled the default Administrator
> >> >> >> > as
> >> >> >> > you
> >> >> >> > suggested, but I'm not sure what that will do. I have another
> >> >> >> > vbs
> >> >> >> > script
> >> >> >> > that also doesn't work properly. All it's supposed to do is pop
> >> >> >> > up
> >> >> >> > a
> >> >> >> > msgbox
> >> >> >> > reminding me to do something. What's weird is that the backup
> >> >> >> > one I
> >> >> >> > originally posted about says that it completed successfully, even
> >> >> >> > though
> >> >> >> > it
> >> >> >> > didn't do anything. I never receive any error message, it just
> >> >> >> > doesn't
> >> >> >> > do
> >> >> >> > what it's supposed to.
> >> >> >> >
> >> >> >> > Following is the script for the backup, just in case that helps:
> >> >> >> >
> >> >> >> > Dim PathVar
> >> >> >> > Dim RefNo
> >> >> >> > Dim objFSO
> >> >> >> > Dim objShell
> >> >> >> > Dim ShellString
> >> >> >> > Dim retvalue
> >> >> >> > Dim VarFilename
> >> >> >> >
> >> >> >> > set objShell = Wscript.CreateObject("Wscript.Shell")
> >> >> >> >
> >> >> >> > VarFilename= "xcopy " & chr(34) &
> >> >> >> > "C:\Users\kgrabske\Documents\*.*"
> >> >> >> > &
> >> >> >> > chr(34) & chr(32) & chr(34) & "Z:\backup\Keith\Documents\*.*" &
> >> >> >> > chr(34)
> >> >> >> > VarFilename=VarFilename & " /e /y /c /h /d
> >> >> >> > /EXCLUDE:C:\Users\kgrabske\Documents\BackupExclusions.txt"
> >> >> >> >
> >> >> >> > objShell.run VarFilename
> >> >> >> >
> >> >> >> > There isn't much to it, and I can't figure out why special
> >> >> >> > permissions
> >> >> >> > would
> >> >> >> > be required. I am already running the task using my login, and I
> >> >> >> > am
> >> >> >> > an
> >> >> >> > administrator.
> >> >> >> >
> >> >> >> > Do you have any other thoughts? I may see if Macro Scheduler
> >> >> >> > will
> >> >> >> > work.
> >> >> >> > I
> >> >> >> > used to use that a lot, but I moved away from it in favor of XP's
> >> >> >> > scheduled
> >> >> >> > tasks, which see to work much better than Vista's.
> >> >> >> >
> >> >> >> > Thanks,
> >> >> >> >
> >> >> >> > Keith
> >> >> >> >
> >> >> >> >
> >> >> >> > "Mark L. Ferguson" wrote:
> >> >> >> >
> >> >> >> >> It's very likely that the script won't run because it's calling
> >> >> >> >> something
> >> >> >> >> that needs you to 'run as administrator'. There are several ways
> >> >> >> >> you
> >> >> >> >> might
> >> >> >> >> accomplish this, but I'm not sure which one would work from
> >> >> >> >> Scheduled
> >> >> >> >> Tasks.
> >> >> >> >> One direct method might be to enable the default admin, and
> >> >> >> >> 'runas'
> >> >> >> >> that
> >> >> >> >> user.
> >> >> >> >> Go to Start/all programs/accessories/run, and type:
> >> >> >> >>
> >> >> >> >> control userpasswords2
> >> >> >> >>
> >> >> >> >> Advanced tab, Advanced button, Users folder, rightclick
> >> >> >> >> Administrator,
> >> >> >> >> Properties, uncheck checkbox for "Account is disabled"
> >> >> >> >> Restart Windows.
> >> >> >> >>
> >> >> >> >> There could be other methods, but 'runas /user:Administrator
> >> >> >> >> ...'
> >> >> >> >> would
> >> >> >> >> be
> >> >> >> >> tested this way and you could look for other ways to accomplish
> >> >> >> >> this.
> >> >> >> >> --
> >> >> >> >> Was this helpful? Then click the Ratings button. Voting helps
> >> >> >> >> the
> >> >> >> >> web
> >> >> >> >> interface.
> >> >> >> >> http://www.microsoft.com/wn3/locales/help/help_en-us.htm#RateAPostAsAnswer
> >> >> >> >> Mark L. Ferguson
> >> >> >> >> ..
> >> >> >> >>
> >> >> >> >> "Keith" <Keith@discussions.microsoft.com> wrote in message
> >> >> >> >> news:747F1A15-4206-466E-9679-AA6060305894@microsoft.com...
> >> >> >> >> > Mark,
> >> >> >> >> >
> >> >> >> >> > Thanks for the response. I tried creating a script which
> >> >> >> >> > calls
> >> >> >> >> > my
> >> >> >> >> > script
> >> >> >> >> > as
> >> >> >> >> > you suggested, and then created a scheduled task to run that
> >> >> >> >> > new
> >> >> >> >> > script,
> >> >> >> >> > but
> >> >> >> >> > I got the same result. Do you have any other suggestions?
> >> >> >> >> >
> >> >> >> >> > Thanks,
> >> >> >> >> >
> >> >> >> >> > Keith
> >> >> >> >> >
> >> >> >> >> >
> >> >> >> >> > "Mark L. Ferguson" wrote:
> >> >> >> >> >
> >> >> >> >> >> Create a script or bat file that runs the command:
> >> >> >> >> >> runas /user:<yourUserName> "cscript \"yourScript.VBS\" "
> >> >> >> >> >>
> >> >> >> >> >> --
> >> >> >> >> >> Was this helpful? Then click the Ratings button. Voting helps
> >> >> >> >> >> the
> >> >> >> >> >> web
> >> >> >> >> >> interface.
> >> >> >> >> >> http://www.microsoft.com/wn3/locales/help/help_en-us.htm#RateAPostAsAnswer
> >> >> >> >> >> Mark L. Ferguson
> >> >> >> >> >> .
> >> >> >> >> >>
 
Re: Task Scheduler Problem

I'm out of ideas. Those scripts should be no different running from Task
Scheduler than they are when successfully running under your ID. Something
in Vista Permissions is different there, but I don't know what it is. Sorry.
--
Mark L. Ferguson
..

"Keith" <Keith@discussions.microsoft.com> wrote in message
news:406156DF-39E2-487E-B314-8CF2A1FC751C@microsoft.com...
> Mark,
>
> I got the corrected script to work from the command line...and from the
> Task
> Scheduler as well!!! What exactly is ccsript? Anyway, then I figured I
> would try the same type of thing with my script, basically changing the
> Action in the scheduled task to run cscript with my vbs file as an
> argument.
> Unfortunately, I got the same results as before...the task says it
> completed
> but nothing really happened. I also tried the same thing with my little
> reminder script that shows a msgbox, but it too seemed to do nothing.
>
> I tried searching the knowledgebase using the following search string (in
> Technet):
>
> vista AND "task scheduler"
>
> but that didn't seem to turn up anything either. There we 13 topics, but
> nothing similar to what I'm experiencing.
>
> If you have any other ideas, I'd sure like to hear them.
>
> Thanks,
>
> Keith
>
>
> "Mark L. Ferguson" wrote:
>
>> Ha, I should test my script. It's quit, exit is dos
>> wscript.quit
>> If I ever successfully write a working script, you are probably not
>> getting
>> the 'no shell' and if not, I can't see another test.
>> I haven't searched the Knowledgebase for scheduled tasks bugs, but it
>> would
>> be next.
>>
>> --
>> Was this helpful? Then click the Ratings button. Voting helps the web
>> interface.
>> http://www.microsoft.com/wn3/locales/help/help_en-us.htm#RateAPostAsAnswer
>> Mark L. Ferguson
>> .
>>
>> "Keith" <Keith@discussions.microsoft.com> wrote in message
>> news:6952370C-9986-49C3-97B9-DA7259F2B476@microsoft.com...
>> > Mark,
>> >
>> > Here are my results from the command line now:
>> >
>> > C:\Documents and Settings\kgrabske\Documents\AAScripts>cscript go.vbs
>> > Microsoft (R) Windows Script Host Version 5.7
>> > Copyright (C) Microsoft Corporation. All rights reserved.
>> >
>> > Echo works
>> > C:\Documents and Settings\kgrabske\Documents\AAScripts\go.vbs(10, 1)
>> > Microsoft
>> > BScript runtime error: Object doesn't support this property or method:
>> > 'wscript
>> > exit'
>> >
>> > Thanks again for your help and patience!
>> >
>> > Keith
>> >
>> >
>> > "Mark L. Ferguson" wrote:
>> >
>> >> yes, I missed the 'set' command.
>> >> set shell=create...
>> >> --
>> >> Was this helpful? Then click the Ratings button. Voting helps the web
>> >> interface.
>> >> http://www.microsoft.com/wn3/locales/help/help_en-us.htm#RateAPostAsAnswer
>> >> Mark L. Ferguson
>> >> ..
>> >>
>> >> "Keith" <Keith@discussions.microsoft.com> wrote in message
>> >> news:AA069875-90ED-4068-97A6-24F5D817F39F@microsoft.com...
>> >> > Mark,
>> >> >
>> >> > I copied and pasted the code you supplied into a text file an then
>> >> > tried
>> >> > to
>> >> > run the script from the command line. Following are the results:
>> >> >
>> >> > ---------------------------------------------------------------------------------------------
>> >> > C:\Documents and Settings\kgrabske\Documents\AAScripts>cscript
>> >> > go.vbs
>> >> > Microsoft (R) Windows Script Host Version 5.7
>> >> > Copyright (C) Microsoft Corporation. All rights reserved.
>> >> >
>> >> > Echo works
>> >> > C:\Documents and Settings\kgrabske\Documents\AAScripts\go.vbs(5, 1)
>> >> > Microsoft VB
>> >> > Script runtime error: Object doesn't support this property or
>> >> > method:
>> >> > 'shell'
>> >> > ------------------------------------------------------------------------------------------------
>> >> >
>> >> > I'm not really an expert on scripting, but it looks like the problem
>> >> > is
>> >> > on
>> >> > the following line:
>> >> >
>> >> > shell=createobject("wscript.shell")
>> >> >
>> >> > Am I right in assuming that we need to get the script working from
>> >> > the
>> >> > command line before we can use it to test the Task Scheduler?
>> >> >
>> >> > Thanks,
>> >> >
>> >> > Keith
>> >> >
>> >> >
>> >> >
>> >> >
>> >> >
>> >> > "Mark L. Ferguson" wrote:
>> >> >
>> >> >> It's acting like you get 'access denied' on the xcopy, but that
>> >> >> other
>> >> >> script's failure on simply running a popup dialog indicates
>> >> >> something
>> >> >> deeper. You don't get the wscript object at all. I would say that
>> >> >> indicates
>> >> >> a Policy setting against script, except that you can run a script
>> >> >> in
>> >> >> other
>> >> >> than Scheduled Tasks.
>> >> >> Let's write a vbs that runs in CScript, with some echos, to get a
>> >> >> console
>> >> >> window.
>> >> >> command: cscript go.vbs
>> >> >> --go.vbs--
>> >> >> wscript.sleep 1000
>> >> >> wscript.echo "Echo works"
>> >> >> wscript.sleep 1000
>> >> >> shell=createobject("wscript.shell")
>> >> >> if shell is nothing then
>> >> >> wscript.echo "No Shell"
>> >> >> end if
>> >> >> wscript.sleep 3000
>> >> >> wscript.exit
>> >> >> --end file-
>> >> >> --
>> >> >> Was this helpful? Then click the Ratings button. Voting helps the
>> >> >> web
>> >> >> interface.
>> >> >> http://www.microsoft.com/wn3/locales/help/help_en-us.htm#RateAPostAsAnswer
>> >> >> Mark L. Ferguson
>> >> >> ..
>> >> >>
>> >> >> "Keith" <Keith@discussions.microsoft.com> wrote in message
>> >> >> news:4AFCE5F0-DE85-4FC3-A5BA-B39EC4DC1BA3@microsoft.com...
>> >> >> > Mark,
>> >> >> >
>> >> >> > I tried logging on as administrator, and my scheduled task did
>> >> >> > the
>> >> >> > same
>> >> >> > thing. Then I created a new scheduled task while still logged on
>> >> >> > as
>> >> >> > administrator, and I got the same results...task completed when
>> >> >> > nothing
>> >> >> > actually happened. Unless I can come up with a solution to this
>> >> >> > problem
>> >> >> > soon, I will have to investigate alternatives like Macro
>> >> >> > Scheduler.
>> >> >> > I
>> >> >> > suppose there's no guarantee that it will work any better, but
>> >> >> > I've
>> >> >> > got
>> >> >> > to
>> >> >> > do
>> >> >> > something.
>> >> >> >
>> >> >> > Thanks again for all of your help. I really appreciate it, even
>> >> >> > if
>> >> >> > we
>> >> >> > haven't yet come up with a solution.
>> >> >> >
>> >> >> > Sincerely,
>> >> >> >
>> >> >> > Keith
>> >> >> >
>> >> >> >
>> >> >> >
>> >> >> >
>> >> >> > "Mark L. Ferguson" wrote:
>> >> >> >
>> >> >> >> I would log on as default "Administrator" and schedule the
>> >> >> >> task.,
>> >> >> >> or
>> >> >> >> at
>> >> >> >> least test the run.
>> >> >> >> If it's a permissions error, that should solve it.
>> >> >> >> --
>> >> >> >> Was this helpful? Then click the Ratings button. Voting helps
>> >> >> >> the
>> >> >> >> web
>> >> >> >> interface.
>> >> >> >> http://www.microsoft.com/wn3/locales/help/help_en-us.htm#RateAPostAsAnswer
>> >> >> >> Mark L. Ferguson
>> >> >> >> ..
>> >> >> >>
>> >> >> >> "Keith" <Keith@discussions.microsoft.com> wrote in message
>> >> >> >> news:6F83A395-D52F-4458-A692-6DCFA611F76C@microsoft.com...
>> >> >> >> > Mark,
>> >> >> >> >
>> >> >> >> > Thanks again for your input. I enabled the default
>> >> >> >> > Administrator
>> >> >> >> > as
>> >> >> >> > you
>> >> >> >> > suggested, but I'm not sure what that will do. I have another
>> >> >> >> > vbs
>> >> >> >> > script
>> >> >> >> > that also doesn't work properly. All it's supposed to do is
>> >> >> >> > pop
>> >> >> >> > up
>> >> >> >> > a
>> >> >> >> > msgbox
>> >> >> >> > reminding me to do something. What's weird is that the backup
>> >> >> >> > one I
>> >> >> >> > originally posted about says that it completed successfully,
>> >> >> >> > even
>> >> >> >> > though
>> >> >> >> > it
>> >> >> >> > didn't do anything. I never receive any error message, it
>> >> >> >> > just
>> >> >> >> > doesn't
>> >> >> >> > do
>> >> >> >> > what it's supposed to.
>> >> >> >> >
>> >> >> >> > Following is the script for the backup, just in case that
>> >> >> >> > helps:
>> >> >> >> >
>> >> >> >> > Dim PathVar
>> >> >> >> > Dim RefNo
>> >> >> >> > Dim objFSO
>> >> >> >> > Dim objShell
>> >> >> >> > Dim ShellString
>> >> >> >> > Dim retvalue
>> >> >> >> > Dim VarFilename
>> >> >> >> >
>> >> >> >> > set objShell = Wscript.CreateObject("Wscript.Shell")
>> >> >> >> >
>> >> >> >> > VarFilename= "xcopy " & chr(34) &
>> >> >> >> > "C:\Users\kgrabske\Documents\*.*"
>> >> >> >> > &
>> >> >> >> > chr(34) & chr(32) & chr(34) & "Z:\backup\Keith\Documents\*.*"
>> >> >> >> > &
>> >> >> >> > chr(34)
>> >> >> >> > VarFilename=VarFilename & " /e /y /c /h /d
>> >> >> >> > /EXCLUDE:C:\Users\kgrabske\Documents\BackupExclusions.txt"
>> >> >> >> >
>> >> >> >> > objShell.run VarFilename
>> >> >> >> >
>> >> >> >> > There isn't much to it, and I can't figure out why special
>> >> >> >> > permissions
>> >> >> >> > would
>> >> >> >> > be required. I am already running the task using my login,
>> >> >> >> > and I
>> >> >> >> > am
>> >> >> >> > an
>> >> >> >> > administrator.
>> >> >> >> >
>> >> >> >> > Do you have any other thoughts? I may see if Macro Scheduler
>> >> >> >> > will
>> >> >> >> > work.
>> >> >> >> > I
>> >> >> >> > used to use that a lot, but I moved away from it in favor of
>> >> >> >> > XP's
>> >> >> >> > scheduled
>> >> >> >> > tasks, which see to work much better than Vista's.
>> >> >> >> >
>> >> >> >> > Thanks,
>> >> >> >> >
>> >> >> >> > Keith
>> >> >> >> >
>> >> >> >> >
>> >> >> >> > "Mark L. Ferguson" wrote:
>> >> >> >> >
>> >> >> >> >> It's very likely that the script won't run because it's
>> >> >> >> >> calling
>> >> >> >> >> something
>> >> >> >> >> that needs you to 'run as administrator'. There are several
>> >> >> >> >> ways
>> >> >> >> >> you
>> >> >> >> >> might
>> >> >> >> >> accomplish this, but I'm not sure which one would work from
>> >> >> >> >> Scheduled
>> >> >> >> >> Tasks.
>> >> >> >> >> One direct method might be to enable the default admin, and
>> >> >> >> >> 'runas'
>> >> >> >> >> that
>> >> >> >> >> user.
>> >> >> >> >> Go to Start/all programs/accessories/run, and type:
>> >> >> >> >>
>> >> >> >> >> control userpasswords2
>> >> >> >> >>
>> >> >> >> >> Advanced tab, Advanced button, Users folder, rightclick
>> >> >> >> >> Administrator,
>> >> >> >> >> Properties, uncheck checkbox for "Account is disabled"
>> >> >> >> >> Restart Windows.
>> >> >> >> >>
>> >> >> >> >> There could be other methods, but 'runas /user:Administrator
>> >> >> >> >> ...'
>> >> >> >> >> would
>> >> >> >> >> be
>> >> >> >> >> tested this way and you could look for other ways to
>> >> >> >> >> accomplish
>> >> >> >> >> this.
>> >> >> >> >> --
>> >> >> >> >> Was this helpful? Then click the Ratings button. Voting helps
>> >> >> >> >> the
>> >> >> >> >> web
>> >> >> >> >> interface.
>> >> >> >> >> http://www.microsoft.com/wn3/locales/help/help_en-us.htm#RateAPostAsAnswer
>> >> >> >> >> Mark L. Ferguson
>> >> >> >> >> ..
>> >> >> >> >>
>> >> >> >> >> "Keith" <Keith@discussions.microsoft.com> wrote in message
>> >> >> >> >> news:747F1A15-4206-466E-9679-AA6060305894@microsoft.com...
>> >> >> >> >> > Mark,
>> >> >> >> >> >
>> >> >> >> >> > Thanks for the response. I tried creating a script which
>> >> >> >> >> > calls
>> >> >> >> >> > my
>> >> >> >> >> > script
>> >> >> >> >> > as
>> >> >> >> >> > you suggested, and then created a scheduled task to run
>> >> >> >> >> > that
>> >> >> >> >> > new
>> >> >> >> >> > script,
>> >> >> >> >> > but
>> >> >> >> >> > I got the same result. Do you have any other suggestions?
>> >> >> >> >> >
>> >> >> >> >> > Thanks,
>> >> >> >> >> >
>> >> >> >> >> > Keith
>> >> >> >> >> >
>> >> >> >> >> >
>> >> >> >> >> > "Mark L. Ferguson" wrote:
>> >> >> >> >> >
>> >> >> >> >> >> Create a script or bat file that runs the command:
>> >> >> >> >> >> runas /user:<yourUserName> "cscript \"yourScript.VBS\" "
>> >> >> >> >> >>
>> >> >> >> >> >> --
>> >> >> >> >> >> Was this helpful? Then click the Ratings button. Voting
>> >> >> >> >> >> helps
>> >> >> >> >> >> the
>> >> >> >> >> >> web
>> >> >> >> >> >> interface.
>> >> >> >> >> >> http://www.microsoft.com/wn3/locales/help/help_en-us.htm#RateAPostAsAnswer
>> >> >> >> >> >> Mark L. Ferguson
>> >> >> >> >> >> .
>> >> >> >> >> >>
 
Re: Task Scheduler Problem

Mark,

I can't say you didn't try!

Thanks again,

Keith


"Mark L. Ferguson" wrote:

> I'm out of ideas. Those scripts should be no different running from Task
> Scheduler than they are when successfully running under your ID. Something
> in Vista Permissions is different there, but I don't know what it is. Sorry.
> --
> Mark L. Ferguson
> ..
>
> "Keith" <Keith@discussions.microsoft.com> wrote in message
> news:406156DF-39E2-487E-B314-8CF2A1FC751C@microsoft.com...
> > Mark,
> >
> > I got the corrected script to work from the command line...and from the
> > Task
> > Scheduler as well!!! What exactly is ccsript? Anyway, then I figured I
> > would try the same type of thing with my script, basically changing the
> > Action in the scheduled task to run cscript with my vbs file as an
> > argument.
> > Unfortunately, I got the same results as before...the task says it
> > completed
> > but nothing really happened. I also tried the same thing with my little
> > reminder script that shows a msgbox, but it too seemed to do nothing.
> >
> > I tried searching the knowledgebase using the following search string (in
> > Technet):
> >
> > vista AND "task scheduler"
> >
> > but that didn't seem to turn up anything either. There we 13 topics, but
> > nothing similar to what I'm experiencing.
> >
> > If you have any other ideas, I'd sure like to hear them.
> >
> > Thanks,
> >
> > Keith
> >
> >
> > "Mark L. Ferguson" wrote:
> >
> >> Ha, I should test my script. It's quit, exit is dos
> >> wscript.quit
> >> If I ever successfully write a working script, you are probably not
> >> getting
> >> the 'no shell' and if not, I can't see another test.
> >> I haven't searched the Knowledgebase for scheduled tasks bugs, but it
> >> would
> >> be next.
> >>
> >> --
> >> Was this helpful? Then click the Ratings button. Voting helps the web
> >> interface.
> >> http://www.microsoft.com/wn3/locales/help/help_en-us.htm#RateAPostAsAnswer
> >> Mark L. Ferguson
> >> .
> >>
> >> "Keith" <Keith@discussions.microsoft.com> wrote in message
> >> news:6952370C-9986-49C3-97B9-DA7259F2B476@microsoft.com...
> >> > Mark,
> >> >
> >> > Here are my results from the command line now:
> >> >
> >> > C:\Documents and Settings\kgrabske\Documents\AAScripts>cscript go.vbs
> >> > Microsoft (R) Windows Script Host Version 5.7
> >> > Copyright (C) Microsoft Corporation. All rights reserved.
> >> >
> >> > Echo works
> >> > C:\Documents and Settings\kgrabske\Documents\AAScripts\go.vbs(10, 1)
> >> > Microsoft
> >> > BScript runtime error: Object doesn't support this property or method:
> >> > 'wscript
> >> > exit'
> >> >
> >> > Thanks again for your help and patience!
> >> >
> >> > Keith
> >> >
> >> >
> >> > "Mark L. Ferguson" wrote:
> >> >
> >> >> yes, I missed the 'set' command.
> >> >> set shell=create...
> >> >> --
> >> >> Was this helpful? Then click the Ratings button. Voting helps the web
> >> >> interface.
> >> >> http://www.microsoft.com/wn3/locales/help/help_en-us.htm#RateAPostAsAnswer
> >> >> Mark L. Ferguson
> >> >> ..
> >> >>
> >> >> "Keith" <Keith@discussions.microsoft.com> wrote in message
> >> >> news:AA069875-90ED-4068-97A6-24F5D817F39F@microsoft.com...
> >> >> > Mark,
> >> >> >
> >> >> > I copied and pasted the code you supplied into a text file an then
> >> >> > tried
> >> >> > to
> >> >> > run the script from the command line. Following are the results:
> >> >> >
> >> >> > ---------------------------------------------------------------------------------------------
> >> >> > C:\Documents and Settings\kgrabske\Documents\AAScripts>cscript
> >> >> > go.vbs
> >> >> > Microsoft (R) Windows Script Host Version 5.7
> >> >> > Copyright (C) Microsoft Corporation. All rights reserved.
> >> >> >
> >> >> > Echo works
> >> >> > C:\Documents and Settings\kgrabske\Documents\AAScripts\go.vbs(5, 1)
> >> >> > Microsoft VB
> >> >> > Script runtime error: Object doesn't support this property or
> >> >> > method:
> >> >> > 'shell'
> >> >> > ------------------------------------------------------------------------------------------------
> >> >> >
> >> >> > I'm not really an expert on scripting, but it looks like the problem
> >> >> > is
> >> >> > on
> >> >> > the following line:
> >> >> >
> >> >> > shell=createobject("wscript.shell")
> >> >> >
> >> >> > Am I right in assuming that we need to get the script working from
> >> >> > the
> >> >> > command line before we can use it to test the Task Scheduler?
> >> >> >
> >> >> > Thanks,
> >> >> >
> >> >> > Keith
> >> >> >
> >> >> >
> >> >> >
> >> >> >
> >> >> >
> >> >> > "Mark L. Ferguson" wrote:
> >> >> >
> >> >> >> It's acting like you get 'access denied' on the xcopy, but that
> >> >> >> other
> >> >> >> script's failure on simply running a popup dialog indicates
> >> >> >> something
> >> >> >> deeper. You don't get the wscript object at all. I would say that
> >> >> >> indicates
> >> >> >> a Policy setting against script, except that you can run a script
> >> >> >> in
> >> >> >> other
> >> >> >> than Scheduled Tasks.
> >> >> >> Let's write a vbs that runs in CScript, with some echos, to get a
> >> >> >> console
> >> >> >> window.
> >> >> >> command: cscript go.vbs
> >> >> >> --go.vbs--
> >> >> >> wscript.sleep 1000
> >> >> >> wscript.echo "Echo works"
> >> >> >> wscript.sleep 1000
> >> >> >> shell=createobject("wscript.shell")
> >> >> >> if shell is nothing then
> >> >> >> wscript.echo "No Shell"
> >> >> >> end if
> >> >> >> wscript.sleep 3000
> >> >> >> wscript.exit
> >> >> >> --end file-
> >> >> >> --
> >> >> >> Was this helpful? Then click the Ratings button. Voting helps the
> >> >> >> web
> >> >> >> interface.
> >> >> >> http://www.microsoft.com/wn3/locales/help/help_en-us.htm#RateAPostAsAnswer
> >> >> >> Mark L. Ferguson
> >> >> >> ..
> >> >> >>
> >> >> >> "Keith" <Keith@discussions.microsoft.com> wrote in message
> >> >> >> news:4AFCE5F0-DE85-4FC3-A5BA-B39EC4DC1BA3@microsoft.com...
> >> >> >> > Mark,
> >> >> >> >
> >> >> >> > I tried logging on as administrator, and my scheduled task did
> >> >> >> > the
> >> >> >> > same
> >> >> >> > thing. Then I created a new scheduled task while still logged on
> >> >> >> > as
> >> >> >> > administrator, and I got the same results...task completed when
> >> >> >> > nothing
> >> >> >> > actually happened. Unless I can come up with a solution to this
> >> >> >> > problem
> >> >> >> > soon, I will have to investigate alternatives like Macro
> >> >> >> > Scheduler.
> >> >> >> > I
> >> >> >> > suppose there's no guarantee that it will work any better, but
> >> >> >> > I've
> >> >> >> > got
> >> >> >> > to
> >> >> >> > do
> >> >> >> > something.
> >> >> >> >
> >> >> >> > Thanks again for all of your help. I really appreciate it, even
> >> >> >> > if
> >> >> >> > we
> >> >> >> > haven't yet come up with a solution.
> >> >> >> >
> >> >> >> > Sincerely,
> >> >> >> >
> >> >> >> > Keith
> >> >> >> >
> >> >> >> >
> >> >> >> >
> >> >> >> >
> >> >> >> > "Mark L. Ferguson" wrote:
> >> >> >> >
> >> >> >> >> I would log on as default "Administrator" and schedule the
> >> >> >> >> task.,
> >> >> >> >> or
> >> >> >> >> at
> >> >> >> >> least test the run.
> >> >> >> >> If it's a permissions error, that should solve it.
> >> >> >> >> --
> >> >> >> >> Was this helpful? Then click the Ratings button. Voting helps
> >> >> >> >> the
> >> >> >> >> web
> >> >> >> >> interface.
> >> >> >> >> http://www.microsoft.com/wn3/locales/help/help_en-us.htm#RateAPostAsAnswer
> >> >> >> >> Mark L. Ferguson
> >> >> >> >> ..
> >> >> >> >>
> >> >> >> >> "Keith" <Keith@discussions.microsoft.com> wrote in message
> >> >> >> >> news:6F83A395-D52F-4458-A692-6DCFA611F76C@microsoft.com...
> >> >> >> >> > Mark,
> >> >> >> >> >
> >> >> >> >> > Thanks again for your input. I enabled the default
> >> >> >> >> > Administrator
> >> >> >> >> > as
> >> >> >> >> > you
> >> >> >> >> > suggested, but I'm not sure what that will do. I have another
> >> >> >> >> > vbs
> >> >> >> >> > script
> >> >> >> >> > that also doesn't work properly. All it's supposed to do is
> >> >> >> >> > pop
> >> >> >> >> > up
> >> >> >> >> > a
> >> >> >> >> > msgbox
> >> >> >> >> > reminding me to do something. What's weird is that the backup
> >> >> >> >> > one I
> >> >> >> >> > originally posted about says that it completed successfully,
> >> >> >> >> > even
> >> >> >> >> > though
> >> >> >> >> > it
> >> >> >> >> > didn't do anything. I never receive any error message, it
> >> >> >> >> > just
> >> >> >> >> > doesn't
> >> >> >> >> > do
> >> >> >> >> > what it's supposed to.
> >> >> >> >> >
> >> >> >> >> > Following is the script for the backup, just in case that
> >> >> >> >> > helps:
> >> >> >> >> >
> >> >> >> >> > Dim PathVar
> >> >> >> >> > Dim RefNo
> >> >> >> >> > Dim objFSO
> >> >> >> >> > Dim objShell
> >> >> >> >> > Dim ShellString
> >> >> >> >> > Dim retvalue
> >> >> >> >> > Dim VarFilename
> >> >> >> >> >
> >> >> >> >> > set objShell = Wscript.CreateObject("Wscript.Shell")
> >> >> >> >> >
> >> >> >> >> > VarFilename= "xcopy " & chr(34) &
> >> >> >> >> > "C:\Users\kgrabske\Documents\*.*"
> >> >> >> >> > &
> >> >> >> >> > chr(34) & chr(32) & chr(34) & "Z:\backup\Keith\Documents\*.*"
> >> >> >> >> > &
> >> >> >> >> > chr(34)
> >> >> >> >> > VarFilename=VarFilename & " /e /y /c /h /d
> >> >> >> >> > /EXCLUDE:C:\Users\kgrabske\Documents\BackupExclusions.txt"
> >> >> >> >> >
> >> >> >> >> > objShell.run VarFilename
> >> >> >> >> >
> >> >> >> >> > There isn't much to it, and I can't figure out why special
> >> >> >> >> > permissions
> >> >> >> >> > would
> >> >> >> >> > be required. I am already running the task using my login,
> >> >> >> >> > and I
> >> >> >> >> > am
> >> >> >> >> > an
> >> >> >> >> > administrator.
> >> >> >> >> >
> >> >> >> >> > Do you have any other thoughts? I may see if Macro Scheduler
> >> >> >> >> > will
> >> >> >> >> > work.
> >> >> >> >> > I
> >> >> >> >> > used to use that a lot, but I moved away from it in favor of
> >> >> >> >> > XP's
> >> >> >> >> > scheduled
> >> >> >> >> > tasks, which see to work much better than Vista's.
> >> >> >> >> >
> >> >> >> >> > Thanks,
> >> >> >> >> >
> >> >> >> >> > Keith
> >> >> >> >> >
> >> >> >> >> >
> >> >> >> >> > "Mark L. Ferguson" wrote:
> >> >> >> >> >
> >> >> >> >> >> It's very likely that the script won't run because it's
> >> >> >> >> >> calling
> >> >> >> >> >> something
> >> >> >> >> >> that needs you to 'run as administrator'. There are several
> >> >> >> >> >> ways
> >> >> >> >> >> you
 
Re: Task Scheduler Problem

I discovered the problem. You have set your scheduled task to 'run whether
the user is logged on or not', and no interface apps show on the desk when
you do that. You have to use the setting to 'run while the user is logged
on'

-- Was this helpful? Then click the Ratings button. Voting helps the web
interface.
http://www.microsoft.com/wn3/locales/help/help_en-us.htm#RateAPostAsAnswer
Mark L. Ferguson
..

"Keith" <Keith@discussions.microsoft.com> wrote in message
news:CDCFE3B3-40DA-41CD-BD75-533B67C27EAD@microsoft.com...
> Mark,
>
> I can't say you didn't try!
>
> Thanks again,
>
> Keith
>
>
> "Mark L. Ferguson" wrote:
>
>> I'm out of ideas. Those scripts should be no different running from Task
>> Scheduler than they are when successfully running under your ID.
>> Something
>> in Vista Permissions is different there, but I don't know what it is.
>> Sorry.
>> --
>> Mark L. Ferguson
>> ..
>>
>> "Keith" <Keith@discussions.microsoft.com> wrote in message
>> news:406156DF-39E2-487E-B314-8CF2A1FC751C@microsoft.com...
>> > Mark,
>> >
>> > I got the corrected script to work from the command line...and from the
>> > Task
>> > Scheduler as well!!! What exactly is ccsript? Anyway, then I figured
>> > I
>> > would try the same type of thing with my script, basically changing the
>> > Action in the scheduled task to run cscript with my vbs file as an
>> > argument.
>> > Unfortunately, I got the same results as before...the task says it
>> > completed
>> > but nothing really happened. I also tried the same thing with my
>> > little
>> > reminder script that shows a msgbox, but it too seemed to do nothing.
>> >
>> > I tried searching the knowledgebase using the following search string
>> > (in
>> > Technet):
>> >
>> > vista AND "task scheduler"
>> >
>> > but that didn't seem to turn up anything either. There we 13 topics,
>> > but
>> > nothing similar to what I'm experiencing.
>> >
>> > If you have any other ideas, I'd sure like to hear them.
>> >
>> > Thanks,
>> >
>> > Keith
>> >
>> >
>> > "Mark L. Ferguson" wrote:
>> >
>> >> Ha, I should test my script. It's quit, exit is dos
>> >> wscript.quit
>> >> If I ever successfully write a working script, you are probably not
>> >> getting
>> >> the 'no shell' and if not, I can't see another test.
>> >> I haven't searched the Knowledgebase for scheduled tasks bugs, but it
>> >> would
>> >> be next.
>> >>
>> >> --
>> >> Was this helpful? Then click the Ratings button. Voting helps the web
>> >> interface.
>> >> http://www.microsoft.com/wn3/locales/help/help_en-us.htm#RateAPostAsAnswer
>> >> Mark L. Ferguson
>> >> .
>> >>
>> >> "Keith" <Keith@discussions.microsoft.com> wrote in message
>> >> news:6952370C-9986-49C3-97B9-DA7259F2B476@microsoft.com...
>> >> > Mark,
>> >> >
>> >> > Here are my results from the command line now:
>> >> >
>> >> > C:\Documents and Settings\kgrabske\Documents\AAScripts>cscript
>> >> > go.vbs
>> >> > Microsoft (R) Windows Script Host Version 5.7
>> >> > Copyright (C) Microsoft Corporation. All rights reserved.
>> >> >
>> >> > Echo works
>> >> > C:\Documents and Settings\kgrabske\Documents\AAScripts\go.vbs(10, 1)
>> >> > Microsoft
>> >> > BScript runtime error: Object doesn't support this property or
>> >> > method:
>> >> > 'wscript
>> >> > exit'
>> >> >
>> >> > Thanks again for your help and patience!
>> >> >
>> >> > Keith
>> >> >
>> >> >
>> >> > "Mark L. Ferguson" wrote:
>> >> >
>> >> >> yes, I missed the 'set' command.
>> >> >> set shell=create...
>> >> >> --
>> >> >> Was this helpful? Then click the Ratings button. Voting helps the
>> >> >> web
>> >> >> interface.
>> >> >> http://www.microsoft.com/wn3/locales/help/help_en-us.htm#RateAPostAsAnswer
>> >> >> Mark L. Ferguson
>> >> >> ..
>> >> >>
>> >> >> "Keith" <Keith@discussions.microsoft.com> wrote in message
>> >> >> news:AA069875-90ED-4068-97A6-24F5D817F39F@microsoft.com...
>> >> >> > Mark,
>> >> >> >
>> >> >> > I copied and pasted the code you supplied into a text file an
>> >> >> > then
>> >> >> > tried
>> >> >> > to
>> >> >> > run the script from the command line. Following are the results:
>> >> >> >
>> >> >> > ---------------------------------------------------------------------------------------------
>> >> >> > C:\Documents and Settings\kgrabske\Documents\AAScripts>cscript
>> >> >> > go.vbs
>> >> >> > Microsoft (R) Windows Script Host Version 5.7
>> >> >> > Copyright (C) Microsoft Corporation. All rights reserved.
>> >> >> >
>> >> >> > Echo works
>> >> >> > C:\Documents and Settings\kgrabske\Documents\AAScripts\go.vbs(5,
>> >> >> > 1)
>> >> >> > Microsoft VB
>> >> >> > Script runtime error: Object doesn't support this property or
>> >> >> > method:
>> >> >> > 'shell'
>> >> >> > ------------------------------------------------------------------------------------------------
>> >> >> >
>> >> >> > I'm not really an expert on scripting, but it looks like the
>> >> >> > problem
>> >> >> > is
>> >> >> > on
>> >> >> > the following line:
>> >> >> >
>> >> >> > shell=createobject("wscript.shell")
>> >> >> >
>> >> >> > Am I right in assuming that we need to get the script working
>> >> >> > from
>> >> >> > the
>> >> >> > command line before we can use it to test the Task Scheduler?
>> >> >> >
>> >> >> > Thanks,
>> >> >> >
>> >> >> > Keith
>> >> >> >
>> >> >> >
>> >> >> >
>> >> >> >
>> >> >> >
>> >> >> > "Mark L. Ferguson" wrote:
>> >> >> >
>> >> >> >> It's acting like you get 'access denied' on the xcopy, but that
>> >> >> >> other
>> >> >> >> script's failure on simply running a popup dialog indicates
>> >> >> >> something
>> >> >> >> deeper. You don't get the wscript object at all. I would say
>> >> >> >> that
>> >> >> >> indicates
>> >> >> >> a Policy setting against script, except that you can run a
>> >> >> >> script
>> >> >> >> in
>> >> >> >> other
>> >> >> >> than Scheduled Tasks.
>> >> >> >> Let's write a vbs that runs in CScript, with some echos, to get
>> >> >> >> a
>> >> >> >> console
>> >> >> >> window.
>> >> >> >> command: cscript go.vbs
>> >> >> >> --go.vbs--
>> >> >> >> wscript.sleep 1000
>> >> >> >> wscript.echo "Echo works"
>> >> >> >> wscript.sleep 1000
>> >> >> >> shell=createobject("wscript.shell")
>> >> >> >> if shell is nothing then
>> >> >> >> wscript.echo "No Shell"
>> >> >> >> end if
>> >> >> >> wscript.sleep 3000
>> >> >> >> wscript.exit
>> >> >> >> --end file-
>> >> >> >> --
>> >> >> >> Was this helpful? Then click the Ratings button. Voting helps
>> >> >> >> the
>> >> >> >> web
>> >> >> >> interface.
>> >> >> >> http://www.microsoft.com/wn3/locales/help/help_en-us.htm#RateAPostAsAnswer
>> >> >> >> Mark L. Ferguson
>> >> >> >> ..
>> >> >> >>
>> >> >> >> "Keith" <Keith@discussions.microsoft.com> wrote in message
>> >> >> >> news:4AFCE5F0-DE85-4FC3-A5BA-B39EC4DC1BA3@microsoft.com...
>> >> >> >> > Mark,
>> >> >> >> >
>> >> >> >> > I tried logging on as administrator, and my scheduled task did
>> >> >> >> > the
>> >> >> >> > same
>> >> >> >> > thing. Then I created a new scheduled task while still logged
>> >> >> >> > on
>> >> >> >> > as
>> >> >> >> > administrator, and I got the same results...task completed
>> >> >> >> > when
>> >> >> >> > nothing
>> >> >> >> > actually happened. Unless I can come up with a solution to
>> >> >> >> > this
>> >> >> >> > problem
>> >> >> >> > soon, I will have to investigate alternatives like Macro
>> >> >> >> > Scheduler.
>> >> >> >> > I
>> >> >> >> > suppose there's no guarantee that it will work any better, but
>> >> >> >> > I've
>> >> >> >> > got
>> >> >> >> > to
>> >> >> >> > do
>> >> >> >> > something.
>> >> >> >> >
>> >> >> >> > Thanks again for all of your help. I really appreciate it,
>> >> >> >> > even
>> >> >> >> > if
>> >> >> >> > we
>> >> >> >> > haven't yet come up with a solution.
>> >> >> >> >
>> >> >> >> > Sincerely,
>> >> >> >> >
>> >> >> >> > Keith
>> >> >> >> >
>> >> >> >> >
>> >> >> >> >
>> >> >> >> >
>> >> >> >> > "Mark L. Ferguson" wrote:
>> >> >> >> >
>> >> >> >> >> I would log on as default "Administrator" and schedule the
>> >> >> >> >> task.,
>> >> >> >> >> or
>> >> >> >> >> at
>> >> >> >> >> least test the run.
>> >> >> >> >> If it's a permissions error, that should solve it.
>> >> >> >> >> --
>> >> >> >> >> Was this helpful? Then click the Ratings button. Voting helps
>> >> >> >> >> the
>> >> >> >> >> web
>> >> >> >> >> interface.
>> >> >> >> >> http://www.microsoft.com/wn3/locales/help/help_en-us.htm#RateAPostAsAnswer
>> >> >> >> >> Mark L. Ferguson
>> >> >> >> >> ..
>> >> >> >> >>
>> >> >> >> >> "Keith" <Keith@discussions.microsoft.com> wrote in message
>> >> >> >> >> news:6F83A395-D52F-4458-A692-6DCFA611F76C@microsoft.com...
>> >> >> >> >> > Mark,
>> >> >> >> >> >
>> >> >> >> >> > Thanks again for your input. I enabled the default
>> >> >> >> >> > Administrator
>> >> >> >> >> > as
>> >> >> >> >> > you
>> >> >> >> >> > suggested, but I'm not sure what that will do. I have
>> >> >> >> >> > another
>> >> >> >> >> > vbs
>> >> >> >> >> > script
>> >> >> >> >> > that also doesn't work properly. All it's supposed to do
>> >> >> >> >> > is
>> >> >> >> >> > pop
>> >> >> >> >> > up
>> >> >> >> >> > a
>> >> >> >> >> > msgbox
>> >> >> >> >> > reminding me to do something. What's weird is that the
>> >> >> >> >> > backup
>> >> >> >> >> > one I
>> >> >> >> >> > originally posted about says that it completed
>> >> >> >> >> > successfully,
>> >> >> >> >> > even
>> >> >> >> >> > though
>> >> >> >> >> > it
>> >> >> >> >> > didn't do anything. I never receive any error message, it
>> >> >> >> >> > just
>> >> >> >> >> > doesn't
>> >> >> >> >> > do
>> >> >> >> >> > what it's supposed to.
>> >> >> >> >> >
>> >> >> >> >> > Following is the script for the backup, just in case that
>> >> >> >> >> > helps:
>> >> >> >> >> >
>> >> >> >> >> > Dim PathVar
>> >> >> >> >> > Dim RefNo
>> >> >> >> >> > Dim objFSO
>> >> >> >> >> > Dim objShell
>> >> >> >> >> > Dim ShellString
>> >> >> >> >> > Dim retvalue
>> >> >> >> >> > Dim VarFilename
>> >> >> >> >> >
>> >> >> >> >> > set objShell = Wscript.CreateObject("Wscript.Shell")
>> >> >> >> >> >
>> >> >> >> >> > VarFilename= "xcopy " & chr(34) &
>> >> >> >> >> > "C:\Users\kgrabske\Documents\*.*"
>> >> >> >> >> > &
>> >> >> >> >> > chr(34) & chr(32) & chr(34) &
>> >> >> >> >> > "Z:\backup\Keith\Documents\*.*"
>> >> >> >> >> > &
>> >> >> >> >> > chr(34)
>> >> >> >> >> > VarFilename=VarFilename & " /e /y /c /h /d
>> >> >> >> >> > /EXCLUDE:C:\Users\kgrabske\Documents\BackupExclusions.txt"
>> >> >> >> >> >
>> >> >> >> >> > objShell.run VarFilename
>> >> >> >> >> >
>> >> >> >> >> > There isn't much to it, and I can't figure out why special
>> >> >> >> >> > permissions
>> >> >> >> >> > would
>> >> >> >> >> > be required. I am already running the task using my login,
>> >> >> >> >> > and I
>> >> >> >> >> > am
>> >> >> >> >> > an
>> >> >> >> >> > administrator.
>> >> >> >> >> >
>> >> >> >> >> > Do you have any other thoughts? I may see if Macro
>> >> >> >> >> > Scheduler
>> >> >> >> >> > will
>> >> >> >> >> > work.
>> >> >> >> >> > I
>> >> >> >> >> > used to use that a lot, but I moved away from it in favor
>> >> >> >> >> > of
>> >> >> >> >> > XP's
>> >> >> >> >> > scheduled
>> >> >> >> >> > tasks, which see to work much better than Vista's.
>> >> >> >> >> >
>> >> >> >> >> > Thanks,
>> >> >> >> >> >
>> >> >> >> >> > Keith
>> >> >> >> >> >
>> >> >> >> >> >
>> >> >> >> >> > "Mark L. Ferguson" wrote:
>> >> >> >> >> >
>> >> >> >> >> >> It's very likely that the script won't run because it's
>> >> >> >> >> >> calling
>> >> >> >> >> >> something
>> >> >> >> >> >> that needs you to 'run as administrator'. There are
>> >> >> >> >> >> several
>> >> >> >> >> >> ways
>> >> >> >> >> >> you
 
Re: Task Scheduler Problem

Mark,

Brilliant!!!

Thank you so much for your perseverance with this matter. Here I thought
that I was doing the smart thing by checking the 'run whether the user is
logged on or not' button, but I guess it's just the opposite with this kind
of thing.

Anyway, I really appreciate the effort you made for me.

Sincerely,

Keith


"Mark L. Ferguson" wrote:

> I discovered the problem. You have set your scheduled task to 'run whether
> the user is logged on or not', and no interface apps show on the desk when
> you do that. You have to use the setting to 'run while the user is logged
> on'
>
> -- Was this helpful? Then click the Ratings button. Voting helps the web
> interface.
> http://www.microsoft.com/wn3/locales/help/help_en-us.htm#RateAPostAsAnswer
> Mark L. Ferguson
> ..
>
> "Keith" <Keith@discussions.microsoft.com> wrote in message
> news:CDCFE3B3-40DA-41CD-BD75-533B67C27EAD@microsoft.com...
> > Mark,
> >
> > I can't say you didn't try!
> >
> > Thanks again,
> >
> > Keith
> >
> >
> > "Mark L. Ferguson" wrote:
> >
> >> I'm out of ideas. Those scripts should be no different running from Task
> >> Scheduler than they are when successfully running under your ID.
> >> Something
> >> in Vista Permissions is different there, but I don't know what it is.
> >> Sorry.
> >> --
> >> Mark L. Ferguson
> >> ..
> >>
> >> "Keith" <Keith@discussions.microsoft.com> wrote in message
> >> news:406156DF-39E2-487E-B314-8CF2A1FC751C@microsoft.com...
> >> > Mark,
> >> >
> >> > I got the corrected script to work from the command line...and from the
> >> > Task
> >> > Scheduler as well!!! What exactly is ccsript? Anyway, then I figured
> >> > I
> >> > would try the same type of thing with my script, basically changing the
> >> > Action in the scheduled task to run cscript with my vbs file as an
> >> > argument.
> >> > Unfortunately, I got the same results as before...the task says it
> >> > completed
> >> > but nothing really happened. I also tried the same thing with my
> >> > little
> >> > reminder script that shows a msgbox, but it too seemed to do nothing.
> >> >
> >> > I tried searching the knowledgebase using the following search string
> >> > (in
> >> > Technet):
> >> >
> >> > vista AND "task scheduler"
> >> >
> >> > but that didn't seem to turn up anything either. There we 13 topics,
> >> > but
> >> > nothing similar to what I'm experiencing.
> >> >
> >> > If you have any other ideas, I'd sure like to hear them.
> >> >
> >> > Thanks,
> >> >
> >> > Keith
> >> >
> >> >
> >> > "Mark L. Ferguson" wrote:
> >> >
> >> >> Ha, I should test my script. It's quit, exit is dos
> >> >> wscript.quit
> >> >> If I ever successfully write a working script, you are probably not
> >> >> getting
> >> >> the 'no shell' and if not, I can't see another test.
> >> >> I haven't searched the Knowledgebase for scheduled tasks bugs, but it
> >> >> would
> >> >> be next.
> >> >>
> >> >> --
> >> >> Was this helpful? Then click the Ratings button. Voting helps the web
> >> >> interface.
> >> >> http://www.microsoft.com/wn3/locales/help/help_en-us.htm#RateAPostAsAnswer
> >> >> Mark L. Ferguson
> >> >> .
> >> >>
> >> >> "Keith" <Keith@discussions.microsoft.com> wrote in message
> >> >> news:6952370C-9986-49C3-97B9-DA7259F2B476@microsoft.com...
> >> >> > Mark,
> >> >> >
> >> >> > Here are my results from the command line now:
> >> >> >
> >> >> > C:\Documents and Settings\kgrabske\Documents\AAScripts>cscript
> >> >> > go.vbs
> >> >> > Microsoft (R) Windows Script Host Version 5.7
> >> >> > Copyright (C) Microsoft Corporation. All rights reserved.
> >> >> >
> >> >> > Echo works
> >> >> > C:\Documents and Settings\kgrabske\Documents\AAScripts\go.vbs(10, 1)
> >> >> > Microsoft
> >> >> > BScript runtime error: Object doesn't support this property or
> >> >> > method:
> >> >> > 'wscript
> >> >> > exit'
> >> >> >
> >> >> > Thanks again for your help and patience!
> >> >> >
> >> >> > Keith
> >> >> >
> >> >> >
> >> >> > "Mark L. Ferguson" wrote:
> >> >> >
> >> >> >> yes, I missed the 'set' command.
> >> >> >> set shell=create...
> >> >> >> --
> >> >> >> Was this helpful? Then click the Ratings button. Voting helps the
> >> >> >> web
> >> >> >> interface.
> >> >> >> http://www.microsoft.com/wn3/locales/help/help_en-us.htm#RateAPostAsAnswer
> >> >> >> Mark L. Ferguson
> >> >> >> ..
> >> >> >>
> >> >> >> "Keith" <Keith@discussions.microsoft.com> wrote in message
> >> >> >> news:AA069875-90ED-4068-97A6-24F5D817F39F@microsoft.com...
> >> >> >> > Mark,
> >> >> >> >
> >> >> >> > I copied and pasted the code you supplied into a text file an
> >> >> >> > then
> >> >> >> > tried
> >> >> >> > to
> >> >> >> > run the script from the command line. Following are the results:
> >> >> >> >
> >> >> >> > ---------------------------------------------------------------------------------------------
> >> >> >> > C:\Documents and Settings\kgrabske\Documents\AAScripts>cscript
> >> >> >> > go.vbs
> >> >> >> > Microsoft (R) Windows Script Host Version 5.7
> >> >> >> > Copyright (C) Microsoft Corporation. All rights reserved.
> >> >> >> >
> >> >> >> > Echo works
> >> >> >> > C:\Documents and Settings\kgrabske\Documents\AAScripts\go.vbs(5,
> >> >> >> > 1)
> >> >> >> > Microsoft VB
> >> >> >> > Script runtime error: Object doesn't support this property or
> >> >> >> > method:
> >> >> >> > 'shell'
> >> >> >> > ------------------------------------------------------------------------------------------------
> >> >> >> >
> >> >> >> > I'm not really an expert on scripting, but it looks like the
> >> >> >> > problem
> >> >> >> > is
> >> >> >> > on
> >> >> >> > the following line:
> >> >> >> >
> >> >> >> > shell=createobject("wscript.shell")
> >> >> >> >
> >> >> >> > Am I right in assuming that we need to get the script working
> >> >> >> > from
> >> >> >> > the
> >> >> >> > command line before we can use it to test the Task Scheduler?
> >> >> >> >
> >> >> >> > Thanks,
> >> >> >> >
> >> >> >> > Keith
> >> >> >> >
> >> >> >> >
> >> >> >> >
> >> >> >> >
> >> >> >> >
> >> >> >> > "Mark L. Ferguson" wrote:
> >> >> >> >
> >> >> >> >> It's acting like you get 'access denied' on the xcopy, but that
> >> >> >> >> other
> >> >> >> >> script's failure on simply running a popup dialog indicates
> >> >> >> >> something
> >> >> >> >> deeper. You don't get the wscript object at all. I would say
> >> >> >> >> that
> >> >> >> >> indicates
> >> >> >> >> a Policy setting against script, except that you can run a
> >> >> >> >> script
> >> >> >> >> in
> >> >> >> >> other
> >> >> >> >> than Scheduled Tasks.
> >> >> >> >> Let's write a vbs that runs in CScript, with some echos, to get
> >> >> >> >> a
> >> >> >> >> console
> >> >> >> >> window.
> >> >> >> >> command: cscript go.vbs
> >> >> >> >> --go.vbs--
> >> >> >> >> wscript.sleep 1000
> >> >> >> >> wscript.echo "Echo works"
> >> >> >> >> wscript.sleep 1000
> >> >> >> >> shell=createobject("wscript.shell")
> >> >> >> >> if shell is nothing then
> >> >> >> >> wscript.echo "No Shell"
> >> >> >> >> end if
> >> >> >> >> wscript.sleep 3000
> >> >> >> >> wscript.exit
> >> >> >> >> --end file-
> >> >> >> >> --
> >> >> >> >> Was this helpful? Then click the Ratings button. Voting helps
> >> >> >> >> the
> >> >> >> >> web
> >> >> >> >> interface.
> >> >> >> >> http://www.microsoft.com/wn3/locales/help/help_en-us.htm#RateAPostAsAnswer
> >> >> >> >> Mark L. Ferguson
> >> >> >> >> ..
> >> >> >> >>
> >> >> >> >> "Keith" <Keith@discussions.microsoft.com> wrote in message
> >> >> >> >> news:4AFCE5F0-DE85-4FC3-A5BA-B39EC4DC1BA3@microsoft.com...
> >> >> >> >> > Mark,
> >> >> >> >> >
> >> >> >> >> > I tried logging on as administrator, and my scheduled task did
> >> >> >> >> > the
> >> >> >> >> > same
> >> >> >> >> > thing. Then I created a new scheduled task while still logged
> >> >> >> >> > on
> >> >> >> >> > as
> >> >> >> >> > administrator, and I got the same results...task completed
> >> >> >> >> > when
> >> >> >> >> > nothing
> >> >> >> >> > actually happened. Unless I can come up with a solution to
> >> >> >> >> > this
> >> >> >> >> > problem
> >> >> >> >> > soon, I will have to investigate alternatives like Macro
> >> >> >> >> > Scheduler.
> >> >> >> >> > I
> >> >> >> >> > suppose there's no guarantee that it will work any better, but
> >> >> >> >> > I've
> >> >> >> >> > got
> >> >> >> >> > to
> >> >> >> >> > do
> >> >> >> >> > something.
> >> >> >> >> >
> >> >> >> >> > Thanks again for all of your help. I really appreciate it,
> >> >> >> >> > even
> >> >> >> >> > if
> >> >> >> >> > we
> >> >> >> >> > haven't yet come up with a solution.
> >> >> >> >> >
> >> >> >> >> > Sincerely,
> >> >> >> >> >
> >> >> >> >> > Keith
> >> >> >> >> >
> >> >> >> >> >
> >> >> >> >> >
> >> >> >> >> >
> >> >> >> >> > "Mark L. Ferguson" wrote:
> >> >> >> >> >
> >> >> >> >> >> I would log on as default "Administrator" and schedule the
> >> >> >> >> >> task.,
> >> >> >> >> >> or
> >> >> >> >> >> at
> >> >> >> >> >> least test the run.
> >> >> >> >> >> If it's a permissions error, that should solve it.
> >> >> >> >> >> --
> >> >> >> >> >> Was this helpful? Then click the Ratings button. Voting helps
> >> >> >> >> >> the
> >> >> >> >> >> web
> >> >> >> >> >> interface.
> >> >> >> >> >> http://www.microsoft.com/wn3/locales/help/help_en-us.htm#RateAPostAsAnswer
> >> >> >> >> >> Mark L. Ferguson
> >> >> >> >> >> ..
> >> >> >> >> >>
> >> >> >> >> >> "Keith" <Keith@discussions.microsoft.com> wrote in message
> >> >> >> >> >> news:6F83A395-D52F-4458-A692-6DCFA611F76C@microsoft.com...
> >> >> >> >> >> > Mark,
> >> >> >> >> >> >
> >> >> >> >> >> > Thanks again for your input. I enabled the default
> >> >> >> >> >> > Administrator
> >> >> >> >> >> > as
> >> >> >> >> >> > you
> >> >> >> >> >> > suggested, but I'm not sure what that will do. I have
> >> >> >> >> >> > another
> >> >> >> >> >> > vbs
> >> >> >> >> >> > script
> >> >> >> >> >> > that also doesn't work properly. All it's supposed to do
> >> >> >> >> >> > is
> >> >> >> >> >> > pop
> >> >> >> >> >> > up
> >> >> >> >> >> > a
> >> >> >> >> >> > msgbox
> >> >> >> >> >> > reminding me to do something. What's weird is that the
> >> >> >> >> >> > backup
> >> >> >> >> >> > one I
> >> >> >> >> >> > originally posted about says that it completed
> >> >> >> >> >> > successfully,
> >> >> >> >> >> > even
> >> >> >> >> >> > though
> >> >> >> >> >> > it
> >> >> >> >> >> > didn't do anything. I never receive any error message, it
> >> >> >> >> >> > just
> >> >> >> >> >> > doesn't
> >> >> >> >> >> > do
> >> >> >> >> >> > what it's supposed to.
> >> >> >> >> >> >
> >> >> >> >> >> > Following is the script for the backup, just in case that
> >> >> >> >> >> > helps:
> >> >> >> >> >> >
> >> >> >> >> >> > Dim PathVar
> >> >> >> >> >> > Dim RefNo
> >> >> >> >> >> > Dim objFSO
 
Back
Top