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,
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

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.

NVITEnd-user supportCommented:
How is the script run? Task scheduler? Manual?
Does it log its actions?
Can you post the code?
Bill PrewIT / Software Engineering ConsultantCommented:
Run the script from a DOS command window and see what messages are displayed.

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
10 Tips to Protect Your Business from Ransomware

Did you know that ransomware is the most widespread, destructive malware in the world today? It accounts for 39% of all security breaches, with ransomware gangsters projected to make $11.5B in profits from online extortion by 2019.

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")
NVITEnd-user supportCommented:
Seems like you're using the /T switch, which may need adjustment

Then again, you said it worked fine all this time
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?
Bill PrewIT / Software Engineering ConsultantCommented:
At a command line, try doing the following:

cscript //T:0 //S

Then try rerunning the script.


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?
Bill PrewIT / Software Engineering ConsultantCommented:
Not that I am aware of.  It's likely in the registry someplace, but haven't seen that documented anyplace.

Vicki05Author Commented:
Thanks Bill,

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

The solution you provided worked.

Thanks for all your help.

Bill PrewIT / Software Engineering ConsultantCommented:
Great, glad that was helpful.

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.