Jump to content

[Help] - remotely start messenger service using PSEXEC


Skitso

Recommended Posts

Hi everyone!

I'm trying to start the messenger-service on another pc within my network while I'm behind my own pc.

All pc's are running W2k or XP. I'm using "psexec" to run a command to change a setting in the registry.

this is my code:

--------------------------------------------------------------------------------------------------------------------------

run("c:\psexec \\pc510 reg add HKLM\SYSTEM\CurrentControlSet\Services\Messenger /v Start /t REG_DWORD /d 00000002 /f")

run("c:\psexec \\pc510 net start messenger")

--------------------------------------------------------------------------------------------------------------------------

When I take a look at my "target"-pc (pc510), I see that the startuptype of this service has changed, but the service has not started.

When I manuely start the service I get this error-message: "Could not start the messenger service on lokal computer. error 1058. The service cannot be started, either because it is disabled or because it has no enabled devices associated with it."

Then, when I change the startup type of the messenger-service on pc510 lokaly/manualy, the second run-command does start the service on the pc510.

The first run-command does change the registry-setting for the messenger service.

It looks like the registry-setting needs to be re-applied or something.........

Is there a registry-master in this forum?

Title Edited - Please follow new posting rules from now on.

--Zxian

Edited by Zxian
Link to comment
Share on other sites


Instead of using psexec (which runs in the context of the locally logged-in user), use the sc.exe command (native to XP) to change the startup value of a service and start the service. It works 100% of the time if the remote user has domain admin privileges.

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

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