Computing.Net > Forums > Programming > BATCH: Choice.exe Vista/X

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

BATCH: Choice.exe Vista/X

Reply to Message Icon

Name: tuk
Date: June 2, 2008 at 05:20:49 Pacific
OS: vista
CPU/Ram: opteron 2.5gb
Product: dfi
Comment:

I have a batch file that needs to use Choice.exe on XP/Vista..

The problem is:
a)Find a Choice.exe that works for both
b)Test the runtime OS for Vista/XP and change the Choice command to suit???


Vista x64
Works without Choice.exe being present in .bat location, but throws an error if Choice.exe(1.71KB ~ XP requires) is present in .bat dir

XP x32
Needs Choice.exe(1.71KB) in the .bat dir, but throw an error if Choice.exe's found in Vista install are used
Choice.exe 37KB
Choice.exe 30KB

Errors being thrown are related to compatibility

Warning Batch Newbie:
Thanks For Being Patient!
Any Help Is Appreciated!



Sponsored Link
Ads by Google

Response Number 1
Name: Mechanix2Go
Date: June 2, 2008 at 10:17:47 Pacific
Reply:

FWIW I use choice.com from DOS 6.22 in W2K.

No errors.

1,754 bytes


=====================================
If at first you don't succeed, you're about average.

M2


0

Response Number 2
Name: tuk
Date: June 2, 2008 at 11:49:42 Pacific
Reply:

This is similar to the errors I recieved with Choice.exe

Choice.com 1,754 bytes

Vista x64 error:

"This version of C:\Users\V1\Desktop\PROFILER\DATA\CHOICE.COM is not compatible with the version of Windows you're running. Check your computer's system information to see whether you need a x86 (32-bit) or x64 (64-bit) version of the program, and then contact the software publisher."

I can right-click choice.com but there is no compatibility tab available...
-----------

Just to clarify what i posted before, Im not sure this is even possible with 'Choice.exe':

I have one version of choice.exe that works with XP and another version that works with Vista,
If I include both versions in my .bat folder(seperate folders) is it possible for the batch file to use the right choice.exe based on the OS at runtime

..something like
If vista detected CD %vistaChoiceLoc% else
If XP detected CD %XPchoiceLoc%
choice /N /C:

Warning Batch Newbie:
Thanks For Being Patient!
Any Help Is Appreciated!


0

Response Number 3
Name: Mechanix2Go
Date: June 2, 2008 at 12:22:37 Pacific
Reply:

W2K has this var bilt in:

OS=Windows_NT

With luck, maybe XP & vista do too. If so:

if %OS%==XP c:\a\choice
if %OS%==vista c:\b\choice


=====================================
If at first you don't succeed, you're about average.

M2


0

Response Number 4
Name: Razor2.3
Date: June 2, 2008 at 15:16:26 Pacific
Reply:

Vista (and I think XP) x64 have eliminated support for 16-bit programs. This includes CHOICE.exe. I personally suggest just using SET /P, but that's just me.

As far as detection goes, you could probably use a VBScript to run a WMI query, but I would understand if you didn't want to. The solution I came up with, but was never very happy with, is this:

systeminfo | find "x64" &&set sys=64||set sys=32


0

Response Number 5
Name: Mechanix2Go
Date: June 2, 2008 at 17:17:49 Pacific
Reply:

"Vista (and I think XP) x64 have eliminated support for 16-bit programs"

adios, backward compatibility


=====================================
If at first you don't succeed, you're about average.

M2


0

Related Posts

See More



Response Number 6
Name: Razor2.3
Date: June 2, 2008 at 17:48:15 Pacific
Reply:

Mechanix2Go: adios, backward compatibility
Hey now, it still supports 32-bit. You have nothing to complain about.


0

Response Number 7
Name: tuk
Date: June 2, 2008 at 21:23:25 Pacific
Reply:

I was having trouble with SET & GOTO inside brackets, which is how I came across choice.exe via IVO..even if I could use SET somehow it would be a bit of a rewrite at this stage..

Thinking of the type of tasks that batch seems good for, its hard to understand why M$ woudn't have a choice.exe that works across all their currently supported OS's, well at least XP-->VISTA..I mean what if your batching across 1000 pc's with a mixture of Windows versions.
..maybe it's just another little shoehorn to help us all into our 'Vista Licence'
-------

Anyway what about this for detection, too tired to test now(3:18am), but would be interested to hear what you guys think:

ver | find "Microsoft Windows [Version 5.1.2600]"
IF NOT errorlevel 1 (
echo Windows XP SP2, SP3)

ver | find "Microsoft Windows [Version 5.2.3790]"
IF NOT errorlevel 1 (
echo Windows XP Professional x64 Edition or Windows Server 2003 or Windows XP 64-bit Edition 2003)

ver | find "Microsoft Windows [Version 6.0.6000]"
IF NOT errorlevel 1 (
echo Windows Vista)

ver | find "Microsoft Windows [Version 6.0.6001]"
IF NOT errorlevel 1 (
echo Windows Vista SP1)

Thanks as always for all your previous inputs

Warning Batch Newbie:
Thanks For Being Patient!
Any Help Is Appreciated!


0

Response Number 8
Name: Razor2.3
Date: June 2, 2008 at 22:32:40 Pacific
Reply:

I think Vista 32-bit would still support the same version of CHOICE.exe as WinXP. Therefore, your solution is the right answer to the wrong question.


0

Response Number 9
Name: tuk
Date: June 3, 2008 at 07:40:15 Pacific
Reply:

%OS%
Returns the same value in XP and Vista
Value: "Windows_NT"

SET /P
If the user inputs an invalid value, is there a way to restart the input loop without using GOTO?

"I think Vista 32-bit....."
I cant test for this, might be safer to assume 1 Choice.exe for Vista and another for XP

ps
a)Find a Choice.exe that works for both
b)Test the runtime OS for Vista/XP and change the Choice command to suit???

Warning Batch Newbie:
Thanks For Being Patient!
Any Help Is Appreciated!


0

Response Number 10
Name: Razor2.3
Date: June 3, 2008 at 12:51:45 Pacific
Reply:

I cant test for this, might be safer to assume 1 Choice.exe for Vista and another for XP
You're aready assuming two things: 1) You will never encounter 32-bit Vista. 2) You will never encounter any Windows 64-bit OS besides Vista (Including WinXP x64, Windows 7 x64, and related Windows server OSes).


0

Response Number 11
Name: tuk
Date: June 3, 2008 at 15:21:57 Pacific
Reply:

hmmn good point razor..hopefully this batch will only be relevant on XPx32 Vistax32, x64

I was kinda hoping if Choice.exe works on Vista x64 then it should also work on Vistax32, but as you point out..there may still be compatibility issues x32-->x64

ATM I only have XPx32 and Vistax64 to test on, if I can make it work on these 2, I can maybe expand my solution as I encounter problems during final testing...


'backwards compatibility' what about 'sideways compatibility'

Warning Batch Newbie:
Thanks For Being Patient!
Any Help Is Appreciated!


0

Sponsored Link
Ads by Google
Reply to Message Icon

batch: ..get dir 1 levl u... SQL Query



Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Programming Forum Home


Sponsored links

Ads by Google


Results for: BATCH: Choice.exe Vista/X

batch , Choice.com www.computing.net/answers/programming/batch-choicecom/9281.html

Batch file help www.computing.net/answers/programming/batch-file-help/12261.html

Using the Choice Command www.computing.net/answers/programming/using-the-choice-command/14077.html