Hi,
Not sure if anyone else experiences this?
we have a batch file on all the store system, which brings up a menu using choice and does different system operations.
If i log onto the machine using RDP, I can use choice and pick a menu option no problem.
If i dameware into the system and run the batch file I can pick a menu option OK.
If i use LD Remote Control and launch the batch file from the run box at the top, the menu comes up but unable to pick a menu option - just doesnt do anything
Is right pain, as we have to ring the store up for them to pick an option, or use dameware or RDP
Any suggetions or any tried choice through LD remote control
Chris,
I try to limit external calls in batch files as much as possible (exe may not be available on certain OS versions, etc...) Here is a little code that I use for a simple batch file menu with no external calls. Just in case you can't get choice to work. May not be as elegant as some of Jared's batch files, but it works.
@echo off
:MENU
cls
echo MENU
echo.
echo 1. Option 1
echo 2. Option 2
echo.
echo 99. Exit
echo.
SET choice=
SET option=
SET /P choice=Type the number and press Enter:
:: The syntax in the next line extracts the substring
:: starting at 0 (the beginning) and 1 character long
IF NOT '%choice%'=='' SET choice=%choice:~0,2%
ECHO.
:: /I makes the IF comparison case-insensitive
IF /I '%choice%'=='1' SET option=1
IF /I '%choice%'=='2' SET option=2
IF /I '%choice%'=='99' EXIT
IF NOT '%option%'=='' goto CONTINUE
ECHO "%choice%" is not valid. Please try again.
ECHO.
PAUSE > NUL
GOTO MENU
:CONTINUE
Echo Option Entered is '%choice%'
echo.
pause
It's running as LocalSystem when you run it that way; does it act differently if you use the remote computer's Start > Run? Then it's a permissions problem. Otherwise, it's probably mirror driver.
Could also be how RC hooks the keyboard.
Choice.exe is depricated by Microsoft in favor of the SET /P option. Open a command prompt and type SET /? and read about the SET /P option.
Choice.exe is not included in Vista, XP, or 2000.
Both Jack and Zman have are correct in their different discussions.
However, maybe the issue will still occur with SET /P, I don't know. If you duplicate this issue with SET /P, then it might be something to investigate as a bug or permission issue as Jack mentioned.
I removed the tick out of Auto Key Mapping and choice now works.
Thanks
Chris
Chris,
Thanks for taking time to post the solution.
I feel dump for not thinking of that right away: ![]()
| ||||||
