tag:support.appharbor.com,2010-11-23:/discussions/problems/73609-how-to-run-cmdexe-on-appharbor-so-i-run-command-on-appharborAppHarbor: Discussion 2018-10-19T03:07:13Ztag:support.appharbor.com,2010-11-23:Comment/357353482015-01-09T14:46:11Z2015-01-09T14:46:11ZHow to run cmd.exe on appharbor so I run command on appharbor.<div><p>Hi,</p>
<p>You'd be able to do this with a <code>Procfile</code> and
background workers, but it's currently an undocumented feature in
beta. However, can you tell me a little about what your use case
is? What/why do you need to achieve and can't you just execute the
executable for instance using <code>Process.Start</code>?</p>
<p>Best,<br>
Rune</p></div>runetag:support.appharbor.com,2010-11-23:Comment/357353482015-01-12T09:19:50Z2015-01-12T09:19:50ZHow to run cmd.exe on appharbor so I run command on appharbor.<div><p>Hi,</p>
<p>I trying to archive file in folder for download purpose. To
reduce size of number of files.<br>
Procedure:<br>
1. I am using command prompt to run the command. It would done by
using <code>Process.Start()</code><br>
2. then I add `process.StandardInput.WriteLine("cd ???/B1 Free
Archiver");<br>
it will execute above command to run archiver.</p>
<ol>
<li>Now we run command to convert files in to archive folder with
password.<br></li>
<li>then we exit.</li>
</ol>
<p>My question:<br>
1. If i able to run command prompt (<code>cmd.exe</code>) using
Process.Strat() then let me know how i mention path of my B1 free
archiver <code>.exe</code> that i question mark on 2 procedure
point.<br>
that means on what place my project code is present as
<code>c:/folderName/secondFolderName/</code> like that. so I
mention correct path for my archiver <code>.exe</code><br>
So, I able to do my task</p></div>clarioncloudtag:support.appharbor.com,2010-11-23:Comment/357353482015-01-12T16:14:13Z2015-01-12T16:14:13ZHow to run cmd.exe on appharbor so I run command on appharbor.<div><p>Hi,<br>
In my project I write below code,<br>
`var process = new Process { StartInfo = new
ProcessStartInfo("cmd.exe") { Arguments =
processArguments.ToString(), CreateNoWindow = true,
RedirectStandardError = true, RedirectStandardOutput = true,
UseShellExecute = false, WorkingDirectory =
CurrentDirectory.FullName, }, };</p>
<p>process.Start();<code>so cmd started. when i am in
folder</code>cd c:/B1 Free Archiver`<br>
I am running below command to run b1.exe with passing parameter to
convert files to archive.</p>
<p><code>b1 a destination source</code> process.WaitForExit();</p>
<p>How i accomplish this using <code>Procfile</code> or background
process.<br>
i.e. <code>Worker: b1.exe a destination source</code> so i will run
this through code when i need to run to convert files to
archive.</p></div>clarioncloudtag:support.appharbor.com,2010-11-23:Comment/357353482015-01-12T17:08:35Z2015-01-12T17:08:35ZHow to run cmd.exe on appharbor so I run command on appharbor.<div><p>Hi,</p>
<p>Why do you run <code>cmd.exe</code> rather than just
<code>b1.exe</code> directly in your <code>Process.Start</code>
invokation? Seems like running the command prompt is unnecessary,
and it might lead to less effective error handling and logging.</p>
<p>Best,<br>
Rune</p></div>runetag:support.appharbor.com,2010-11-23:Comment/357353482015-01-13T15:22:16Z2015-01-13T15:22:16ZHow to run cmd.exe on appharbor so I run command on appharbor.<div><p>Hi,</p>
<p>I run b1.exe instead of cmd.exe, it works locally fine. but on
appharbor not, i thing it is not having wirte permission to
folder.<br>
setting =>File system write access=>Enable FSWA i did this
one but don't no it will permit to all folder or not.<br>
Actually we are using Amazon s3 for it but for testing purpose we
trying above one.<br>
also, App_Data have write permission by default so, trying to use
it.</p>
<p>Thanks for you last reply, which give me different
direction.</p></div>clarioncloudtag:support.appharbor.com,2010-11-23:Comment/357353482015-01-14T16:37:59Z2015-01-14T16:37:59ZHow to run cmd.exe on appharbor so I run command on appharbor.<div><p>When you enable filesystem write access it'll just allow you to
write to the application's root directory by default - you can't
write to for instance other system directories. You can still use
the temp directory for your user profile, in case you need to
generate a temporary file.</p>
<p>Sounds like you're on the right path now, but let me know if
there's anything else I can help with.</p>
<p>Best,<br>
Rune</p></div>runetag:support.appharbor.com,2010-11-23:Comment/357353482015-01-21T08:48:06Z2015-01-21T08:48:06ZHow to run cmd.exe on appharbor so I run command on appharbor.<div><p>great, finally its worked.</p>
<p>now i creating archive file to <code>App_Data</code> then i am
writing this archive to Amazon S3 for persistence.</p></div>clarioncloud