App install through GP and cmd shell

Hello,

I am attempting to install an application through group policy.  Actually, I am attempting to upgrade an application that is already installed through GP.  I have the .cmd file that was used to install the application.  It looks for an existing file on the user's C drive and either installs or does nothing depending on whether the file exists or not.  If the file exists it means the application is already installed.  The problem with the upgrade is that there is no discernable indicator to point to after the upgrade to tell the .cmd file that the program is upgraded.  There's no registry indicators and no difference in the install directory.  What I have in mind is to create a small text file with the upgrade on the user's C drive and have the .cmd file look for that to determine whether to run the upgrade or not.  I cannot figure out how to create a simple text file on the user's C drive through the .cmd file.  I will attach the existing .cmd file so you can see what I have and hopefully we can come up with an easy way to do this.

Thanks,
Cheese
centennial.cmd
cheesebugahAsked:
Who is Participating?
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.

nappy_dThere are a 1000 ways to skin the technology cat.Commented:
Here is my recommendation.

  • create a blank txt file with the name upgrade_v1.txt and place it in the shared network location of the installer you want to run.
  • Copy the commands I've pasted below into a file named upgrade_v1.bat
  • test it out
If Not Exist "c:\centennial\audit\upgrade_v1.txt" then (
copy /y"\\dyna-sd.com\NETLOGON\deploy-accubid\upgrade_v1.txt" "c:\centennial\audit\"
) Else (
Goto Upgrade
)
)
GOTO End

:Upgrade
"\\dyna-sd.com\NETLOGON\deploy-accubid\URL_ESETUP.EXE"

:End

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
cheesebugahAuthor Commented:
nappy_d,

I like it!

I'll test it out today and let you know.

Thanks,
Cheese
0
cheesebugahAuthor Commented:
nappy_d,

So, instead of the .cmd file that I've used in the past to install this program, you want me to use a .bat file?  Does it really matter if the file is a batch or command file?

Thanks,
Cheese
0
Newly released Acronis True Image 2019

In announcing the release of the 15th Anniversary Edition of Acronis True Image 2019, the company revealed that its artificial intelligence-based anti-ransomware technology – stopped more than 200,000 ransomware attacks on 150,000 customers last year.

nappy_dThere are a 1000 ways to skin the technology cat.Commented:
I've always used ".bat"
0
cheesebugahAuthor Commented:
nappy_d,

Are you sure the logic is correct?  Here's my interpretation.  If the file doesn't exist, copy it to the location, otherwise run the upgrade.  Shouldn't it be if the file doesn't exist, copy the file to the location and run the upgrade, otherwise do nothing.

Thanks,
Cheese
0
cheesebugahAuthor Commented:
Or, if the file exists, do nothing.  Otherwise copy the file to the location and run the upgrade.
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
Network Management

From novice to tech pro — start learning today.