Solved

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

Posted on 2016-09-07
3
52 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)
[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 55

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 (Access MVP)
ID: 41793497
Thanks, that did the trick
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

I met Paul Devereux (@pdevereux) today when I responded to his tweet asking “Anybody know how to automate adding files from disk to a folder in #outlook  ?”.  I replied back and told Paul that using automation, in this case scripting, to add files t…
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…
In this video, viewers are given an introduction to using the Windows 10 Snipping Tool, how to quickly locate it when it's needed and also how make it always available with a single click of a mouse button, by pinning it to the Desktop Task Bar. Int…
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…

734 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