Solved

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

Posted on 2016-09-07
3
38 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 53

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

ScreenConnect 6.0 Free Trial

Check out the updates in one game-changing release, ScreenConnect 6.0, based on partner feedback. New features include a redesigned UI that improves session organization and overall user experience. See the enhancements for yourself!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Have information from one page show up on another 24 31
Recursive folder search vbscript 7 48
Sending Attachment via CDO 3 69
Clear Filter 8 38
Recently I finished a vbscript that I thought I'd share.  It uses a text file with a list of server names to loop through and get various status reports, then writes them all into an Excel file.  Originally it was put together for our Altiris server…
Script to copy or move mouse-selected collection of files plus targets referenced by shortcuts (.lnk) The purpose of this article is to help illuminate the real challenges and options available (where they may exist) for utilizing simple scriptin…
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
In a recent question (https://www.experts-exchange.com/questions/28997919/Pagination-in-Adobe-Acrobat.html) here at Experts Exchange, a member asked how to add page numbers to a PDF file using Adobe Acrobat XI Pro. This short video Micro Tutorial sh…

773 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