This Question is Answered

1 "correct" answer available (20 pts) 1 "helpful" answer available (10 pts)
6 Replies Last post: Dec 5, 2008 9:00 AM by rhyous  
Chris Eales Apprentice 84 posts since
Dec 17, 2007
Currently Being Moderated

Nov 29, 2008 4:41 AM

Running Choice.exe from RUN in Remote Control

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

Zman Expert 1,115 posts since
Dec 14, 2007
Currently Being Moderated
1. Nov 29, 2008 7:45 AM in response to: Chris Eales
Re: Running Choice.exe from RUN in 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
Jack Coates Expert 548 posts since
Nov 16, 2007
Currently Being Moderated
2. Nov 29, 2008 7:59 AM in response to: Chris Eales
Re: Running Choice.exe from RUN in Remote Control

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.

Zman Expert 1,115 posts since
Dec 14, 2007
Currently Being Moderated
3. Nov 29, 2008 8:13 AM in response to: Jack Coates
Re: Running Choice.exe from RUN in Remote Control

Could also be how RC hooks the keyboard.

rhyous Expert 615 posts since
Nov 19, 2007
Currently Being Moderated
4. Dec 1, 2008 10:51 AM in response to: Zman
Re: Running Choice.exe from RUN in Remote Control

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.

rhyous Expert 615 posts since
Nov 19, 2007
Currently Being Moderated
6. Dec 5, 2008 9:00 AM in response to: Chris Eales
Re: Running Choice.exe from RUN in Remote Control

Chris,

 

Thanks for taking time to post the solution.

 

I feel dump for not thinking of that right away:

More Like This

  • Retrieving data ...
LANDesk Community powered by Jive Software's Clearspace ®                                                                        Subscribe| Legal Notices| Investor Relations| Privacy Policy © 2007 LANDesk Software