# VBScript WshShell.Run from Windows to Linux host



## Dinnerticketboy (May 12, 2009)

I'm writing a script from a Windows pc to try and get the current keyboard language that is set on a remote Linux pc.
It uses the free command Plink (unless anyone knows a better method) to remote run a series of commands on the linux host and assign 'KeyCode' with the answer.

KeyCode = WshShell.Run("plink.exe [email protected] -pw root setxkbmap -print -display :0.0 | grep xkb_symbols | awk '{print $4}' | awk -F "+" '{print $2}')

If I run the command directly from the linux shell it works fine, any ideas?


----------



## TheOutcaste (Mar 19, 2009)

Dinnerticketboy said:


> KeyCode = WshShell.Run(*"*plink.exe [email protected] -pw root setxkbmap -print -display :0.0 | grep xkb_symbols | awk '{print $4}' | awk -F *"*+*"* '{print $2}')


Just a guess, but looks like you might be missing a closing quote (to match the one I colored blue) just before the closing parenthesis.


----------

