Author Topic: Command Line Issues  (Read 4344 times)

bfineman

  • Newbie
  • *
  • Posts: 10
    • View Profile
Command Line Issues
« on: April 18, 2010, 01:30:24 PM »
Hi guys. I'm having some issues using iCam Source via command line. I'll preface by saying these issues are on Windows Home Server, which I know you don't support, but I figured I'd report them anyway.  ;) I'm running iCam Source v1.4.2.5b.

Here's my batch:

cd C:\Program Files\iCamSource
start iCamSource.exe -v=0 -cu=x -cp=x -desc="Living Room"
start iCamSource.exe -v=1 -cu=x -cp=x -desc="Basement"

Issue one: The description argument doesn't work right. With multiple cameras, a random description is applied to all the cameras. Usually it is the last one. In my example, both of my cameras are called "Basement".

Issue two: the "-cu/-cp" and "-u/-p" arguments seem reversed. In my example, I frist tried using "-u/-p" to set my source username and passwords. This didn't work. I instead tried "-cu/-cp" which as I understood it was supposed to be for IP cameras, but this worked to set my source login info.

Another issue that's semi related, but maybe is a feature request: if I have push or record selected for one camera, it applies to both cameras next time they are started. This is not terrible but I would prefer to be able to set this on a per camera basis on the command line.

Thanks,
Ben

Jay

  • Administrator
  • Hero Member
  • *****
  • Posts: 1096
    • View Profile
Re: Command Line Issues
« Reply #1 on: April 18, 2010, 11:57:37 PM »
I'd be surprised if the handling of command line arguments would be affected by the version of Windows you're running.  If the Windows version was causing problems, I'd expect the program to crash.

I'll try to replicate the behavior you're describing on my Windows computer tomorrow.  I could imagine the "-desc" problem being due to how the program uses the registry.  I can't imagine any reason for the strange login behavior you're describing.  Currently, push notifications can't be set through the command line.  I'll look into the feasibility of that when I'm looking into the other two issues tomorrow.

fred

  • Newbie
  • *
  • Posts: 33
    • View Profile
Re: Command Line Issues
« Reply #2 on: April 19, 2010, 12:29:50 PM »
I just tried it -desc="Living Room" -desc="Driveway" -desc="Kitchen" all three worked fine..using vista 64
Ricky

Jay

  • Administrator
  • Hero Member
  • *****
  • Posts: 1096
    • View Profile
Re: Command Line Issues
« Reply #3 on: April 20, 2010, 04:26:35 PM »
I wasn't able to replicate that behavior on Windows Vista or Windows XP.  I'll try it on Windows 7 as well, but we haven't gotten any other reports of this behavior, so it really may be an issue with Windows Home Server.  I can't imagine why it would interpret command line arguments differently than any other version of Windows.

bfineman

  • Newbie
  • *
  • Posts: 10
    • View Profile
Re: Command Line Issues
« Reply #4 on: April 25, 2010, 10:24:01 AM »
Thanks for looking into it. Are there any tests I can do for you on my WHS machine?

Thanks,
Ben

Jay

  • Administrator
  • Hero Member
  • *****
  • Posts: 1096
    • View Profile
Re: Command Line Issues
« Reply #5 on: April 25, 2010, 04:52:40 PM »
I'd need to know exactly what the batch file is set up to do before I could set up any kind of test.  Is it possible for you to email a copy of your batch file to support@skjm.com?  You can replace the login and password text with x's, but please leave everything else exactly the way you currently have it set up, including any quotation marks around the login/password text (if you have them).

bfineman

  • Newbie
  • *
  • Posts: 10
    • View Profile
Re: Command Line Issues
« Reply #6 on: May 01, 2010, 12:56:13 PM »
Hi Jay,

No secrets here, I included my batch in my original post  :) Here it is again:

cd C:\Program Files\iCamSource
start iCamSource.exe -v=0 -cu=x -cp=x -desc="Living Room"
start iCamSource.exe -v=1 -cu=x -cp=x -desc="Basement"

I don't put quotes around my passwords. Should I?

Thanks,
Ben

Jay

  • Administrator
  • Hero Member
  • *****
  • Posts: 1096
    • View Profile
Re: Command Line Issues
« Reply #7 on: May 01, 2010, 09:29:52 PM »
No, you don't need to use quotes around the password, I just wanted to find out if you were using quotes around the password.  The quotes are the only thing I can think of that might be causing the strange description behavior.

Please replace -desc="Living Room" with -desc=LivingRoom and replace -desc="Basement" with -desc=Basement  so that there aren't any quotes in the commands.  Be sure to remove the space between "Living" and "Room".

bfineman

  • Newbie
  • *
  • Posts: 10
    • View Profile
Re: Command Line Issues
« Reply #8 on: May 02, 2010, 10:04:36 AM »
Thanks, I did this such that may batch now looks like this:

C:
cd C:\Program Files\iCamSource
start iCamSource.exe -v=0 -a=0 -cu=x -cp=x -desc=LivingRoom
start iCamSource.exe -v=1 -a=1 -cu=x -cp=x -desc=Basement

And, we got an interesting result! Currently when I launch using the batch, both camera descriptions come up as "Living Room", WITH a space. Note that there is no space in LivingRoom in my batch. This leads me to believe it is storing and referencing the descriptions somewhere else. Thoughts?

Thanks,
Ben

bfineman

  • Newbie
  • *
  • Posts: 10
    • View Profile
Re: Command Line Issues
« Reply #9 on: May 02, 2010, 10:59:57 AM »
I solved it. Should've guessed it sooner. I had an ampersand (&) in my password, which was messing everything up. It would parse correctly as far as the ampersand and then act like the rest was a separate command. So when I used the -u and -p arguments, iCam would start up but have the wrong password. When I used the -cu and -cp arguments, they had no effect, and iCam instead pulled the previous session passwords from somewhere, I'm guessing the registry, which made it seem like it was working. Same with the description. After adding quotes around my password everything seems to work. So if there is a bug report to come out of this, it's to modify the documentation to include quotes around passwords (and probably usernames) for command line arguments.

While the above is resolved I'd like to maintain my feature request to enable/disable "push" and "record" from the command line.

Thanks for your help.

Jay

  • Administrator
  • Hero Member
  • *****
  • Posts: 1096
    • View Profile
Re: Command Line Issues
« Reply #10 on: May 03, 2010, 12:59:30 AM »
Yeah, that would do it.  Sorry I didn't think about that possibility earlier.