How do you launch a C# Console App from a USB device? - c#

I would like to run a console app from a USB drive. I have the project, the installation files, the deployable folder, and the starting .bat files all on the USB drive. The machine has the proper version of .NET to run the project but when the console app gets called the cmd window says "You must install .NET to run this application". Could I be getting this error because the working directory of the batch is on the USB Drive so the search for .NET fails?
Ideally when I click the start .bat (contained on the USB) it calls the executable in the deployable folder (USB) and passes it args which then installs the software (.exe or .msi contained on the USB but INSTALLING to the machine).

Gunr2171 suggested making the console app self contained. Using the docs found here https://learn.microsoft.com/en-us/dotnet/core/deploying/single-file/overview?tabs=vs we successfully published into a single file and it worked wonderfully!

Related

How to build a WPF app so everyone can install and use it

I am entangled in how to work so that after I finish building the wpf app, I can give it to another computer by downloading the app (for example, downloading the .exe file). I also tried it, but when I ran the .exe file, it only showed a popup cmd and then disappeared. Then I have pulish with self-contanied deployment mode. Here is an image of the following files when I published at bin\release:
Path: C:\Users\ASUS\Source\Repos\UserService\WpfApp1\bin\Release\netcoreapp3.0\publish
If I run the .exe file in a folder then run normally. But when I copy it to a deskop and run it is still the same (can't run).
I want to ask how can I help my app to be used by other computers. Thank you mn! Forget more, my app is using .net core 3.0 already.

Run a published console app from win form app

I have a win form application that accept exe file and folder path as argument.
Then a console app is launched. But in my case these console apps are
also published.
When I execute from Debug console app work but when I select
Setup.exe from published app the application installs and then
crash. With argument out of range error.
A related answer can be seen here. But it work with unpublished
exe which I am already doing.
Can I get name of the installed console app something like
"WINWORD.exe" or "Chrome.exe".

VB.NET published windows app doesn't run

TOOLS:
Windows 10 Pro
Visual Studio 2017 Pro
I created a VB.NET windows app GUI on my desktop computer,
published it,
copied the publish\ directory to a new target laptop,
logged into laptop and ran publish > setup.exe
it asked me to "install" and I said YES,
and app started, but hung, never displaying the GUI.
My app has two .DLL's of mine, but they are not in the publish\ directory.
I made a HELLO WORLD on original desktop, published, and it ran ok at laptop.
All of your dlls need to be distributed with your application.
Try manually move your dlls in the same folder of .exe file on target machine: if it works simply rebuild your setup incuding these dlls as dependencies.
The problem is solved. The target laptop needed installation of drivers from a vendor of some 3rd party middleware used in the app.
So, the packaging software wasn't smart enough to tell me the problem, and its error correction response was to just end without any error message.

Webinstaller for C# application

I have created a console installer which does the following things
Downloads zip files from server and extracts it on user system
Copies a folder from the extracted files in maya install directory after searching for its install path from registry
Adds registry entry for another exe file my application is using
Downloads and places that exe from server on user system
Its working perfectly fine but its not user friendly as the user keeps looking at console while app downloads and extracts data on his system.
I looked and found few auto setup installers.
Is clickonce use able for my scenario or should i go for some other or should i create my own gui for the app and add progress bar.
P.S: I am using c#, .net framework 4.5

C# how to Deploying a packed exe with MS clickonce

i am devoloping a C# windows app and i deploying my app with MS Clickonce .
but i have a problem .
iam using a dongle for this app and i am packing my *.exe .
first step ; publish the project and then i am packing the published exe. after than add file ext. name , like this *.exe.deploy
but ;
so , dont work this exe .
have you any solution about this problem ?
If you're modifying any of the published files after publish, you'll have to update your .manifest and .application files. Use mageui.exe (location is in bin folder of Windows SDK you have) to edit those files and remember to sign/save when finished.
If you just want to provide a copy of the app, why don't you just build it and then copy the \bin\Release folder to the external drive?
ClickOnce is really meant to deploy an application from a webserver or network share adn give you the ability to publish incremental changes.
If you want to deploy something using ClickOnce from a USB stick, you have to publish the application to a folder, then copy the package over to the usb drive and have the user run setup.exe.
If you do that, you will want to go to the Manifests tab under the Options dialog and check "exclude deployment provider URL". Then when the user installs, it will set the installation URL as the file path to the files on the usb stick. He will have to install updates the same way.

Categories

Resources