I have a process that is going to run as Windows Service.
I have successfully installed it as Windows Service and everything works.
My question is what are the guide lines for process directory.
On the machine Im going to deploy it, does the setup need to copy the .exe to Windows/System32 and then install as service ? Or i can deploy it to C:\MyApp\MyApp.exe and install as service from there.
It is not required for the .exe to be in /Windows/System32/ but is it "Best practice" ?
No. You shouldn't install anything to the Windows System folder. That's for operating system code.
You should install to your own application folder within the Program Files folder, and register as a Windows service thereafter.
Related
I have an application written in C# using VisualStudio 2015 and I want to publish it (eg give an exe or installer to somebody to use it on its PC). From VisualStudio there is possibility to click "publish" in solution explorer. The result files are:
-Application files (File folder)
-project.application (Application manifest)
-setup.exe (Application)
As far as I know "manifest" file should be some metadata, but I can execute that file and it gives me an installer (the same as setup.exe). After installing it runs an application (just like setup.exe). It makes me confused - what exactly project.application is? Can I delete it and use only setup.exe? What is the correct way of publishing an app? One last thing: why does the installer run installation on first execution and run an application on any other? I would expect to run installation any time (just like other software).
Thanks
It sounds like a ClickOnce application. See the following link for more information:
ClickOnce security and deployment
In a nutshell:
The installer copies the files to the users AppData and then runs the application.
There are also other options such as checking for updates from a network location or web address. Then when you run the application it checks for updates and uses the manifest to do an incremental update of the application files.
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.
I have a windows service project in Visual Studio that I inherited from another developer, and I'm struggling to deploy the service to our server.
Is it possible to copy the build files from the Release folder to the server, and then run installutil on the exe?
I've tried it, and although the service install successfully, I'm getting an error 1053 when I start the service that
The service did not respond to the start or control request in a
timely fashion
Or is a setup project the only way to go?
If you just want to install a service some way other than an install utility, you can copy the output of the release folder of a windows service project to a directory and register the service using a Powershell command.
At the moment I have a Windows Service and App (Desktop Tray Win Form App with Stop/Start buttons to stop the service and a PING to check the 3rd party API it uses it working and obtain the current balance - It's a Betfair Betting app)
At the moment I am running this off my Win 7 64 bit Desktop but we are moving to a dedicated server Win 2012.
Both the Win Service/Form are in the same project and they reference a DLL which I made that has all the code inside (connects to the DB, 3rd party Betfair API, gets runner/winner info, renews session info etc).
The Windows Server does NOT have Visual Studio on it.
Can I just copy my DLL up to the server, put it in Windows/System32 and Regsvr register it and then copy the .EXE for my Form and Service up to the server?
Also without having the VS Toolset to register a Win Service on a machine what commands do I need to run to install the Windows Service on the Server.
These are 2 distinct solutions, one with the DLL code, one with the Service Project and Win Form Project.
I just want to know the best/quickest/easiest/proper way of getting it to work on the new server without having VS on it to register the service.
Can I just copy the code up to a folder (should it go in a specific folder on the server - the log files are piped out into it's own sub folder of /programdata) and run installutil [PATH TO EXE] to install the Service or is there something more I need to do.
As there are two solutions I can't (or don't know how to) create a deployment package with all the right links and references in across solutions.
However should it be more complicated than..
-Copy DLL to System32
-Regsvr my DLL
-Build the service/win form project on my computer then copy the .EXEs up somewhere
-Run installutil [PATH TO EXE] to register the service
-Double click the windows form to open it (should auto start on reboot and sit in desktop tray)
All in .NET 4.5, Was built in vs 2012, 64 bit, C#
Thanks for any help in advance
Creating a deployment package is the better option, but, because it's not a option for you, the regsvr32 and installutil option should do the job.
Hope it helps!
We are developing C# 4.0 windows based application using visual studio 2010. Now we want to make an installable version of the exe using clickonce to deploy our application. I am new to .NET platform. So, please give me a step by step procedure to use clickonce to deploy my application.
While following steps :What should i need to given in Installation Folder URL Box(2 nd text Box):
Here is the break down of the two paths in this wizard
Publish Folder - Where should the Publish process put the ClickOnce deployment package
Installation Folder - Where will users of the application go to install the application from
Often times these are the same location. For example when I deploy ClickOnce applications internally I publish to a network share. This is the same place where users go to install the application.
One scenario where they would be different is when the users install from a web location. In that scenario you'd often have a publish folder which was a network share or path on the local computer while the installation folder was a web site URL