Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need Help Creating Batch File Scripts To Run EXE

Status
Not open for further replies.
Jan 30, 2001
210
US
I want to create a batch file which can be included in a Windows NT loginscript so that when users logon to their machines it will automatically run a virus fix tool. I know how to create batch files, but I need some help writing this script that will do just what I need. Any help will greatly appreciated. Thanks.
 
Use the following as an example:

START \\SERVERNAME\VIRUSSHARE$\VIRUSCHECKER.EXE

Is this what you mean or is there something more detailed needed?

Regards
 
Thanks for responding but that script didn't work for me, how should I set this up details please. Thanks man!
 
Is this your first script?

If any of these steps fail, come back and post and we can exxpand it.

--------------------------------------

Start off by locating the login script, standard helps for your server.

Notepad or ASCII edit it.

Near the top, put in a few lines :
Echo ---------------------------
Echo ---------------------------
pause

File save, exit

Login from somewhere.
--------------------------------------

Does it pause and show you the two dumb lines?

Then you have the ability to edit and change the login script and you can add almost anything there, like the antivirus line thatrenowned mentioned.



 
What happens is I'm trying to test this script out on my computer, when I run it I get the network path was not found. I've tried renowneds suggestion on setting up the script and it should work but it keeps giving me that error message. Any thoughts.
 
Are you typing

START \\SERVER\SHARE\FILE.EXE

or

START P:\FOLDER\FILE.EXE?
 
no I'm typing in correctly start \\server\share\file.exe

can you provide me with a complete template to try, let me keep messing around with it maybe I'm doing something else wrong.
 
That is all you should need...

You're running this batch while you're connected to the network right? Can you browse to the file and run it from there, when you can't run this script?
 
Oh yeah I'm always on the network and I have connectivity to all my servers, my problem is the scripting of the batch file. I know how to write simple logon script batch files but I just want to set up an instruction in the logon script so that when all my users logon this virus scan tool will run. I haven't had any luck yet.
 
Sorry fella's I had the mappings incorrect in the script thats why I kept getting the network name can not be found error, I straightened that out and now it works fine!!!! Thanks everyone for their guidance and assistant.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top