Bat file to run an exe.

Batch, ASP, JScript, Kixtart, etc.
Forum rules
Do not post any licensing information in this forum.

Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
This topic is 14 years and 4 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
Locked
User avatar
aceofblackstar
Posts: 1
Last visit: Mon Dec 07, 2009 8:37 am

Bat file to run an exe.

Post by aceofblackstar »

I am trying to do something without touching like 500 machines...I have a batch file. test.bat lets say that kicks of an exe. I am running it off the Login script.So the batch file runs and kicks of the exe. The exe need the following inputs. I want to run it silently in the background. At present it just freezes at the Next and waits for user interaction.NextInstallfinish--------------and if it runs again on the same machine....cancelyesfinish------------------------------------------I want to let it run on the network for a few days so all the machines get this program....I am not sure if there is another way to cancel out the program if the machine already have the program...I know this thread might seem retarded to many. But I dont know the first thing about scripting....:)Thanks for all the replies in advance.
User avatar
jhicks
Posts: 1789
Last visit: Mon Oct 19, 2015 9:21 am

Bat file to run an exe.

Post by jhicks »

There are probably several ways to accomplish your goal. It might be easier if you could post the logon script. In the past, I've created a dummy file to indicate the program has already run. echo Finished > c:flag.txtAt the beginning of the batch file I use an if Statement to see if the file exists.if exist c:flag.txt GOTO RUNGOTO :EOF:RUNrem main part of the script:EOFrem end of script
This topic is 14 years and 4 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
Locked