Solved

How to identify a given VBScript from others on Process List??

Posted on 2008-10-19
6
248 Views
Last Modified: 2012-05-05
I have quite a few VB Scripts running concurrently; the whole set is duplicated on several PCs, all running conncurrently on all PCs.  Most of the PCs are free running, and occassionally I check in on them using LOGMEIN.COM.  Occassionally there is a problem with one script and I need to just kill it off the Process list and restart it.  But I do not know which {wscript] entry on the Process list is which.  Is there a way to name a script so that it is identifiable on the list?

Alternatively (maybe preferrrably), a way to make a script that kills a certain script?  If so I would just make a selection of script killers.

OS = Vista Biz 32
0
Comment
Question by:Mike Caldwell
  • 3
  • 3
6 Comments
 
LVL 8

Expert Comment

by:Wikkard
ID: 22753747
No, because your vbscript is running inside cscript there is no easy way of distinguishing it from any other script. Perhaps you could have each script determine its own process Id (PID) and then write that to a log of some sort.
I would suggest you look into creating executables from your scripts, this would be fairly easy to do. This would allow you to name each one as needed.
0
 
LVL 1

Author Comment

by:Mike Caldwell
ID: 22753778
"Executable"??  I am getting progressively handier at VBScript, but do not want to get into VB.  Is that what you meant?  Is it possible there is some sort of 'compiler' that will take a VB script and spit out a VB program?
0
 
LVL 8

Accepted Solution

by:
Wikkard earned 500 total points
ID: 22753882
Thats what I mean, you could compile your vbscripts with very few modifications as vb6 executables.

See http://www.experts-exchange.com/Programming/Q_21302725.html.

A quick search in google for 'vbscript compiler' showed a number of utilities (some freeware some not) which can do this.

0
Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

 
LVL 1

Author Comment

by:Mike Caldwell
ID: 22753983
Wikkard: wow, thanks.  I had no idea such were available.  VBS2EXE looks quite good, and is a whopping nine bucks.  I'll give it a go.

Do you think the EXE file will execute faster than the VBS?
0
 
LVL 1

Author Closing Comment

by:Mike Caldwell
ID: 31507649
Thanks for being so timely.

Mike
0
 
LVL 8

Expert Comment

by:Wikkard
ID: 22754189
It may run a little faster, it all depends how the converter utility (vbs2exe for example) works internally.

If they actually convert the code to native code then it could run faster depending on what the scripts actually do.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This is pretty cool.  The purpose of this VB Script is to help you document where JAR (Java ARchive) files and specifically java class files are located so that you can address issues seen with a client or that you can speak intelligently with a dev…
Over the years I have built up my own little library of code snippets that I refer to when programming or writing a script.  Many of these have come from the web or adaptations from snippets I find on the Web.  Periodically I add to them when I come…
The Task Scheduler is a powerful tool that is built into Windows. It allows you to schedule tasks (actions) on a recurring basis, such as hourly, daily, weekly, monthly, at log on, at startup, on idle, etc. This video Micro Tutorial is a brief intro…
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…

910 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now