Sign in to follow this  
Followers 0
zxc3

Process close

13 posts in this topic

#1 ·  Posted (edited)

I want to close process Word.exe by machine User-02, but when I start from my machine program Runwait ("proclose.exe", " \\ user-02\D $\lc ") process

WinWord.exe it is closed on mine to the machine, instead of by machine User-02.

How to me to make, that process was closed by machine User-02, instead of by my machine?

;Proclose on \\user-02\D$\lc

processclose("Winword.exe")

$PID = ProcessExists("Winword.exe") ; Will return the PID or 0 if the process isn't found.

If $PID Then Processclose($PID)

ProcessWaitClose($pid)

And such User2 User100

Edited by zxc3

Share this post


Link to post
Share on other sites



See RunAsSet in help file.



Get Beta versions Here Get latest SciTE editor Here AutoIt 1-2-3 by Valuater - A great starting point.

Time you enjoyed wasting is not wasted time ......T.S. Elliot
Suspense is worse than disappointment................Robert Burns
God help the man who won't help himself, because no-one else will...........My Grandmother

Share this post


Link to post
Share on other sites

I ask not about it. At me it is right the admin, and I and so I have access to all machines and to catalogues with my password.

But when I start the program by the another's machine, she closes processes by my machine, instead of on that with which the program is started.

Share this post


Link to post
Share on other sites

I ask not about it. At me it is right the admin,  and I and so I have access to all machines and to catalogues with my  password.

But when I start the program by the another's machine, she closes processes by my machine, instead of on that with which the program is started.

<{POST_SNAPBACK}>

I am not sure what you are trying to do but perhaps you should investigate PSTools.


Get Beta versions Here Get latest SciTE editor Here AutoIt 1-2-3 by Valuater - A great starting point.

Time you enjoyed wasting is not wasted time ......T.S. Elliot
Suspense is worse than disappointment................Robert Burns
God help the man who won't help himself, because no-one else will...........My Grandmother

Share this post


Link to post
Share on other sites

Whether it is possible to close process started by the concrete file, taking place to us to the machine \\ user-02, instead of simply winword.exe

Share this post


Link to post
Share on other sites

I think I know what the problem might be.

You're storing the script you wrote on \\User-02\D$\lc, but you're trying to execute the script from your machine.

The problem would then be that when you execute the script, you are pulling a temporary version onto your machine, and executing the copy locally ProcessExists() will occur on your machine, not his.

If you want it to run on their machines, you should make a While 1...WEnd loop, and call it as a user logon script. That way, if winword.exe is ever active, it will auto-close the application on their system.


Writing AutoIt scripts since
_DateAdd("d", -2, _NowCalcDate())

Share this post


Link to post
Share on other sites

I think I know what the problem might be.

You're storing the script you wrote on \\User-02\D$\lc, but you're trying to execute the script from your machine.

The problem would then be that when you execute the script, you are pulling a temporary version onto your machine, and executing the copy locally ProcessExists() will occur on your machine, not his.

If you want it to run on their machines, you should make a While 1...WEnd loop, and call it as a user logon script.  That way, if winword.exe is ever active, it will auto-close the application on their system.

<{POST_SNAPBACK}>

I have not understood. I.e., if I shall start this program not from the command line by my machine, and with the help of such program from my machine:

While 1

Runwait ("proclose.exe","\\User-02\D$\lc")

Wend

It will work?

Good on Monday I shall try.

And in what sense if it is possible more in detail.

And that I wanted already something:

Processclose ("\\User-02\D$\lc\Winword.exe").

Thanks for the help.

Share this post


Link to post
Share on other sites

I have not understood. I.e., if I shall start this program not from the command line by my machine, and with the help of such program from my machine:

While 1

Runwait ("proclose.exe","\\User-02\D$\lc")

Wend

It will work?

Good on Monday I shall try.

And in what sense if it is possible more in detail.

And that I wanted already something:

Processclose ("\\User-02\D$\lc\Winword.exe").

Thanks for the help.

<{POST_SNAPBACK}>

Looks to me you want to start the script on another PC from your own pc.

If thats what you want you need to use a tool like PSEXEC ....


Visit the SciTE4AutoIt3 Download page for the latest versions  - Beta files                                How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

Looks to me you want to start the script on another PC from your own pc.

If thats what you want you need to use a tool like PSEXEC ....

<{POST_SNAPBACK}>

Did you mean

http://www.autoitscript.com/fileman/users/jdeb/scriptlets/admin.au3

or another?

Thanks

Share this post


Link to post
Share on other sites

Did you mean

http://www.autoitscript.com/fileman/users/jdeb/scriptlets/admin.au3

or another?

Thanks

<{POST_SNAPBACK}>

PSEXEC comes from sysinternals...

Visit the SciTE4AutoIt3 Download page for the latest versions  - Beta files                                How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

Whether there is other variant except for PsExec I about Looks to me you want to start the script on another PC from your own pc ?

Share this post


Link to post
Share on other sites

PSEXEC comes from sysinternals...

<{POST_SNAPBACK}>

Anti-virus scanners report about....

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0