[dba-VB] CopyAndRun

jwcolby jwcolby at colbyconsulting.com
Wed Jan 25 18:00:15 CST 2012


 > Since I'm just learning C#, this might be a stupid question, but where are you defining 
pDestFileSpec? It doesn't seem to be passed in.

It is a property of the class which is initialized in the constructor.  The constructor is passed a 
recordset item, which reads properties from the table, things like source filespec, destination 
address, IsExecutable, AllowMultiple etc.

John W. Colby
Colby Consulting

Reality is what refuses to go away
when you do not believe in it

On 1/25/2012 5:14 PM, Arthur Fuller wrote:
> Since I'm just learning C#, this might be a stupid question, but where are
> you defining pDestFileSpec? It doesn't seem to be passed in.
>
> On Wed, Jan 25, 2012 at 2:48 PM, jwcolby<jwcolby at colbyconsulting.com>wrote:
>
>> You might remember my discussing a C# program I am writing which I call
>> CopyAndRun (C&R).  It basically is a table driven method of copying one or
>> more files from the network to the user's workstation and then executing
>> the (access) application.  I use it for creating a directory and copying my
>> libs and access apps to the user's local c: drive.
>>
>> I use the following code to actually open the file:
>>
>>         public void mExecuteFile()
>>         {
>>             //http://stackoverflow.com/**questions/5831844/tracking-**
>> multiple-processes-at-same-**time<http://stackoverflow.com/questions/5831844/tracking-multiple-processes-at-same-time>
>>             try
>>             {
>>                 System.Diagnostics.Process myProcess = new Process();
>>                 myProcess.StartInfo.FileName = pDestFileSpec;
>>                 myProcess.StartInfo.**UseShellExecute = true;
>>                 Process.Start(pDestFileSpec);
>>             }
>>             catch (Exception)
>>             {
>>                 throw;
>>             }
>>         }
>> --
>
> Arthur
> Cell: 647.710.1314
>
> Prediction is difficult, especially of the future.
>    -- Niels Bohr
> _______________________________________________
> dba-VB mailing list
> dba-VB at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/dba-vb
> http://www.databaseadvisors.com
>
>



More information about the dba-VB mailing list