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