VBScript Closing on its own Windows 7

Hi ,

I have a script that works fine and has been tested. Someone did something to the Windows 7 computer  and when I run my script, the script opens up then closes on its own after 10 seconds. Script has not been modified and has been tested.

Please advice.

Thanks in advance,
Vicki
Vicki05Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

NVITCommented:
How is the script run? Task scheduler? Manual?
Does it log its actions?
Can you post the code?
0
Bill PrewCommented:
Run the script from a DOS command window and see what messages are displayed.

~bp
0
Vicki05Author Commented:
I ran the script by using this command

C:\cscript d:\setup.vbs

I got the following message.

Script execution time was exceeded on script "d:\setup.vbs".
script execution terminated
0
Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

Vicki05Author Commented:
The script is run, since it is a vbs, it does not show up in the task scheduler.  It closes after 5 seconds on the message box.


The script disappears after 5 seconds.

intAnswer = _
    Msgbox("This is a Test Utility." & vbCrLf & vbCrLf & "Do you want to continue?", _
        vbYesNo, "Test Utility")
0
NVITCommented:
Seems like you're using the /T switch, which may need adjustment
https://msdn.microsoft.com/en-us/library/k0zzbw5a(v=vs.84).aspx

Then again, you said it worked fine all this time
0
Vicki05Author Commented:
The script works fine on all other computers. It is only one computer that I am having issues with. Is there a way to change the policy in windows for the script process time?
0
Bill PrewCommented:
At a command line, try doing the following:

cscript //T:0 //S

Then try rerunning the script.

~bp
1

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Vicki05Author Commented:
Hi Bill,

Is there a way to change this setting through windows rather then cmdline?
0
Bill PrewCommented:
Not that I am aware of.  It's likely in the registry someplace, but haven't seen that documented anyplace.

~bp
0
Vicki05Author Commented:
Thanks Bill,

I will test and let you know
0
Vicki05Author Commented:
Hi Bill,

The solution you provided worked.

Thanks for all your help.

Vicki
0
Bill PrewCommented:
Great, glad that was helpful.

~bp
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
VB Script

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.