Sign-in / Sign-up
Your question

How to make same bat file which would work for both Windows 7 and Windows XP

Tags:
  • Configuration
  • Windows 7
  • Windows XP
Last response: in Windows 7
November 20, 2012 3:53:54 AM

Hi,

I want to know how can we create the same bat file that would work for both XP and windows7. Is it possible to make same bat file for both O.S.??

More about : make bat file work windows windows

a c 255 $ Windows 7
November 20, 2012 1:04:07 PM

You need conditional statements in your bat file. You can check the OS environment variable and act on that.
m
0
l
a b $ Windows 7
November 20, 2012 1:23:19 PM

^+1 some of the commands are a little different so you have to figure out what OS, and then point the script to run those commands. I've seen scripts that do this, and I'm sure you can find some examples out there somewhere if you search for them.
m
0
l