X10 Community Forum

🖥️ActiveHome Pro => SDK => Topic started by: berniejr72 on November 11, 2008, 06:58:24 PM

Title: Send commands to CM15A via commandline over the network???
Post by: berniejr72 on November 11, 2008, 06:58:24 PM
I know that I can use the ahcmd.exe to use command line instructions to control my CM15A, however is there a way for me to accomplish this from a different PC on my network?  The reason I'm looking for this is because I want to keep my automation laptop and my media server as separate machines.  I would however like the ability for my "media extender PC's" with a custom interface to control functions (lights and appliances) in the room in which they reside.
Title: Re: Send commands to CM15A via commandline over the network???
Post by: Noam on November 11, 2008, 07:20:27 PM
I do exactly that using "psexec". It is part of the free PSTOOLS package.
Look it up on the web.
Title: Re: Send commands to CM15A via commandline over the network???
Post by: berniejr72 on November 11, 2008, 08:49:27 PM
Great stuff!!!!  Thanks!

So your coomand looks something like this

psexec \\activehomepc c:\ahcmd.exe sendplc a2 on   ??

Is ahcmd limited to only basic commands like on/off/dim/query?

Also if you dont mind can I ask what program you use these two utilities with?
Title: Re: Send commands to CM15A via commandline over the network???
Post by: berniejr72 on November 11, 2008, 11:24:09 PM
 :)%   Noam you are the man!   :)%

I downloaded and tested the program and it works to perfection! 

Thanks again.
Title: Re: Send commands to CM15A via commandline over the network???
Post by: Noam on November 12, 2008, 08:15:59 AM
I've actually written a few CMD scripts for the commands I use most. I have a shortcut to those commands from one of the other PCs.
It works out very well for me.
Title: Re: Send commands to CM15A via commandline over the network???
Post by: EL34 on November 12, 2008, 06:22:36 PM
I use remote desktop sharing to go to the PC that has my X10 control software running.
When you click on any RDP connection shortcut, you are looking at the desktop of that PC.


I have a 5 PC network here. Remote desktop is a pretty cool free program in XP

Not sure if that is what you wanted to do, just throwing out info.
Title: Re: Send commands to CM15A via commandline over the network???
Post by: berniejr72 on November 12, 2008, 11:53:50 PM
EL34, thanks for the input.  I'm aware of RDP and VNC, and the likes.  The biggest hurdle that I was trying to get over is that I'm using a program called Xlobby to create a custom interface to control my A/V system via 3 touchscreen panels and a couple of PPC's throughout the house.  Being able to control everything including my automation items from a single interface is the ultimate goal.  PSEXEC and AHCMD combined will allow me to do this, as Xlobby can utilize command-line commands to perform functions.
Title: Re: Send commands to CM15A via commandline over the network???
Post by: Talisman on July 28, 2011, 07:07:24 AM
Hi ive just found this old topic.

Can anyone tell me how they got this to work as im struggling over my network.

im trying to send this

C:\PStools\psexec.exe \\HS "D:\Program files\Common Files\X10\Common\ahcmd.exe" sendplc A1 ON
 
When it gets to the computer name HS it goes no further.
Title: Re: Send commands to CM15A via commandline over the network???
Post by: Noam on July 28, 2011, 08:48:15 AM
First of all, what operating system are you running on "HS"?
Can you execute the command locally on "HS"?
Can you execure the command manually (from the command prompt) at the remote PC?

This was a while ago, but when I moved my AHP over to a Windows 7 system, I remember there were some permissions issues with being able to use psexec to run AHCMD commands over the network. I did get it worked out, but I don't remember all of the details of how I did it.

If you are trying to run the command from within a script, perhaps you need to escape the quotes or something along those lines.
Title: Re: Send commands to CM15A via commandline over the network???
Post by: Talisman on July 28, 2011, 09:17:14 AM
the server is running XP currently

if i run this in cmd on server

C:\PStools\psexec.exe "D:\Program files\Common Files\X10\Common\ahcmd.exe" sendplc A1 ON

it works fine.

but if i try run it from another pc XP or Win7 with the server name HS

C:\PStools\psexec.exe \\HS "D:\Program files\Common Files\X10\Common\ahcmd.exe" sendplc A1 ON

it fails at HS saying

coundlt connect to hs:

the network path was not found

make sure that the default admin$ share is enabled on hs
Title: Re: Send commands to CM15A via commandline over the network???
Post by: Noam on July 28, 2011, 09:26:29 AM
but if i try run it from another pc XP or Win7 with the server name HS

C:\PStools\psexec.exe \\HS "D:\Program files\Common Files\X10\Common\ahcmd.exe" sendplc A1 ON

it fails at HS saying cannot connect.

Sounds like a permissions issue. Do the account name and password you are logged in with on the remote machine match an account and password that have rights on the server to run that command?
If not, you need to use the parameters to specify the account and password on the server that can run the command.
use -u [username] and -p [password] between the server name and the command and see if that works.
Title: Re: Send commands to CM15A via commandline over the network???
Post by: Talisman on July 28, 2011, 09:37:03 AM
no i dont the server is set as

HS

and the machines ill run from have no passwords and are called HTPC1 and HTPC2
Title: Re: Send commands to CM15A via commandline over the network???
Post by: Noam on July 28, 2011, 10:11:38 AM
So you'll need to change the psexec command to use the correct username and password for the user account on HS that you are using.
Try this (replacing the part in brackets with the actual username and password):

C:\PStools\psexec.exe \\HS -u [username] -p [password] "D:\Program files\Common Files\X10\Common\ahcmd.exe" sendplc A1 ON
Title: Re: Send commands to CM15A via commandline over the network???
Post by: Talisman on July 28, 2011, 10:18:50 AM
exactly the same issue  :(
Title: Re: Send commands to CM15A via commandline over the network???
Post by: Noam on July 28, 2011, 11:09:33 AM
exactly the same issue  :(

That's really strange.
Can the HTPC1 and HTPC2 systems see HS at all? (can they ping it, or connect to the file system?)

That sounds like you're still doing something wrong on the psexec end of things, but I can't figure out what.
Perhaps something to do with the Windows firewall on HS?
Title: Re: Send commands to CM15A via commandline over the network???
Post by: hawk1 on July 28, 2011, 11:30:12 AM
For psexec to work right I believe the pc HAS to have a password.  Also, unless they changed it, it won't work trying to send a command to XP Home. It has to be professional or higher.  Just my 2 cents.

Also, iHouse has this capability built in if you wanted to try it.  If so look in 3rd party programs.
Title: Re: Send commands to CM15A via commandline over the network???
Post by: Noam on July 28, 2011, 11:45:37 AM
For psexec to work right I believe the pc HAS to have a password.  Also, unless they changed it, it won't work trying to send a command to XP Home. It has to be professional or higher.  Just my 2 cents.

I'm not sure about the password thing on the "sending" PC, since psexec has the ability to set what credentials to use on the machine it is controlling. A password is definitely required on the "receiving" PC.
The OP didn't mention if HS is running XP Home or XP Pro. It seems that the remote computer (HS, in this case) must be running a "Pro" version of the OS.

A few more things I found:
1. Try using the IP address of the server, instead of the name. See if that makes a difference.

2. Make sure the "$Admin" share is enabled on HS.

3. Make sure that File and Printer sharing is enabled on HS in the firewall.

4. The account that you are using on HS has a password, right?

Title: Re: Send commands to CM15A via commandline over the network???
Post by: Tuicemen on July 28, 2011, 04:27:12 PM
PC Companion can do this with X10Relayer.
iHouse can also do this (as hawk1 mentioned) as can several other thirdparty softwares.
 >!
Title: Re: Send commands to CM15A via commandline over the network???
Post by: dbemowsk on July 28, 2011, 06:14:36 PM
if i try run it from another pc XP or Win7 with the server name HS

C:\PStools\psexec.exe \\HS "D:\Program files\Common Files\X10\Common\ahcmd.exe" sendplc A1 ON

it fails at HS saying

coundlt connect to hs:

the network path was not found

make sure that the default admin$ share is enabled on hs

Networking can be tricky at times.  Especially if you are using the name of the PC to connect to it.  I doubt that you are connected to a domain controller being a home network setup, so most likely you are using workgroup names.  If that is the case, make sure that ALL of your computers are set to be in the same workgroup.  If this is not done you can run into issues. 

Another route you could take is running the command using the IP address of the \\HS machine, so you would do that like this:
C:\PStools\psexec.exe \\192.168.1.10 "D:\Program files\Common Files\X10\Common\ahcmd.exe" sendplc A1 ON
Obviously you want to change the 192.168.1.10 to the IP address of your HS machine.  You may even want to set your IP addresses static on the machines.  Using the IP address route eliminates the need for the workgroups to all be the same. 
Title: Re: Send commands to CM15A via commandline over the network???
Post by: Talisman on July 28, 2011, 06:26:51 PM
For psexec to work right I believe the pc HAS to have a password.  Also, unless they changed it, it won't work trying to send a command to XP Home. It has to be professional or higher.  Just my 2 cents.

I'm not sure about the password thing on the "sending" PC, since psexec has the ability to set what credentials to use on the machine it is controlling. A password is definitely required on the "receiving" PC.
The OP didn't mention if HS is running XP Home or XP Pro. It seems that the remote computer (HS, in this case) must be running a "Pro" version of the OS.

A few more things I found:
1. Try using the IP address of the server, instead of the name. See if that makes a difference.

2. Make sure the "$Admin" share is enabled on HS.

3. Make sure that File and Printer sharing is enabled on HS in the firewall.

4. The account that you are using on HS has a password, right?



HS is running XP Pro.  other pc's on the network can see the server (HS) and i run ultravnc on all and can access it no probs. I just cant get this to fire across....

Tried using the IP i get access denied.

$Admin?? where do i find this? the Drive on the server is shared.

File and print sharing is on.

Yes HS has a password. Computer name is server, account is HS, and password is something! :)

Tried

d:\tools\pstools\psexec.exe \\192.168.167.100 -u HS -p ******* "C:\Program Files\ Common Files\X10\Common\ahcmd.exe" sendplc A1 ON

d:\tools\pstools\psexec.exe \\192.168.167.100 "C:\Program Files\ Common Files\X10\Common\ahcmd.exe" sendplc A1 ON

d:\tools\pstools\psexec.exe \\server -u HS -p ******* "C:\Program Files\ Common Files\X10\Common\ahcmd.exe" sendplc A1 ON

d:\tools\pstools\psexec.exe \\server "C:\Program Files\ Common Files\X10\Common\ahcmd.exe" sendplc A1 ON

none work
Title: Re: Send commands to CM15A via commandline over the network???
Post by: hawk1 on July 28, 2011, 07:03:18 PM
Go into safe mode of the XP Pro pc and make sure the "administrator" has a password.

Something else to try:

    In the Control Panel, open Administrative Tools.
    Open Local Security Policy.
    Navigate to Local Policies -> Security Options
    Change "Accounts: Limit local account use of blank passwords to console logon only" to Disabled
Title: Re: Send commands to CM15A via commandline over the network???
Post by: Talisman on July 29, 2011, 04:00:38 AM
Go into safe mode of the XP Pro pc and make sure the "administrator" has a password.

Something else to try:

    In the Control Panel, open Administrative Tools.
    Open Local Security Policy.
    Navigate to Local Policies -> Security Options
    Change "Accounts: Limit local account use of blank passwords to console logon only" to Disabled


done, no difference.

if im on HTPC1 i can see in the network computers Server with shared drive d. i can access the file too....

doing my head in,.

getting access denied now......
Title: Re: Send commands to CM15A via commandline over the network???
Post by: hawk1 on July 29, 2011, 08:24:14 AM
Try this: make a directory in the root directory called ahcmd and share it.  then copy ahcmd.exe  into that folder and try the psexec command for that folder.
Title: Re: Send commands to CM15A via commandline over the network???
Post by: Talisman on July 29, 2011, 08:40:01 AM
Done.

Couldnt access server.
Access is denied.

(Im going to rebuild the server this weekend and install win7 on it, see if it makes any difference....)
Title: Re: Send commands to CM15A via commandline over the network???
Post by: Noam on July 29, 2011, 09:06:09 AM
One other thing to try:
Disable the "Guest" account on the XP machines.
I've seen that cause problems with accessing stuff across the network.

Another thing to try is to connect to the file system of the server from one of the PCs (using the correct server account credentials).
If you can't authenticate, then you need to solve that issue before PSEXEC will work.
This seems to be a permissions / authentication issue with Windows, which is preventing PSEXEC from working. Solve that, and you should be able to use it to run the AHCMD commands.
Title: Re: Send commands to CM15A via commandline over the network???
Post by: Talisman on July 29, 2011, 09:28:45 AM
ill try these first n if no succsess ill re install anyway. (it needs it)

thank you for all your help. think ill be needing it again after re install if this does do the trick.
Title: Re: Send commands to CM15A via commandline over the network???
Post by: Talisman on July 31, 2011, 08:17:06 AM
ok fresh win7 install...

bloody same issue. cannot access server
Title: Re: Send commands to CM15A via commandline over the network???
Post by: Noam on July 31, 2011, 09:39:07 PM
ok fresh win7 install...

bloody same issue. cannot access server
It still sounds like a permissions issue to me.
Are you able to access any shared files on the server from one of the two other PCs?
It might be a limitation in XP Home.
Title: Re: Send commands to CM15A via commandline over the network???
Post by: dbemowsk on July 31, 2011, 09:57:11 PM
Are you able to access any shared files on the server from one of the two other PCs?
It might be a limitation in XP Home.

First, I doubt it is a limitation in XP home.  File and print sharing is available in all versions of windows.  I agree though that he should start by verifying file sharing between the PCs.  Another thing that could be hanging you up on this is Windows firewall.  try temporarily disabling windows firewall ( on ALL PCs) and give it a test.  If you can then access the other machines, that is probably your issue and you then need to figure out what port you need to open up on the firewall(s).

To test file sharing between machines, go to a machine that you have a share set up on and get it's IP address and the name of the share.  Next, go to one of the other machines and go to a run box by holding down the Win key and pressing R on the keyboard.  In the Run dialog box type \\{ip address of remote machine}\{share name on remote machine} and see if it lets you access the files.  If you can't access them from that, it could be as Noam says, a permissions issue.  in that case you need to check your shared folder to see who has access to it.  heck out this link:

http://windows.microsoft.com/en-US/windows7/File-sharing-essentials (http://windows.microsoft.com/en-US/windows7/File-sharing-essentials)

Let us know your progress.
Title: Re: Send commands to CM15A via commandline over the network???
Post by: hawk1 on July 31, 2011, 11:05:09 PM
I know for a fact that I read somewhere that you can not send a psexec command to a XP Home pc it has to be XP Pro.  I too went through this problem a while back and found it in the Systernal's forum somewhere.

If it is XP Pro that your sending it to then it will work just have to work out the kinks.   :)
Title: Re: Send commands to CM15A via commandline over the network???
Post by: Talisman on August 01, 2011, 03:05:15 AM
Both machines I'm working from are using win7 ultimate. I'll try disabling the firewall.
Title: Re: Send commands to CM15A via commandline over the network???
Post by: Talisman on August 01, 2011, 05:40:55 AM
firewall off.

access denied still.....
 B:(
Title: Re: Send commands to CM15A via commandline over the network???
Post by: Talisman on August 01, 2011, 07:03:46 AM
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.
Title: Re: Send commands to CM15A via commandline over the network???
Post by: Noam on August 01, 2011, 08:47:48 AM
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.
Title: Re: Send commands to CM15A via commandline over the network???
Post by: 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
Title: Re: Send commands to CM15A via commandline over the network???
Post by: Noam on August 01, 2011, 09:24:06 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)
Title: Re: Send commands to CM15A via commandline over the network???
Post by: Talisman on August 01, 2011, 10:06:02 AM
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
Title: Re: Send commands to CM15A via commandline over the network???
Post by: Noam on August 01, 2011, 10:18:56 AM
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.
Title: Re: Send commands to CM15A via commandline over the network???
Post by: 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.
Title: Re: Send commands to CM15A via commandline over the network???
Post by: Noam on August 01, 2011, 11:00:38 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.
Title: Re: Send commands to CM15A via commandline over the network???
Post by: 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
Title: Re: Send commands to CM15A via commandline over the network???
Post by: Noam on August 01, 2011, 11:16:25 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.
Title: Re: Send commands to CM15A via commandline over the network???
Post by: Talisman on August 01, 2011, 11:24:27 AM
only if you can get it to work lol  >*<
Title: Re: Send commands to CM15A via commandline over the network???
Post by: hawk1 on August 01, 2011, 12:31:26 PM
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.
Title: Re: Send commands to CM15A via commandline over the network???
Post by: jrwhit on August 01, 2011, 12:38:06 PM
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)


Title: Re: Send commands to CM15A via commandline over the network???
Post by: hawk1 on August 01, 2011, 12:50:27 PM
This link might help.  I don't know.   http://www.windowsitpro.com/article/remote-computing/psexec
Title: Re: Send commands to CM15A via commandline over the network???
Post by: Talisman on August 01, 2011, 01:10:21 PM
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)


if i run that from either of the two pc's i get

script d:\tools\pstools\a1on.vbs
Line: 1
Char: 1
Error The remote server machine does not exist or is unavailable:
getobject
code 800a01ce




Title: Re: Send commands to CM15A via commandline over the network???
Post by: Noam on August 01, 2011, 01:23:27 PM
This link might help.  I don't know.   http://www.windowsitpro.com/article/remote-computing/psexec

I took a look at that link. There are a lot of good suggestions (like trying to run "ipconfig" or "cmd" remotely to test the connection).
I did a test myself, going from one of my XP Pro machines to two different Win7 machines.
One worked, the other got an error that indicated invalid login credentials (which I expected).

I think I may have been able to reproduce your error.
Using two XP Pro machines, I tried to run "ipconfig" remotely.
However, I used the "-u" and "-p" with a username that did NOT have admin rights on the remote machine.
I got this error:

Couldn't access [Remote Pc]:
Access is denied.

Is that the same error you are getting?

I thought I read that you are using XP Home on the two "local" PCs from which you are trying to send the commands.
I don't have an XP Home system to test with, but I know that it doesn't handle network authentication the same way that XP Pro does.
Check out this link for another possible fix:
http://serverfault.com/questions/8805/psexec-access-is-denied/11043#11043
Title: Re: Send commands to CM15A via commandline over the network???
Post by: Talisman on August 01, 2011, 01:49:43 PM
i was but as said i re installed the server over the weekend.

basically i need 2 pc's to be able to run this psexec to the server

HTPC1 and HTPC2

HTPC1 = XP Pro
HTPC2 = Win7

Server now is Win7

Server is running with user HS which is the ADMIN


yes thats the error i get everytime
Title: Re: Send commands to CM15A via commandline over the network???
Post by: Noam on August 01, 2011, 02:38:33 PM
i was but as said i re installed the server over the weekend.

basically i need 2 pc's to be able to run this psexec to the server

HTPC1 and HTPC2

HTPC1 = XP Pro
HTPC2 = Win7

Server now is Win7

Server is running with user HS which is the ADMIN


yes thats the error i get everytime

Okay, NOW I think we might be getting somewhere.
1. What version of win7 is in the server and HTPC2? (Home, pro, ultimate, starter?)
2. Are you using a username AND password on all three PCs?
3. Is the Guest account disabled on all three PCs?

From a command prompt on both HTPC1 and HTPC2, try doing "psexec \\server ipconfig" and see what happens.
Next, try this: "psexec \\server -u HS -p [password_for_HS] ipconfig"  , and see what happens.

Make a note of the errors, and if they are any different.
Title: Re: Send commands to CM15A via commandline over the network???
Post by: Talisman on August 01, 2011, 05:16:10 PM
win 7 ulitimate on htpc2, gamespc, server

htpc1 xp pro

tried user names and passwords on all, as well as making all the accounts and passwords the same

yup guest accounts disabled

tried both. same as norm, access denied
Title: Re: Send commands to CM15A via commandline over the network???
Post by: Noam on August 01, 2011, 05:27:50 PM
That still sounds like a permissions issue.
all of the machines are in he same workgroup (in the network settings), right?
what type of sharing setup do you have on the win7 machines (home network, work network, public)?

you should be able to open up the C: drive of the user using \\server\c$ from the other PCs. It may or may not ask you to authenticate.
If you can't, then thre is still something not set up correctly in your permissions, firewall, or sharing setup.

Make sure the XP machines have "use simple file sharing" turned OFF (in the advanced options for Windows Explorer, under folder options)
Make sure that file and printer sharing is turned ON on all the machines.

Turn ON "password protected sharing" on the Win7 machines.
Title: Re: Send commands to CM15A via commandline over the network???
Post by: Talisman on August 01, 2011, 06:29:45 PM
your right it was (notice the WAS) stupid stuff.

with a lot of help from here and a mate of mine finally cracked it.

on the server had to go into control panel\windows firewall\advance settings.

clcik inbound rules. find Remote Service Management (RPC) Private and make it enabled.

then into Control Panel\User Accounts. clcik Change User Account Control Settings and drop it down to never notify.

Then ive changed the Server, HTPC1 and Games PC user names to all be HS and no password.

This seems to have cracked it  >!

Title: Re: Send commands to CM15A via commandline over the network???
Post by: dbemowsk on August 01, 2011, 07:59:44 PM
I know for a fact that I read somewhere that you can not send a psexec command to a XP Home pc it has to be XP Pro.  I too went through this problem a while back and found it in the Systernal's forum somewhere.

If it is XP Pro that your sending it to then it will work just have to work out the kinks.   :)

Hawk1, I see now that you are correct.  It has to do with aco**** sharing.  I stumbled on this post from vbforums.com of all places.

"There is no way to exec psexec or other remote execution tools under home edition since the account sharing is disabled. XP home allows printers and files sharing only via a simplified networking method. The same for Vista home Premium. On the web you may find tricks to work around this but they force to enable the Professional version facilities in way I don't suggest to follow."

I also stumbled onto one that said that it is not meant for vista either, but some have found workarounds that can make it work.  So I suspect you may run into similar issues on Windows 7.
Title: Re: Send commands to CM15A via commandline over the network???
Post by: Noam on August 01, 2011, 08:33:21 PM
your right it was (notice the WAS) stupid stuff.

with a lot of help from here and a mate of mine finally cracked it.

on the server had to go into control panel\windows firewall\advance settings.

clcik inbound rules. find Remote Service Management (RPC) Private and make it enabled.

then into Control Panel\User Accounts. clcik Change User Account Control Settings and drop it down to never notify.

Then ive changed the Server, HTPC1 and Games PC user names to all be HS and no password.

This seems to have cracked it  >!
I'm glad to hear you finally have it working.
I know you can turn UAC back on (I have it on, and psexec works fine).
You can also set passwords on those accounts (I have passwords, and it works fine).
Also, try logging into one of the remote PCs as a different username, and use the -u and -p parameters to send the commands. It should work now.
Most likely it was the firewall issue that was blocking it.
Title: Re: Send commands to CM15A via commandline over the network???
Post by: Talisman on August 02, 2011, 04:11:19 AM
i tried the fire wall enable first and no joy.
it was a case in the end of 5 hours of head scrathing and clicking this and that.

Im going to continue tweaking as id like a password on the server (its on all the time) and the other two pcs HTPC1 & HTPC2 im not to fussed about.

But at least i know i can make subtle changes now and if it doesnt work put it back.

Ive now full control of my automation devices by remote control from either of the two machines when watching films now :) #:)
Title: Re: Send commands to CM15A via commandline over the network???
Post by: Noam on August 02, 2011, 08:07:23 AM
Did you try logging into HTPC1 or HTPC2 with a different user name, and then using the -u and -p on the psexec command?
If that works, you should be able to put a password back on the accounts on the server, and turn UAC back on.
Title: Re: Send commands to CM15A via commandline over the network???
Post by: Talisman on August 02, 2011, 08:09:57 AM
i did try that and it didnt work so have had to resort to all 3 pcs having HS as the user name and no password currently.
Title: Re: Send commands to CM15A via commandline over the network???
Post by: Talisman on August 18, 2011, 08:16:17 AM
ive posted this in diff section to but....

 im wanting to use this to send a command key to another pc that runs all me Home Theatre stuff.

ive learned how to use psexec to send from the HTPC pc to the Server running this activehome pro sofware to control lights when i press play on the htpc system.

im looking to to reverse the process to when a sensor is activated it will send a commang from the server to the htpc and in essense press the space bar on the keyboard.

any ideas what id have to send? im guess it wont be

psexec.exe \\htpc c:windows\spacebar...
Title: Re: Send commands to CM15A via commandline over the network???
Post by: Noam on August 18, 2011, 10:21:20 PM
You can use a program like AutoIt or AutohotKey to fake a keypress.
Or, get a solenoid attached to an X10 universal module, and send an ACTUAL keypress. ;)