Send commands to CM15A via commandline over the network???

Started by berniejr72, November 11, 2008, 06:58:24 PM

Previous topic - Next topic

Talisman

Both machines I'm working from are using win7 ultimate. I'll try disabling the firewall.

Talisman


Talisman

Righty.

ive just tried to reverse this issue.

HTPC1 Win XP Pro

Server Win 7 Ultimate.

Server shared drive D
HTPC1 shared drive D

HTPC1 Map Network drive Server\d = access denied (with or without firewall enabled)
Server Map Network drive HTPC1\d = full access and that is with both machines on with windows firewall.

HTPC1 boots up straight into windows no password required. The server has a windows password login.

Noam

Is the "Guest" account disabled on the Win7 machine?

Also, I remember reading (can't remember where) that you MUST have a password on any account logging in if you want to use File and Printer Sharing (and I'm pretty sure PSEXEC ties into those hooks for authentication).
Try setting a password on the HTPC machine's account (you can use TweakUI to log in with it automatically still), and see if that helps.

Talisman

guest accounts off on both.

password added to HTPC1

Access denied.

I have managed to map the network drive D from the server to the HTPC

So i can see it and access it now via explorer.

soon as i run the cmd psexec still get denied

Noam

Quote from: Talisman on August 01, 2011, 09:20:04 AM
guest accounts off on both.

password added to HTPC1

Access denied.

I have managed to map the network drive D from the server to the HTPC

So i can see it and access it now via explorer.

soon as i run the cmd psexec still get denied

You tried running PSEXEC again with the username and password options, right?
Try using "server\username" for the username, instead of just "username" (obviously, you would use the REAL username in the command)

Talisman

yup tried with the user name and passwords again. tried it the other way too now.

couldnt access server\hs

the network path was not found

make sure that the default admin$ is enabled on server\hs

Noam

What are the permissions set to on the folder where ahcmd.exe is located?
Try setting them to allow everyone "read and execute" rights.

Unfortunately, I don't remember what I did to get it working, but I do have those permissions explicitly set (in my case, for "authenticated users", though).

If that works, then you can look into restricting the permissions only to those accounts (or groups) that need it.

Talisman

im not even getting to ahcmd mate.

it tryes to connect to the server and fails straight away.

Noam

Quote from: Talisman on August 01, 2011, 10:33:07 AM
im not even getting to ahcmd mate.

it tryes to connect to the server and fails straight away.

I'm not really sure what's going on, then.
I tried to reproduce the problem, but I can't.

There is another thing you can try, though.
Instead of trying to his ahcmd, try creating a batch file to do something really simple (like copy a text file to a new name or something), and see if you can run that through psexec.
It still sounds like an access permissions issue to me, but I don't know what to suggest to solve it.

Talisman

i had thought of this as at one stage i was able to to access a shared document folder on the Server.

so i mapped that folder on the HTPC as z:\users\public. and basically i create a a1-on.bat file on the server

and said in cmd

z:\users\public\public documents\a1-on.bat

which this ran no problem,

the bat file said blah blah ahcmd.exe sendplc A1 ON

but when it runs its running it on the local machine HTPC instead of the server where the file is... AHHHHHHH

Noam

Quote from: Talisman on August 01, 2011, 11:10:35 AM
i had thought of this as at one stage i was able to to access a shared document folder on the Server.

so i mapped that folder on the HTPC as z:\users\public. and basically i create a a1-on.bat file on the server

and said in cmd

z:\users\public\public documents\a1-on.bat

which this ran no problem,

the bat file said blah blah ahcmd.exe sendplc A1 ON

but when it runs its running it on the local machine HTPC instead of the server where the file is... AHHHHHHH
That is correct. you can run the batch file from anywhere, but it will execute on the local machine where you run it. That's the advantage of PSEXEC - it lets you run things on a remote PC.

Talisman


hawk1

Have you tried making sure you have the same administrator account on both machines?  And also that the HA pc has a login and not booting right into windows?  After that I'm stumped.

You might try the SysInternals forum.
koopr@sstelco.com, I don't know what I'm doin but I'm havin fun doin it!

jrwhit

Just curious, have you tried it using WMI in Windows without PSEXEC?
If you copy the 2 lines below into a new file called A1 on.vbs and double click this file on your networked PC, what happens?

Set objProcess = GetObject("winmgmts:{impersonationLevel=impersonate}!\\hm\root\cimv2:Win32_Process")

result = objProcess.Create ("C:\Program Files\Common Files\X10\Common\ahcmd.exe sendplc A1 on", null, null, intProcessID)