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.
Locked
User avatar
aceofblackstar
Posts: 1
Joined: Mon Dec 07, 2009 9:24 am

Bat file to run an exe.

Post by aceofblackstar » Mon Dec 07, 2009 9:37 am

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
Joined: Sun Jan 21, 2007 11:31 pm

Bat file to run an exe.

Post by jhicks » Tue Dec 08, 2009 3:28 am

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

Locked