Link to home
Start Free TrialLog in
Avatar of amkazen
amkazenFlag for United States of America

asked on

Task Scheduler Runs Task But Task Does Not Actually R

Hi,
I received a new computer last week but cannot get Task Scheduler to successfully run a VBS script.  It says it is running but the spreadsheets are not updating.  I created a new script to open Notepad and type a few words and Task Scheduler says it is running, ran successfully, but it did not..Notepad never opened.

I can manually run both scripts and they work fine.  Spreadsheets get updated and Notepad opens, types a few words, and stays open until I close Notepad.

My company's computer support has not been able to help at this time and I am currently waiting for the next level of help.  However, that could be more than a week until someone contacts me.

Attached are some screen shots I hope will help, with some identifying text blacked out with a description of what info was there.

Would any of you have any ideas as to why the scripts work when I double click on them manually to get them to run but Task Scheduler will not successfully get them to run, even though it says they are running?

Thanks.
SOLUTION
Avatar of Alan
Alan
Flag of New Zealand image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of amkazen

ASKER

Ok, I just checked again.  I am an administrator.  I have the task set to run with highest privileges.  I apologize but I am a decent copier & paster, a higher level user, but I am unsure if the above actually means I have the scheduled task set to run with admin credentials.  I believe it is but..... I just tried to run the simple task again to open Notepad and still nothing.
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of amkazen

ASKER

Ok, there were not many to compare.  The only differences I saw were that the user account specified is either  SYSTEM or Users, as compared to my tasks have the user account as my userid
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of amkazen

ASKER

Hi,

I read the article but still have the issue. I created a brand new task and it also gives the message that the task ran successfully when it really did not run.  However, I did see I am getting this message "there is no script engine for file extension .vbs"  I Googled that and followed these instructions but there was no change using either method.
Method 1
a. Type ‘cmd’ in Start, Run box. Right click on cmd in the Program list and then select the option Run as Administrator.
b. Type the following command, and then press ENTER on the keyboard:
cscript.exe //H:WScript

Method 2
You may re-register the vbscript.dll file:
a. Type ‘cmd’ in the Start, Run box, right-click on Command Prompt, click on Run as Administrator.  
b. Type ‘Regsvr32 <space> vbscript.dll’.
c. Click the OK button.

I also checked the file association and see that .vbs files are associated with "Stop-Execution.exe"  Could this be the issue?  I cannot find anything that tells me what "Stop-Execution.exe" is   Should vbs files be associated with Microsoft Console Based Script Host?  What other file extensions need to be changed?  .vbe? .I see quite a few files extensions associated with this thing, and many files are not associated with any default file type.

Thanks for the continued help.
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of amkazen

ASKER

Ok, I Googled how to write a script and wrote this, naming the file "No_VBS_Script.bat"
@echo off
title This is your first batch script!
echo Welcome to batch scripting!
pause

Set it to run about 30 seconds after I saved it in the Task Scheduler, and it ran successfully, as scheduled.  I also was able to successfully run it manually by selecting it in the Task Scheduler and then selecting Run.  

So, what does this tell us?
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of amkazen

ASKER

ok, need to look at this later...something with a higher priority just came up....thanks for the help so far.
No problem - keep us posted.
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of amkazen

ASKER

Sorry, it is a Win10 machine, 64-bit, 16 GB, Dell 5810

I did just learn the "Stop-Execution.exe" is a locally enforced policy by the IT group.  It has since been disabled on my machine.

.vbe is now associated with Microsoft Console based Script Host
vbs is now associated with Microsoft Windows Based Script Host
wsc is now associated with Notepad
wsf is now associated with Microsoft Console based Script Host
wsh is now associated with Microsoft Console based Script Host

However, Task Scheduler will still not actually run the task, although again, it still says the task ran successfully...  

I did find on a Microsoft forum that the registry setting for Windows Script Host must be enabled, and if the Enabled setting is not shown, it may be created.  Well, it is not shown in my settings and I am waiting for confirmation from my IT department that I can change my registry setting.  But, again, we are still unsure if this registry setting would make a positive change and get task scheduler to actually run the tasks.  Is this registry setting the final piece of this puzzle, given the file associations have been updated?
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of amkazen

ASKER

I have been working with the IT Dept from the beginning.   But, it seems I an providing them a path forward as much as they are me.  They are the ones who changed the file extension associations.   But,  at this point,  there is no path forward until they change my registry for the enable aspect, if they determine that is the next step. At this point, they do not know.  Any thoughts? IMHO, the IT dept. Is more focused on network issues and basic computer troubleshooting  than what I am encountering,  such as getting a Microsoft product to work. This is why I like Experts Exchange. .I get ideas and feed it to them.    Lol.   I will definately state what the solution is when one is found.
Fair enough, I guess we have to wait until they move on the registry key.

No way to know if that is the final thing or not, but it does seem to be the next step at least.

Alan.
Avatar of amkazen

ASKER

Still waiting on a response from my company's IT dept on the registry change.
Hi Amkazen,

What did your IT Dept say about the registry change?

Thanks,

Alan.
Question abandoned, but good troubleshooting options for any that follow.