How to package stand alone exe inside Visual Studio Installer maker? - visual-studio

Im currently using Visual Studio Installer to package my dll program. How to include stand alone executable program inside my installer project? Since my dll is using the exe(s) in order to run.
Note: For my development platform, I already have the exe(s) inside my c:\ directory. So I would like my installer to also copy the exe(s) to c: drive of other user's platform when they run my installer.

Add the required exe during making the installer to the Application Folder.
Then change all the path that points to those required exe(s) so that it points to the exe(s) in the Application Folder. Shown below:
Instead of "C:\directory\file.exe" to Application.StartupPath & "\file.exe"
Application.StartupPath returns the path of the executable file that started the application.
So if you app is installed in "C:\Program Files\MyApp\program.exe" this would return "C:\Program Files\MyApp"
I hope this helps.

Related

Cannot create Multi-Device Hybrid App project

I've installed the Multi-Device Hybrid Apps for Visual Studio 2013 CTP 2.0, however I can not create a project, as I get the following message:
This project cannot be created because Node.js could not be found.
I already had Node.js installed under C:\Program Files (x86)\nodejs\node.exe before I installed this extension.
Where can I set the path so that this extensions finds Node.js? I cannot see anything under Tools -> Options -> Multi-Device Hybrid Apps.
EDIT:
C:\Program Files (x86)\nodejs is in my System Path variable.
I'm running Visual Studio 2013 as Administrator.
Fixed. The solution to this problem was to un-install Nodejs, then re-run the Multi-Device Hybrid Apps extension installation.
Wayne,
Could you check if your node install folder is in your system Path? If not, please add C:\Program Files (x86)\nodejs\ to the path and try creating your project again.
We add the node folder to your path when you install node through our installer. Since you already had node installed, did you uncheck the "Joyent Node.js" option while installing our tools? This might have led to the folder not being added to the path.
Let us know if that unblocks you.
EDIT
A couple more things
In the registry HKCU\Software\Node.js, there should be a registry value "InstallPath". Could you check if that value exists and points to an existing folder on disk and that the folder contains Node.exe?
Does the nodejs folder under program files contain the node.exe file?
Thanks!
-Avani

environment variable .. why is that?

I'm using Visual Studio 2010 and I want to code with DLL files.
I adjusted the system environment Path, like C:~~, but execute file can't find DLL files. So I moved the DLL files to c:windows\system32. Then I can use it.
Why can't that find DLL files? I want to know how the computer loads DLL files by using the system environment path.
My path setting is:
%OPENCV_DIR%\bin
(there are DLL files in bin folder)
(OPENCV_DIR = C:\opencv\build\x86\vc10)
and i'm testing Opencv

Visual Studio 2010 can't see /bin library of OpenCV

I'm trying to use OpenCv 2.2 in Visual Studio 2010.
I've configured everything by instruction:
http://opencv.willowgarage.com/wiki/VisualC%2B%2B
and by instruction from the book:
So I've added all /lib and /include paths.
When I build project, it compiles and before starting app, VS displays an error message that opencv_core220d.dll is missing.
This file is in C:/OpenCV2.2/bin as all .dll files. If I add this file to my working directory - it will be fine. Then VS displays error about every .dll file that I added in Linker-Input configuration ( but with .lib extension ).
So, if I add all .dlls file that I've added as .lib in Linker configuration - to my working directory, project will start.
But why? Why VC doesn't see OpenCV2.2/bin folder? Where is this pointed?
Because it doesn't know to look there by default. However, it does know to check the current directory for the DLLs.
You can tell it where to look by adding C:/OpenCV2.2/bin to your Path variable, or if you would rather not muck up your global Path you can set the Environment variable local to the C++ project.
I think that is the syntax for appending to the Path in VS2010, but I'm not sure, so Google it if that doesn't work :)

Program Files (x86) problem

I have an installer package, at the last step user can select launch application or not. the installed application is 32bit, during the installation we select the installation folder to "c:\Program Files", while it will always install application to "c:\Program Files(x86)" folder, then we meet problem, we can not launch the application, we have tested that if we choose the default installation folder(which means c:\program files") it works well. so I guess the problem is that windows launch 32bit application as 64bit, so it failed. how to solve it?
Your installer should know the path the application was installed to. You should use it, your EXE file key; for a WiX example see Well Done section of the tutorial.
If your installer package is MSI-based, then the installer is a 64 bit process, and it sees both Program Files (x86) and Program Files. I think it is the problem why you can't start your program. (A 32 bit executable will see only Program Files (x86) under the name of Program Files).

Cannot add folders and files to Windows Installer package

I' m using Visual Studio to create windows installer package, i can't add the folders and data files needed for the application. I create the folders needed for the application in the 'application folder'(under 'File System on Target Machine'), then add files into the appropriate folders, and when i install the application and go to the installation folder there are no folders...there is only the application exe file, hm...
Ooops, i forgot to put the files in the folders actually, that was the problem, so if the folder is empty it is not created in the installer package.

Resources