How to include .cat and .inf file in Visual studio 2012 application - c#

I am developing a hmi for a usb device in visual studio 2012 and I want to include usb device drivers in my program installation. I do have .cat and .inf file of the usb device but how should I include them in my hmi installation so that user doesn't have to prompt windows to search for the folders.
thanks in advance for helping me out,
Veeru

I don't know what kind of installation technology you are using; Visual Studio provides both "ClickOnce" and "Setup Projects".
With ClickOnce, I don't think it is possible to install drivers.
With a Setup Project, you will have to make a custom action that calls SetupOEMCopyInf. To make that custom action, you have to compile a Win32 DLL using C or C++.

Related

unable to install or run the application

System Update Required:
Cannot open database connection :
Wrong username and password :
Greetings everyone
I have the following issue with restaurant management system that is programmed in C# connected with Microsoft Access database (2019), the program is work correctly in main developer laptop while we transfer the files to target or other PC or Laptop the program show the above images as windows messages error hopefully anyone have solved the issue before or have suggestion to solve it. let know about it with appreciation and advanced in thanks.
note* even I look for the problem I try to install new framework or Microsoft Access Database Engine 2016 it doesn't work.
Download the required version of log4net dll to the system. And then open Visual studio command prompt. Then run the below command in it.
gacutil -i log4net.dll
You need to install the dll in the GAC.
If by any change there is no gacutil or Visual Studio installed then you can use powershell to install the dll into GAC. You can refer this link for that https://weblogs.asp.net/adweigert/powershell-install-gac-gacutil-for-powershell

Develop applications for Windows Compact

I have an Windows Embedded Compact v8.00 device installed with build 6247. FYI - This device is an Siemens HMI.
Now I'm looking for the right way to develop applications for this version of Windows. I started trying with Visual Studio 2008, so I build a very simple application with just a useless textbox. After copying the executable to the device I start tried to run the test applications but nothing happens.
After searching the web I found out it's better to install Visual Studio 2015 PRO with an application builder from Microsoft's website.
Is this the right way to do? What else does I need to know when developing applications for Windows Compact 2013?
To create applications for Windows Embedded Compact 2013 you need VS2013 or VS2015 professional with the Application Builder plugin and a valid SDK installed on your PC.
If you develop managed apps you also need to check in the .NET runtime is already part of the image or find a way to deploy and install it permanently on your device (the way to do this may change depending on the device configuration, registry type etc.)

Xamarin Studio On Mac - Open SLN and Create Install File

I am trying to make an installer file for mac for my application, and I can't find a way to do this. I am using Xamarin STudio and mono (not monomac), classic windows forms.
So here is what I did:
a)I created in Visual Studio on Windows a hello world app, with a simple window and a button
b)I installed Xamarin Studio in my VMWare mac os X image
c)I open the SLN from windows PC with xamarin studio
Everything is good. The solution opens, if I press run it runs on Mac using mono.
Now my problem. How do I compile and make the setup for Mac Os X so I can distribute my file (not in the store)?
I tried with right click on solution->tools->create package . But i Have no option to make a mac os x file. How can I do that?
***EDIT
I managed to compile and run the software on mac. I use the following code:
export PATH=/Library/Frameworks/Mono.framework/Commands:$PATH
export AS="as -arch i386"
export CC="cc -arch i386 -lobjc -liconv -framework Foundation"
# Build: --static
mkbundle "/VOLUMES/C/Proiecte/TestMono3/TestMono3/bin/Release/TestMono3.exe" --deps -o hello3
When I open hello3, it opens a terminal. Can this be avoided?
Also, if I don't use --static in mkbundle, can I still distribute the software without the user needing to install mono?
Thanks!
Do the following:
Switch your Project to the Release configuration from the Debug one.
In the Build menu, select Archive for Publishing.
The project will be built, archived and displayed in the Archive Explorer.
Select the desired version of the app and click the Sign and Distribute button.
From the Sign and Distribute dialog box, select Mac Installer Package and click the Next button.
Fill in the required Provisioning profile signing information. Note: You will have to have an developer account with Apple to correctly sign an installer, even for apps NOT released on the Mac App Store.
Continue with the rest of the prompts from the Sign and Distribute dialog box to create the installer.
I would suggest reading over the Publishing to the App Store guide as the steps are basically the same for a self-released installer package.

Why won't my program open on Pocket PC?

I am making a program in Visual Studio 2008 for my Pocket PC, but I can't get the program to open. I followed the instructions to create a cab file to install it on the device, but then when I try to click on the program its loads for half a second and then doesn't do anything. The program works fine in the emulator.
Are you really using a Pocket PC device? The Pocket PC terminology was last used in 2003. The platform has been called "Windows Mobile" since then. Not to be confused with "Windows 10 Mobile". Naming is not a strong point for Microsoft in this regard.
You need to use the Pocket PC SDK if you are truly developing for a Pocket PC.
If your application uses MFC then your program will depend on the MFC library to run. The simplest way to solve this problem is to link statically to MFC.
Go to the Project Settings
Go to the "General" tag page.
Search for "Use of MFC" and select "Use MFC in a static library".
Save & Rebuild the project. The size of your EXE is now larger because you have statically linked to MFC.
If your application uses Compact Framework then your program will also depend on the .NET Compact Framework (CF) library to run. The simplest way to solve this problem is to include the CAB file(s) from your Visual Studio folder. Then you can run the CAB file to install .NET Compact Framework.
Navigate to the "C:\Program Files (x86)\Microsoft.NET\SDK\CompactFramework\v2.0\WindowsCE\wce400\armv4" folder.
Copy the "NETCFv2.ppc.armv4.cab" file to your device.
On the device, navigate to the NETCFv2.ppc.armv4.cab file and click on it to install.
You can read this for more information on the subject.

What is the best best way to download and install msi\exe

I need to install drivers to my clients silently.
Now, I have some issues:
I don't want to install them directly from the internet using Process.Start("www.......msi") beacuse it goes really slow. I want first to download them to the computer and then run a winform application to let the client choose which driver to install.
I tried the VS Installation but I couldn't figure out how to download all the "c:\Program Files" and NOT to the "Program files (x86)" in case of a windows with 64 bits.
And I couldn't figure how to launch the winform app after the download complete, using the "custum action" didn't work.
I have different drivers for x86 and for x64, and I need to download to client's computer the drivers that he needs, how can I do that?
I have both msi and exe drivers, how can I install the exe driver silently?
If you know some third-party application I would be greatfull, this could be the best option for me!
Found the answer in Visual Studio 2012 with the InstallShield and some programming work in my code.
Thank you all :)

Categories

Resources