Jump to content

Can someone please help me I need to create a Unique Batch File?


Recommended Posts

Posted (edited)

Hi People,

 

I hope you all are alright! I have found this website through google and i have just signed up. I was searching for batch files and i found a useful thread on this website regarding Batch Files which was started by Richard Mills (thanks for all your comments i found them useful).

 

I work in a secondary school on Luton. I was wondering how would i write a batch file to automatically install a software e.g. for an example i want to login in a computer as a Network Administrator and i want to run a batch file which will automatically install Trendo Micro Hijack for me with default settings (where you don't have to click Next button, click i agree for terms and conditions and where you do not have to choose the location path where you want the software to be installed - i would like to use this for when installing Office 2007, Macromedia Package and other big packages):

 

Please choose the path you would like hijack to be installed - C:\Program Files\Trend Micro\HijackThis

Trend Micro End User License Agreement*- I agree

On Windows XP

 

And also is there a way to create a batch file where i can install a software with custom settings (instead of choosing the C Drive as the location path i could choose something else)?

 

I looked all over the internet for these batch files and i cannot find them just want to know if anyone could help me, i would really appreciate this.

 

Thanks all

Regards,

Ryan H

Edited by ryan_hooper
Posted

Welcome Ryan Hooper,

 

This is a good thread that you have started, it would be really useful for IT Technician's to have such a useful batch file which installs a piece of software for you, it would save a lot of time. I would help you but i am not good at batch files myself but i am 100% sure that one of the edugeek member will be able to help us out.

 

Kind Regards

Imy

  • Thanks 1
Posted
I think the batch file aspect of this is a red herring. You need to look at using msi packages to do this install - this can be done via GPO then, or you can use 'msiexec /i /q' etc...
  • Thanks 1
Posted
Thanks Localzuk for you comment, but i wanted to do it using a bacth file so that you can give it to anyone and all they have to do is login as a administrator and double click on the batch file and this will start the installation. Couple of my staff would really appreciate a batch file like this.
Posted

The way that all these packages may install will potentially all be different. It will depend on what installer they have etc. Office 2007 has its own customisation wizard which can be launched with setup /a (I think). Others may have switches on their setup which will allow silent installation which will be good for installing via script/start up script. Use search terms such as silent installer switches and other such search terms.

Other settings may have to be made by adding registry entries or you may have to do some kind of "capture install" using an appropriate MSI authoring tool.

  • Thanks 1
Posted
Thanks Localzuk for you comment, but i wanted to do it using a bacth file so that you can give it to anyone and all they have to do is login as a administrator and double click on the batch file and this will start the installation. Couple of my staff would really appreciate a batch file like this.

 

You have a couple of choices to look at. The first one is using msiexec /i /q to do a quiet install from an msi (you can do this with office/macromedia at least), the other is to use AutoIT AutoIt v3 - Automate and Script Windows Tasks - For Free! a scripting program which allows you to script button presses for those apps that don't include command line switches for quiet install.

Posted
Thanks ChrisH i relly appreciate it, i guess your right so that means there is no way of installing a software via batch files. I had a feeling it would be hard to do it using custom settings as you stated in your post "The way that all these packages may install will potentially all be different... Others may have switches on their setup... Other settings may have to be made by adding registry entries" but i thought there maybe a way to start a installation using default settings.
Posted (edited)
I was wondering how would i write a batch file to automatically install a software

 

This is a problem common to most schools - how to get software installed to Windows workstations. Ideally, you use MSI packages distributed via Group Policy Objects (GPO) in Active Directory (AD), but lots of educational software is a bit on the crummy side and tricky to package into an MSI (you'll find Adobe Creative Suite, in particular, a bit of a blighter). Try WPKG:

 

WPKG | Open Source Software Deployment and Distribution

 

Also AppDeploy, a site dedicated to deploying software:

 

AppDeploy.com - The Application Deployment Information Center

 

If you haven't got an existing system in place, WPKG is probably your best bet, but we use a simple script (not batch file, Perl, but you could use anything - PowerShell or Visual Basic Script is probably better than batch) that runs as a login script when you log in as the "install" user on any network workstation.

 

If all else fails, I'd second the suggestion of using AutoIt - that can install pretty much anything if you put your mind to it.

 

--

David Hicks

Edited by dhicks
Posted

Hi Ryan and welcome to the forum :)

 

Dont know if you are aware of this regarding HiJackThis but you dont have to use the installer at all.... they have it as a single executable (have done for years) which you can get here:

 

HijackThis - Trend Micro USA

(direct link: http://www.trendmicro.com/ftp/products/hijackthis/HijackThis.exe )

 

it has a few command line parameters, that seem to be in-place, even from before its Trend days i.e.:

 

Command-line parameters:

* /autolog - Automatically scan the system, save a logfile and open it

* /ihatewhitelists - ignore all internal whitelists

* /uninstall - remove all HijackThis Registry entries, backups and quit

Command line switches for hijackthis?

 

You could certainly make a little script that would copy the executeable to the computer from some network share location easily, although I wager that it was never fully developed enough to be run fully automated (due to the nature of what it can do) so any of that will be a bit limited, but at least to just get it on the machines so you can run it easier, its just a matter of using something like:

 

copy \\server\share\hijackthis.exe %SystemDrive%\HiJackThis\ /Y

 

but if you're looking to make batch scripts, you need to google around for some tutorial sites on how to form them.

 

Too tired to have a quick look but there is some good stuff out there.

 

Good luck.

Nath.

Posted
Also from memory, with GP you can set applications up so they can be installed but aren't done automatically (eg: you need to go, Control Pannel -> Add/Remove apps) for those apps that you want to be available but not automatically installed on systems.
Posted
Also from memory, with GP you can set applications up so they can be installed but aren't done automatically (eg: you need to go, Control Pannel -> Add/Remove apps) for those apps that you want to be available but not automatically installed on systems.

 

Yep, this is when you choose to 'Publish' the software rather than 'Assign' it.

Posted
Thanks Localzuk for you comment, but i wanted to do it using a bacth file so that you can give it to anyone and all they have to do is login as a administrator and double click on the batch file and this will start the installation. Couple of my staff would really appreciate a batch file like this.

 

I find this very scary!

 

There's no way anyone other than IT Techs or net managers get admin passwords on any network I have something to do with! Currently, that's me!

  • 1 year later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...