Solved

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

Posted on 2016-09-07
3
56 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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 56

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 48

Author Closing Comment

by:Dale Fye
ID: 41793497
Thanks, that did the trick
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

This script will sweep a range of IP addresses (class c only, 255.255.255.0) and report to a log the version of office installed. What it does: 1.)      Creates log file in the directory the script is run from (if it doesn't already exist) 2.)      Sweep…
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…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…

623 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