Jump to content

Batch files help


Recommended Posts

Hello,

I need some help with *.cmd batch files. I have made one which automatically installs the hotfixes etc. No problems there. The Command Prompt window that pops up however, disappears immediately after the process is finished thus leaving me no time to make sure everything has worked out fine (I have not used the EXIT command).

Is there a command to insert a delay?

Also (or alternatively), is there a command which aks for the user to press ENTER to continue, or ask the user for an input letter (Y/N) in order to specify which parts to install and which not.

I am not putting these batch updates in the unattended procedure, I'd rather let me execute the batch after Windows has been installed.

Thanks for any help!

Link to comment
Share on other sites


You can also use >> hotfixes.log to output all the info of the process, and any errors that occured.

I.E. If you have a hotfixes.cmd run it with the >> %systemdrive%\hotfixes.log:

hotfixes.cmd >> %systemdrive%\hotfixes.log

This will create hotfixes.log in C:\ (or the drive windows is installed on)

Link to comment
Share on other sites

Excellent, thank you people!

Now if I could take it a bit further and add Y/N type of questions to allow the user to control the installation process. Or even better, create a menu with options and let the user type a number to install the relevant part of the batch file. Can this be done at all through simple batch files?

Thanks!

Link to comment
Share on other sites

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...