Link to home
Start Free TrialLog in
Avatar of mbudman
mbudmanFlag for Canada

asked on

How to run a batch file once using Group Policy objects

Hello,

I want to use Group Policy to automatically run a program (batch script) that does the following:

1.  Check if program exists
2. If program does not exist, install the program (run executable, create service and start it)

No user input is required (program automatically installs silently)
The only limitation is it might require administrator level account to install

The file to complete the installation is a batch file.

I understand that I can possibly accomplish this by putting the batch file into "startup" ->Computer Configuration->Policies->windows settings->scripts-startup. However, my understanding is that the server would have to be rebooted to launch the script. I do not want to do so as the installation does not require a reboot and the destination servers are not supposed to be rebooted

Someone also suggested that perhaps I can use run once of the registry, but I am not certain if this would work.

Any suggestions on how to accomplish my goal?

Thanks in advance.
ASKER CERTIFIED SOLUTION
Avatar of Michael Pfister
Michael Pfister
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of mbudman

ASKER

1.I would like the program to execute once the computer updates itself  with group policy, not when user logs on
2. An MSI is not the way to go because the batch file accesses a share and executes the program. The sequence of steps are:
    a. Check if program is installed. If installed abort
    b. Connect to windows share and run installation program
    c. start program service
    d. end

The advantage of connecting to a share is I can update the program on the fly without modifying anything else. In any case, this is much easier than an MSI (imo).
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of mbudman

ASKER

I do not mind deploying an MSI. I have never built an MSI. I should have various tools at my disposal as we are a software shop.

I only need the task to run once on each computer I select. This should be done automatically. Installation should not depend on the user.
No comment has been added to this question in more than 21 days, so it is now classified as abandoned.

I have recommended this question be closed as follows:

Split:
-- Michael Pfister (https:#a42454194)
-- Michael Pfister (https:#a42455116)


If you feel this question should be closed differently, post an objection and the moderators will review all objections and close it as they feel fit. If no one objects, this question will be closed automatically the way described above.

seth2740
Experts-Exchange Cleanup Volunteer