3
Answers

SetUp & Deployment

san

san

16y
3.2k
1
I`m doing a SetUp & Deployment project. I`m using Custom Actions Editor to create a file and place it in the Installation Directory, this code is in a class file. When I add the output of this I want the file to be created and instead the .exe file is being placed in the Installation directory. What do I have to do to to send the output of the .exe file and not the .exe itself into the installation directory. What am I missing?


Answers (3)
0
san

san

NA 19 0 16y
Here is the Code,

This goes as the primary output to the SetUp Project in the Install Node. This code calls Some.exe, I know this works because when I run EmptyProject.exe directly, it calls Some.exe without any problems. Only when I try to install the main application, I`m getting an exception.

These are the options i`m using InstallerClass - False [I`ve tried with True]
                                                    Argument  - [TARGETDIR] - [I`ve tried this being blank too]

Any idea of whats going wrong?

using System;
using System.Windows.Forms;
using System.Diagnostics;

namespace EmptyProject
{

    public class ClassEP
    {
        public static void Main(string[] args)
       

                ProcessStartInfo psi = new ProcessStartInfo();
                psi.FileName = "Some.exe";
                psi.WorkingDirectory = String.Join(" ",args);
                Process.Start(psi);
   
        }
    }
}
0
san

san

NA 19 0 16y
Snehal,
I doing primary output. But only the exe is being created and sent to the application folder and its not being executed.
Best,
San
0
snehal m

snehal m

NA 28 36.8k 16y
instead of adding files, u can add project output< primary output then the file get added instead of exe