I am using Windows 10. I am trying to run run a .bat file which will trigger VLC to listen to a multicast stream. The below is what I am trying to execute from a linux machine ( which I intend to use on a python script)
winexe -U admin%kiranc -W WORKGROUP //10.0.10.3 --system --interactive=1 'CMD /C START vlc'
Under windows task manager I can see the service but do not see VLC running in the foreground. If I run any other command like "ipconfig" etc, they all work and get the required result.
win_ip = '10.0.10.3'
k = ("winexe -U admin%kiranc -W WORKGROUP //10.0.10.3 --system --interactive=1 'CMD /C START vlc'".format(win_ip))
reb = subprocess.Popen(k , stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True)
wait = reb.wait()
output = reb.communicate()
print output
Reference: How to activate programs on windows from Linux machine
When I execute the above command I want the VLC or any other application to open up on foreground of the local machine window so that I know the application is doing what it is intended to do.
Thank you for the help.
I am sure many would already know it but Cygwin, psexec is a better option than winexe when it comes to running applications.
Currently I have installed cygwin with sshd service running. It gives me a linux prompt and execute commands like i would on Linux. Also, to execute applications and bring it to the foreground, I have configured a python script which uses psexec to run the applications on the local machine.
The python script, I execute by connecting to the windows machine via ssh.
One thing to note here is that the folders on windows machine is accessible via the /cygdrive/c when you ssh to the machine.
Thank you for the help everyone.