group policy to push .exe and registry entry?

I need to push out and install a small third party agent ".exe" file to a small OU test group.  I also need to push a registry entry so that machines can be identified as belonging to the organization.  Once this test is verified, we will need to push to all users one site at a time.  How can I accomplish this in the least painful way using GP?
I'd also like to make sure that a check is done to verify if the exe has already been installed so it will not attempt to install it again.  Thanks in advance!
dkrautAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Joseph DalyCommented:
Since you are trying to do this with AD and the file you need to install isnt an MSI you will need to use a computer startup script to perform the actions you want. So below is a simple script that I created to install an exe as a startup script.

Basically what this BAT file does is look in your program files (or other directory) for any folder created during the install. If it find that folder it exits out. If it doest it installs the software and then writes a text file with the computername to a share on a server so you can track it.

As far as your registry key you would just need to regedit to import a registry key silently.
http://tmdnet.nothave.com/book/OS/MANUALS/COMMANDS/R/REGEDIT.HTM
@ echo off
IF EXIST "C:\Program Files\Softwarefolder" GOTO ENDNOW
\\server\share\Setup.exe 
:ENDNOW
echo >> \\server\share\tracking\%computername%

Open in new window

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Joseph DalyCommented:
In that code you should probably switch line 4 and 5 around that way it doesnt recreate the text file each time. :Endnow should be the last line.
0
dkrautAuthor Commented:
xxdcmast, quick question regarding your script.  How/where would you apply it within GP or would you simply add this to the users account login script?
0
Joseph DalyCommented:
What I would do would be to save the script somewhere all the users would have access to it and then refference it as a computer startup script through GPO. You cant really just add it to the user account login script because if they arent administrators on the machine it will fail due to improper permissions.

The good thing about a startup script is that it runs under the system context so it has the proper permissions needed.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Active Directory

From novice to tech pro — start learning today.