/build/static/layout/Breadcrumb_cap_w.png

Batch file Help

Hello There

I'm in a desperate need to write a Batch file and it would be great to obtain expertise from anyone willing to help

Scenario: I'm trying to write an upgrade batch file for a software.

The Upgrade requires the followign step
  • Identify old version ....
  • uninstall old version
  • Restart ( Must be done )
  • Install new version
  • Restart (Must be done)

The above steps is to be implimented at windows logon within a domain. So when the user starts the PC, the above steps must be automatically carried out before allowing the user to logon to the PC.

It would be great if someone could assist me in this or provide me with links where I can find similar examples or scenario's .

Thank you very much.

0 Comments   [ + ] Show comments

Answers (4)

Posted by: anonymous_9363 15 years ago
Red Belt
0
A batch file would, IMV, be completely the wrong "tool" to use for this. The best approach would be to create an installation package (MSI) but, if you're not comfortable with that or do not have the necessary skills, then a script would be a better option than a batch file. You would only be able to use crude error-trapping in a batch file, for example and the flow control is excruciating.

Note: reboots are only necessary in a very limited number of circumstances. Generally, vendors are too stupid to program them out of their installers. Investigate further as to why the reboots are taking place and try to eliminate them in your solution.
Posted by: Pradheep 15 years ago
Yellow Belt
0
Hello VBScab

I do have a MSI installer provided by the Software.

The Reboot is required as the software installs a service during installation and removes the service when uninstalling.

When I tried upgrading the software using GPO.

The software got and unistalled and installed but the restart got suppressed after the uninstall . Which caused the service to act wierd after install. This is why I need a restart after install and uninstall. To be frank restart is the important part in the deployment.

Note: This problem did not occur in windows Vista as it does not require an restart.

Kind regards

Pradheep
Posted by: anonymous_9363 15 years ago
Red Belt
0
Unless the service is a system service (generally speaking, if it appears in the list when you start the MMC plug-in Services.MSC, then it's not a system service), there's no reason whatsoever for a restart. Use the ServiceControl table to start and stop the service.

From the sound of it, you have an MSI supplied by a vendor so you should make any alterations using a transform, rather than editing the MSI directly.
Posted by: naveenmukka 14 years ago
Yellow Belt
0
I agree with VBS Cab.

If you really not comfortable going with MSI solution you can always write a VB script for uninstallation. In other words, seperate two taks into 2 jobs.
1. Uninstall previous versions - I would prefer using VB script to do this part instead of batch file. Use uninstall string provided by vendor to do this.
2.Install the latest version with vendor install.
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ