Jump to content

Recommended Posts

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
Posted

See RunAsSet in help file.


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

Posted

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.

Posted

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.


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

Posted

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

Posted

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())
Posted

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.

  • Developers
Posted

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 ....

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Posted

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

Posted

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 ?

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...