|
Richard Andrew x64 wrote: If you don't want to use InstallUtil,
It's not a matter of "want"... My customers are going to pay for & download this app. Their not going to want to run a DOS command line utility to install something.
Next, I don't understand the two inks you posted.. Is there not way to create a Setup.Exe with a VS Setup Project?
If it's not broken, fix it until it is
|
|
|
|
|
Kevin Marois wrote: It's not a matter of "want"... Geez, take it easy.
I don't believe the VS setup project provides a way to install services. However, if the VS project supports custom actions, you could use a custom action to run the InstallUtil and your users would not have to run any separate utility.
The difficult we do right away...
...the impossible takes slightly longer.
|
|
|
|
|
Kevin Marois wrote: Their not going to want to run a DOS command line utility to install something
You're note getting it. It's the custom action in your installer that execute the commands, not your user.
Upgrade to a better installation creation application and chances are good you won't even need the InstallUtil because that functionality would be built into the installer.
|
|
|
|
|
Dave Kreskowiak wrote: Upgrade to a better installation creation application
Can you please elaborate on what this means?
Thanks
If it's not broken, fix it until it is
|
|
|
|
|
I think he means that if you want your installer to jump through hoops, you should invest time and/or money in a decent install authoring tool.
There are quite a few available on the interwebs.
The difficult we do right away...
...the impossible takes slightly longer.
|
|
|
|
|
Yep.
The Visual Studio Setup and Deployment project doesn't even exist any more. Get used to using a 3rd party tool to build your installers. There's a ton of tools out there.
|
|
|
|
|
Dave Kreskowiak wrote: The Visual Studio Setup and Deployment project doesn't even exist any more.
Yes it does. I'm using in in VS2013 on other applications.
With this whole thread I've been operating on the assumption that it's possible to build a Setup.exe that will install a Windows Service.
Am I wrong here?
If it's not broken, fix it until it is
|
|
|
|
|
Assuming you've added the necessary service and project installer classes to your service project, you should be able to select "Installer Class" from the properties of the service executable:
How do i create an InstallShield LE project to install a windows service?[^]
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Kevin Marois wrote: Yes it does. I'm using in in VS2013 on other applications.
Actually, the Setup and Deployment PROJECT was removed in VS 2012 and replaced with InstallShield Limited Edition. The heading of "Setup and Deployment" project TYPES is still in the "New Project" dialog.
Kevin Marois wrote: With this whole thread I've been operating on the assumption that it's possible to build a Setup.exe that will install a Windows Service.
Sure, if you felt you needed to go through all the extra work of writing it yourself. There is no built-in template to scaffold out a Setup.exe project for you to modify.
|
|
|
|
|
Dave Kreskowiak wrote: Actually, the Setup and Deployment PROJECT was removed in VS 2012
Ya, in 2012 it was removed. For 2013 there's an extension[^] that adds it back in.
Dave Kreskowiak wrote: Sure, if you felt you needed to go through all the extra work of writing it yourself
I'm clearly confused, because a Setup project is stupid simple to create. With a Win app you simply select the output from the Win project, set a few properties for display in the wizard, and voila! A simple setup is Click, click, click done - installed. Are you saying it's not possible to do this with a standard installer?
I followed a number of articles about "Windows Service Installer", and they all lead to running a DOS command, which is what confuses me. People who pay for and download my product are not going to run a DOS command to install anything.
InstallUtil if great - IF you have VS on that machine.
I'm not getting HOW the service gets installed on my customer's PC.
If it's not broken, fix it until it is
|
|
|
|
|
Kevin Marois wrote: Ya, in 2012 it was removed. For 2013 there's an extension[^] that adds it back in.
Hmmm, never knew that. It's a simplistic project that doesn't support much beyond a simple installation without a bunch of customization. Frankly, it's a waste as other products do the job far better and easier.
A Windows Service is not really a "standard project" as far as an installer is concerned. It's got extra work that needs to be done to setup and register the service beyond what you'd do in a "throw down executable files and a shortcut" application install.
Kevin Marois wrote: I followed a number of articles about "Windows Service Installer", and they all lead to running a DOS command, which is what confuses me. People who pay for and download my product are not going to run a DOS command to install anything.
InstallUtil if great - IF you have VS on that machine.
And THIS is why you don't use the Setup and Deployment project. You use a product that does this stuff for you! InstallShield is just one of many authoring tools that does all the installation work out-of-the-box. Well, at least the full version does. I don't know about the LE version. Other products are the same way. You don't have to add InstallUtil to your installer or write the code to execute it in a custom action in the installer. It's all done for you.
If you want to use the Setup and Deployment project, you have to add the InstallUtil.exe to your installation files. Then you have to write a custom action to execute the command lines to run InstallUtil with the appropriate command line options.
|
|
|
|
|
OK, I see. Looks like I have more reading to do on this.
Thanks.
If it's not broken, fix it until it is
|
|
|
|
|
|
Thanks
If it's not broken, fix it until it is
|
|
|
|
|
If I were you, I would look to use something like Wix#[^] to develop your installer. It has first class support (and examples) for installing services.
|
|
|
|
|
Thank you, I'll check it out
If it's not broken, fix it until it is
|
|
|
|
|
Hi
Student student = context.Students.Find(1);
student.StudentName = "Anele";
var success = context.Entry(student).State == EntityState.Modified ? context.SaveChanges() : 0;
DbEntry checks the state of the entity. Now is it legal to check if the entity state has changed before saving the changes to the database or its just no necessary?
Or maybe where exactly can I use the
Entry in real world solutions?
Act as though it were impossible to fail
|
|
|
|
|
In a real world solution? You'd just set the entity state to Modified and SaveChanges. Since you KNOW you modified the entry, why would check to see if it's state changed?
|
|
|
|
|
I have made a context menu switch and a treeview! The context menu role is to delete the node on right click (from the delete button in menu of course) but the problem is that selectednode.text is always null! I want to get the text of the selected node and search in database to delete it from database! Here is the code
Treeview
<asp:TreeView runat="Server" ExpandImageUrl="~/images/database.png" CollapseImageUrl="~/images/database.png" OnTreeNodePopulate="Node_Populate" ID="tvwauthors" >
<Nodes>
<asp:TreeNode Text="Existing Database" PopulateOnDemand="true" Value="0" />
</asp:TreeView>
</div>
Context menu
<script type="text/javascript">
var $b = jQuery.noConflict(true);
$b(document).ready(function () {
$b('#tvwauthors').vscontext({ menuBlock: 'vs-context-menu' });
});
</script>
<ul>
<li class="delete">
<span onclick="return confirm('Are you sure to delete?')">
<asp:Button Text="Delete" runat="server" CausesValidation="false"
OnClick="delete" style="width:70px;height:32px" /></span>
</li>
event in aspx.cs file
protected void delete(object sender, EventArgs e)
{
string nodeVal = tvwauthors.SelectedNode.Text;
}
I'm aware that I should use TreeViewEventArgs but I'm calling the delete function from context menu so it's giving me system.handler error. I'm new to c# so kindly help me
|
|
|
|
|
|
At the point of the exception the value of i is not valid for your array labels , probably it's too high. Place a debug-breakpoint on the line of the for-loop, run your program in debug mode, step through the iterations of the for-loop and you will recognize what's going wrong.
edit: spelling
modified 28-Mar-15 14:52pm.
|
|
|
|
|
Hej, the Array litere is zero based, so that the index must always be smaller that the length. But your for loop starts at 0 and ends at the length:
for (int i = 0; i <= litere.Length; i++)
So instead of using <= you must use < .
|
|
|
|
|
Hello Everyone,
I want to create PPPoE Connection.
I do this code but it doesn't work and i use the library DotRas ();
When I run the code the error appear in the line:
(RasEntry entry = RasEntry.CreateBroadbandEntry("osama",RasDevice.GetDeviceByName("(PPPoE Osama)",RasDeviceType.PPPoE)); )
and the error is: Value cannot be null.Parameter name: device
The is the Code...
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using DotRas;
namespace WindowsFormsApplication2
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
string path;
path = RasPhoneBook.GetPhoneBookPath(RasPhoneBookType.User);
using (RasPhoneBook pbk = new RasPhoneBook())
{
pbk.Open(path);
RasEntry entry = RasEntry.CreateBroadbandEntry("osama",RasDevice.GetDeviceByName("(PPPoE Osama)",RasDeviceType.PPPoE));
pbk.Entries.Add(entry);
}
using (RasDialer dialer = new RasDialer())
{
dialer.EntryName = "Your Entry";
dialer.PhoneBookPath = path;
dialer.Credentials = new System.Net.NetworkCredential("User", "Password");
dialer.Dial();
}
}
}
}
If there is another way please tell me how.
-*-*-*-*-*-*-*-*-*
To Be Or Not To Be
(KARFER)
-*-*-*-*-*-*-*-*-*
modified 28-Mar-15 10:19am.
|
|
|
|
|
Hi, any one know how to implement Mobile agent in C#?? Am using Mobile agent to collect the data from sensor nodes.
Thanks
|
|
|
|
|
You already posted this question below; please post once only.
|
|
|
|