Command line

No more questions - please go to http://www.syncovery.com/forum instead

Moderator: SuperFlexible Administrators

Command line

Postby BaseCamp on Wed Feb 17, 2010 10:54 am

I'm trying to programmatically run the superfilesychronizer.exe via command line through another application. I've set permissions on the folder where the program is installed but I cannot get it to fire. I can run it from a command prompt, but I have issues running it from the program I'm writing.

Any ideas on permissions that need to be set??? I'm struggling.
BaseCamp
 
Posts: 5
Joined: Wed Feb 17, 2010 10:33 am

Re: Command line

Postby superflexible on Wed Feb 17, 2010 1:50 pm

Hello,

I've never heard of a comand line invocation failing due to permissions. What does your command line look like exactly? For example

"C:\Program Files (x86)\SuperFlexibleSynchronizer\SuperFlexibleSynchronizer.exe" /RUNX="Profile Name" /U

See also
http://www.superflexible.com/docprofi.htm
User avatar
superflexible
Site Admin
 
Posts: 2480
Joined: Thu Dec 31, 2009 3:08 pm

Re: Command line

Postby BaseCamp on Wed Feb 17, 2010 2:20 pm

You are correct, it does not seem to be a permission issue. I've got some C# code which is trying to run the superflexiblesynchronizer.exe and pass the appropriate parameters into it to run a specific profile.

I can see the superflexiblesynchronizer.exe start in my Task Manager so I know that it is being accessed. It seems that either the parameters are not being passed or not being interpreted.

In theory this should work:

System.Diagnostics.ProcessStartInfo psi
= new System.Diagnostics.ProcessStartInfo();
psi.WorkingDirectory = @"C:\Program Files\SuperFlexible";
psi.FileName = @"C:\Program Files\SuperFlexible\SuperFlexibleSynchronizer.exe";
psi.Arguments = "/RUNX=SyncTest";
psi.UseShellExecute = false;

using (Process exeProcess = Process.Start(psi))
{
exeProcess.WaitForExit();
}
BaseCamp
 
Posts: 5
Joined: Wed Feb 17, 2010 10:33 am

Re: Command line

Postby superflexible on Wed Feb 17, 2010 2:24 pm

Hi,
I'm releasing the v4.89 update right now and after that I will try this tonight. Haven't used C# in a while so it should be fun!

Cheers,
Tobias
User avatar
superflexible
Site Admin
 
Posts: 2480
Joined: Thu Dec 31, 2009 3:08 pm

Re: Command line

Postby BaseCamp on Wed Feb 17, 2010 2:28 pm

I appreciate the help!
BaseCamp
 
Posts: 5
Joined: Wed Feb 17, 2010 10:33 am

Re: Command line

Postby BaseCamp on Thu Feb 18, 2010 2:05 pm

Any luck?
BaseCamp
 
Posts: 5
Joined: Wed Feb 17, 2010 10:33 am

Re: Command line

Postby superflexible on Thu Feb 18, 2010 2:17 pm

Sorry I will need about 1 more day, have been kept busy with the Mac Promo today (http://www.mupromo.com/). As a temporary solution you could create a .BAT file with the correct command line and invoke that from C#.
User avatar
superflexible
Site Admin
 
Posts: 2480
Joined: Thu Dec 31, 2009 3:08 pm

Re: Command line

Postby BaseCamp on Thu Feb 18, 2010 4:50 pm

Tried it.. it was my first course of action but ran into the same problems.
BaseCamp
 
Posts: 5
Joined: Wed Feb 17, 2010 10:33 am

Re: Command line

Postby superflexible on Fri Feb 19, 2010 4:30 pm

I think it is important to first try it from a batch file and try it by double-clicking it in Windows Explorer. As long as that doesn't work, you command line is wrong or the profile you're trying to invoke doesn't exist. Please confirm if your batch file works when launched manually.
User avatar
superflexible
Site Admin
 
Posts: 2480
Joined: Thu Dec 31, 2009 3:08 pm


Return to Windows Support * new forum: www.syncovery.com/forum