Sponsored Content
Top Forums Shell Programming and Scripting Running windows command from Unix Post 82839 by Sabari Nath S on Wednesday 7th of September 2005 03:04:42 AM
Old 09-07-2005
Running windows command from Unix

Hi,

Is there any way to invoke a Windows command from Unix ??

For eg: I want to track down a user executing a script and want to send him a message through net send in windows ..

I am able to get the user machines ip ... and since I want my message to be popped up in users screen, wud like to invoke windows net send from shell script .... Is there any way to do this ??

Please help ...

Thanks in advance,

SNS
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Updating a csv file held on a unix box with excel running on windows

Hi, my question is quite simple: Can I update a csv file which is held on a unix box (and which a script on the same box uses) with Microsoft Excel running in a windows environment? Or, is there a free spreadsheet package available to run in unix that will update my csv file. I know it's easy to... (5 Replies)
Discussion started by: Sn33R
5 Replies

2. UNIX for Dummies Questions & Answers

Running a UNIX command from Windows

Hi I need to run a UNIX command from Visual C++ Windows program. I was thinking of the Windows program generating a dummy file on the UNIX drive. On the UNIX box I could have a simple FORTRAN porogram searching continually for this dummy file and executes the UNIX command when the file... (2 Replies)
Discussion started by: robbiegregg
2 Replies

3. UNIX for Advanced & Expert Users

Running windows command from Unix

-------------------------------------------------------------------------------- Hi, Is there any way to invoke a Windows command from Unix ?? For eg: I want to track down a user executing a script and want to send him a message through net send in windows .. I am able to get the user... (1 Reply)
Discussion started by: Sabari Nath S
1 Replies

4. UNIX Desktop Questions & Answers

Running MS-windows GUI from unix/linux

Hi i need some help , i would like to run a GUI application on windows from unix i dont need to see the gui just to activate it from remote . it shoud be from CLI on the unix . thanks GUY (1 Reply)
Discussion started by: koreng
1 Replies

5. UNIX for Dummies Questions & Answers

Running UNIX commands remotely in Windows box from Unix box – avoid entering password

I am able to run the UNIX commands in a Windows box from a UNIX box through "SSH" functionality. But whenever the SSH connection is established between UNIX and Windows, password for windows box is being asked. Is there a way to avoid asking password whenever the SSH connection is made? Can I... (1 Reply)
Discussion started by: D.kalpana
1 Replies

6. Windows & DOS: Issues & Discussions

Running UNIX in windows environment ?

Hi... I have planned to run UNIX application in window environment such as cygwin. Actually, I have download the "cygwin" software but there are some libraries are not applicable in the software. Due to that, anybody know any others unix sofware can be run in windows XP environment ? (1 Reply)
Discussion started by: bh_hensem
1 Replies

7. AIX

Running unix command from windows? How?

Hello Folks, I have a need to execute certain scripts on a regular basis on a number of (AIX) servers. What I had in mind, is to accomplish this using ssh/rsh, auto login. Initially I developped the script, which can be invoked from one of the AIX servers (by loggin into the first host), and... (4 Replies)
Discussion started by: haroon_a
4 Replies

8. Shell Programming and Scripting

To access UNIX server from Tk application running on Windows

Hi, I am new to this forum and this is my first post. I want to know that if I make an application in Tk (version of Tcl to create GUI) in windows and want to run to UNIX server, is it possible ? In other words, can I access a UNIX server through a Tk application running on windows ? ... (1 Reply)
Discussion started by: ratneshnagori
1 Replies

9. Solaris

Running unix script from windows.

Hi All, I need to call a unix script from windows bat file, please help if that can be done. I cant install cygwin or putty or any other ssh on server.....! do we have anything else? (8 Replies)
Discussion started by: fidelis
8 Replies

10. UNIX Desktop Questions & Answers

Can Unix access Windows' File through Command Prompt in Unix

Hi all, I wish to know whether Unix can access window's file in Unix's terminal? Apart from that, how to copy files or share files between Window and Unix? I get to know of secure copy, however, my company's Unix does not support the feature of secure copy? Any other method for me to share/... (5 Replies)
Discussion started by: jessy83
5 Replies
send(n) 						       Tk Built-In Commands							   send(n)

__________________________________________________________________________________________________________________________________________________

NAME
send - Execute a command in a different application SYNOPSIS
send ?options? app cmd ?arg arg ...? _________________________________________________________________ DESCRIPTION
This command arranges for cmd (and args) to be executed in the application named by app. It returns the result or error from that command execution. App may be the name of any application whose main window is on the display containing the sender's main window; it need not be within the same process. If no arg arguments are present, then the command to be executed is contained entirely within the cmd argument. If one or more args are present, they are concatenated to form the command to be executed, just as for the eval command. If the initial arguments of the command begin with "-" they are treated as options. The following options are currently defined: -async Requests asynchronous invocation. In this case the send command will complete immediately without waiting for cmd to complete in the target application; no result will be available and errors in the sent command will be ignored. If the target application is in the same process as the sending application then the -async option is ignored. -displayof pathName Specifies that the target application's main window is on the display of the window given by pathName, instead of the display con- taining the application's main window. -- Serves no purpose except to terminate the list of options. This option is needed only if app could contain a leading "-" character. APPLICATION NAMES
The name of an application is set initially from the name of the program or script that created the application. You can query and change the name of an application with the tk appname command. DISABLING SENDS
If the send command is removed from an application (e.g. with the command rename send {}) then the application will not respond to incom- ing send requests anymore, nor will it be able to issue outgoing requests. Communication can be reenabled by invoking the tk appname com- mand. SECURITY
The send command is potentially a serious security loophole. On Unix, any application that can connect to your X server can send scripts to your applications. These incoming scripts can use Tcl to read and write your files and invoke subprocesses under your name. Host-based access control such as that provided by xhost is particularly insecure, since it allows anyone with an account on particular hosts to con- nect to your server, and if disabled it allows anyone anywhere to connect to your server. In order to provide at least a small amount of security, Tk checks the access control being used by the server and rejects incoming sends unless (a) xhost-style access control is enabled (i.e. only certain hosts can establish connections) and (b) the list of enabled hosts is empty. This means that applications cannot con- nect to your server unless they use some other form of authorization such as that provide by xauth. Under Windows, send is currently dis- abled. Most of the functionality is provided by the dde command instead. EXAMPLE
This script fragment can be used to make an application that only runs once on a particular display. if {[tk appname FoobarApp] ne "FoobarApp"} { send -async FoobarApp RemoteStart $argv exit } # The command that will be called remotely, which raises # the application main window and opens the requested files proc RemoteStart args { raise . foreach filename $args { OpenFile $filename } } KEYWORDS
application, dde, name, remote execution, security, send Tk 4.0 send(n)
All times are GMT -4. The time now is 11:52 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy