Solved

Determine what computer(s) is/are running a script file

Posted on 2016-09-07
3
27 Views
Last Modified: 2016-09-11
I have a client that is running some VB Script to download files from an FTP site via windows task scheduler.

Unfortunately, they are not entirely sure what computer(s) are running this script.  As part of the script, we are creating a log file every time the script is run, and storing that in a folder on their server.

What I would like to do is determine what computer ran the script.  Is there a way to capture either the computer name or userID of the user that actually ran the script, even if that script is located on a network server
0
Comment
Question by:Dale Fye (Access MVP)
3 Comments
 
LVL 25

Accepted Solution

by:
SStory earned 500 total points
ID: 41788438
I may be wrong, but I don't think it would matter where the script is "located" but where it is executed.

Dim WshNetwork
Set WshNetwork = CreateObject("WScript.Network")
WScript.Echo WshNetwork.ComputerName
WScript.Echo WshNetwork.UserName

Open in new window

0
 
LVL 51

Expert Comment

by:Bill Prew
ID: 41791435
As mentioned in prior post, you can get the info you want.  Then you could just add that to the other info that is being logged in the log file.  Yes?  Or need more?

~bp
0
 
LVL 47

Author Closing Comment

by:Dale Fye (Access MVP)
ID: 41793497
Thanks, that did the trick
0

Featured Post

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

Introduction During my participation as a VBScript contributor at Experts Exchange, one of the most common questions I come across is this: "I have a script that runs against only one computer. How can I make it run against a list of computers in …
Not long ago I saw a question in the VB Script forum that I thought would not take much time. You can read that question (Question ID  (http://www.experts-exchange.com/Programming/Languages/Visual_Basic/VB_Script/Q_28455246.html)28455246) Here (http…
This video discusses moving either the default database or any database to a new volume.
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

758 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

22 Experts available now in Live!

Get 1:1 Help Now