Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: How to check If...choice.exe else...choice.com  (Read 9808 times)

0 Members and 1 Guest are viewing this topic.

xcharge50

    Topic Starter


    Beginner

    How to check If...choice.exe else...choice.com
    « on: February 05, 2009, 12:12:57 PM »
    Here a quick batch file (I know is not working! I just use it for a example of what I want to do) What I need to input in the ??? section? Thx for you help


    rem since 64 bit don`t support choice.com

    ver | find "Microsoft Windows [Version 5.2.3790]"
    if %ERRORLEVEL% == 0 ???use choice.exe to current folder?????? goto start

    ver | find "??? Windows vista 64 bit??? [Version ???]"
    if %ERRORLEVEL% == 0 ???use choice.exe to current folder?????? goto start

    rem maximum compatibility in other os

    ??? use choice.com to current folder???
    goto start

    :start
    ....
    ...
    ...
    choice.......:123
    if..
    ..
    ..

    :end

    devcom



      Apprentice

      Thanked: 37
      Re: How to check If...choice.exe else...choice.com
      « Reply #1 on: February 05, 2009, 12:33:41 PM »
      vista is version 6.0.6001 but remember that not all users are from USA / England so they might have different language
      better try:
      Code: [Select]

      if exist %windir%\System32\choice.exe (
      //use choice.exe
      ) else (
      if exist %windir%\System32\choice.com (//use choice.com) else (//there is no CHOICE)
      )
      )
      Download: Choice.exe

      xcharge50

        Topic Starter


        Beginner

        Re: How to check If...choice.exe else...choice.com
        « Reply #2 on: February 05, 2009, 09:09:53 PM »
        Forget to mention I want my batch to run in most os (Xp/Vista mostly an maybe 7)

        but the problem is in windows xp you need the set /p (I think an I want to avoide using 1 batch for xp an 1 batch for 64 bit (vista/xp) an 1 for other) since choice don't exists. But I add choice.exe (to make my batch file run a 64 bit environment since choice.exe is 32 bit) an choice.com (to have more compatibility) in the same folder of my batch. So my batch will run in the folder, use choice.com or choice.exe in the same folder with the batch. Here is my a example (an thx for trying to help me)

        Code: [Select]
        example: (This is not a batch! is more like a guide)

        ver | find "Microsoft Windows [Version 5.2.3790]   <-- = all windows xp 64 bit (an 2003 but it will support my choice .exe i hope)
        set default choice = set currentfolder/choice.exe

        ver | find "Windows" [Version x.x.xxxx] <-Vista 64 bit Version?

        set default choice = set currentfolder/choice.exe

        rem else

        set default choice = set currentfolder/choice.com


        P.S. This is to show what I try to make an not a batch file