Solved

Create tool to trouble-shoot in-house app

Posted on 2014-12-08
3
121 Views
Last Modified: 2014-12-08
Greetings to the best Experts on the web.

Here is what I am trying to accomplish.  There is an app that was written by the state that is used at various satellite offices (like this one) and getting support for it can be difficult.  So, after working with the app for several years, I've found the cause for a lot of the errors and a simple batch script could help the field techs trouble-shoot and resolve the issues.

The batch script should do the following:
1. When I launch the script from my pc, the script will prompt for the name of the computer to run on
2. I have a list of files that "should" be on the computer.  I would like to put the files that should be on that computer into this script so it can be easily checked.  Each file should be checked and if the file is on that computer, it will echo "File1.ini detected" or "File1.ini NOT detected" to a log file

Many of the service calls from the end-user is a result of missing files in the particular directory.  This tool should identify which files are there and not there.  

Thanks for your help!
0
Comment
Question by:samiam41
[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
  • 2
3 Comments
 
LVL 12

Accepted Solution

by:
FarWest earned 500 total points
ID: 40486977
you can use vbscript


Option Explicit
DIM strFilePath 
DIM strComputer 
DIM fso    
DIM filesArray
DIM i

strComputer = InputBox( "Enter Computer Name" )
strFilePath = "\\" & strComputer & "\C$\MyPathe\" 
Set fso = CreateObject("Scripting.FileSystemObject")

filesArray= Array("file1.ini","files2.ini","file3,ini")
 For i=0 to ubound(a)
If (fso.FileExists(strFilePath +filesArray(i))) Then
  WScript.Echo("myfile1.ini File detected")
ELSE
  WScript.Echo("myfile1.ini Not File detected")
End If
NEXT

Open in new window

0
 
LVL 12

Expert Comment

by:FarWest
ID: 40486984
sorry forget to correct
WScript.Echo("myfile1.ini File detected")
to
WScript.Echo(filesArray(i)+  " File detected")
and
WScript.Echo(filesArray(i)+  " File NOT detected")
0
 
LVL 9

Author Closing Comment

by:samiam41
ID: 40487192
Thanks!  Quick and easy.
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

Suggested Solutions

Title # Comments Views Activity
how to diff two files 12 60
using interface in TLB 3 31
List Boot time of several computers 4 19
Dell Latitude E6420 no sound 13 25
The recent Microsoft changes on update philosophy for Windows pre-10 and their impact on existing WSUS implementations.
You may have a outside contractor who comes in once a week or seasonal to do some work in your office but you only want to give him access to the programs and files he needs and keep privet all other documents and programs, can you do this on a loca…
The viewer will learn how to successfully download and install the SARDU utility on Windows 7, without downloading adware.
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…

752 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