|
|
How to perform custom action to register windows service?
Apart from installutil.exe are there any installers in VS?
Otherwise do I need to add installutil.exe to setup project and create custom action? installutil.exe myservice.exe
It reports that source is under windows source code rights
Чесноков
|
|
|
|
|
Chesnokov Yuriy wrote: How to perform custom action to register windows service?
What custom action do you want to perform ?
Chesnokov Yuriy wrote: Apart from installutil.exe are there any installers in VS?
After creating Windows Service, you need to add one Installer to install successfuly.
Have a look into it for your reference,
http://www.developerfusion.com/article/3441/creating-a-windows-service-in-vbnet/3/[^]
Abhijit Jana | Codeproject MVP
Web Site : abhijitjana.net
Don't forget to click "Good Answer" on the post(s) that helped you.
|
|
|
|
|
Chesnokov Yuriy wrote: Otherwise do I need to add installutil.exe to setup project and create custom action?
You don't have to supply installutil.exe . You can create a setup project and follow the below steps.
- Add primary output of windows service project to application folder. This will create the windows services executable file in the application directory.
- Take custom action and add primary output of windows service to install and commit folders.
This will register the service when setup is executed.
Best wishes,
Navaneeth
|
|
|
|
|
You can also have the service register itself by running the resulting executable...
.45 ACP - because shooting twice is just silly ----- "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "The staggering layers of obscenity in your statement make it a work of art on so many levels." - J. Jystad, 2001
|
|
|
|
|
You mean just executing the windows service executable will register it? I doubt that. I believe windows service should be installed using installutil and can't be registered by just invoking the exe.
Best wishes,
Navaneeth
|
|
|
|
|
I already created setup project before.
It installs the service application but it does not get registered as with installutil.exe. That is why I'm thinking of adding installutil.exe to setup project.
Though I created setup project not from service solution, but as a stand alone project. I added service exe to application folder. Then compiled setup.
What is 2. ?
I can install service with installutil.exe manualy, but setup project does not register it.
Чесноков
|
|
|
|
|
What do you meant by not registered? You can't see that in the services window? When you do with custom actions as said, setup will take care about installing the service. You don't need explicit use of installutil.
Best wishes,
Navaneeth
|
|
|
|
|
yes, it does not appear in services window, thus you can not start it from your application programatically.
what custom actions do I need to add to setup?
in setup program I only add service application exe. that setups the service in windows programs, but it did not get registered.
in MSDN help it says to add custom action to setup, but what is the action? installutil.exe myservice.exe?
Чесноков
|
|
|
|
|
This[^] article describes how to avoid using InstallUtil.
|
|
|
|
|
I have to practice for my final exam and they give me this and I'm struggling, can someone help?
Web Service:
The web service must expose two methods which will each multiply or add two integers.
The methods must return an integer value, specifying the result. Call methods "Multiply" and "add"
for example, when passing the integer 3 and 8 to Multiply method, it should return 24.
Client:
A console client that let the user input an integer.
The user must also specify whether to multiply or add. Then using the algorithm described below, process the number by calling
the Web service methods to obtain a result.
Example-
input = 5
if user choose to multiply, the following should be performed:
5 x 4 x 3 x 2 x 1
the result is
120
if the user choose to add, the following should be performed:
5 + 4 + 3 + 2 + 1
the result is
15
A loop in the main program should be used, and each iteration the appropriate Web method should be called.
I Know I must use a bubble sort, but I have no clue to implement it....
|
|
|
|
|
Brink Fourie wrote: I Know I must use a bubble sort
Why? What on earth are you going to sort?
No trees were harmed in the sending of this message; however, a significant number of electrons were slightly inconvenienced.
This message is made of fully recyclable Zeros and Ones
"Rumour has it that if you play Microsoft CDs backwards you will hear Satanic messages.Worse still, is that if you play them forwards they will install Windows"
|
|
|
|
|
the output for the console?
|
|
|
|
|
Brink Fourie wrote: the output for the console?
That I've got to see! "For security, all console output has been sorted into alphabetical order..."
Brink Fourie wrote: Web Service:
The web service must expose two methods which will each multiply or add two integers.
The methods must return an integer value, specifying the result. Call methods "Multiply" and "add"
for example, when passing the integer 3 and 8 to Multiply method, it should return 24.?
so, the strucure is easy:
public int Add(int p1, int p2)
{
return p1 + p2;
}
and the same for multiply - but you knew that or it wouldn't be a final exam...
Brink Fourie wrote: Client:
A console client that let the user input an integer.
The user must also specify whether to multiply or add. Then using the algorithm described below, process the number by calling
the Web service methods to obtain a result.
Example-
input = 5
if user choose to multiply, the following should be performed:
5 x 4 x 3 x 2 x 1
the result is
120
if the user choose to add, the following should be performed:
5 + 4 + 3 + 2 + 1
the result is
15?
A loop in the main program should be used, and each iteration the appropriate Web method should be called.
So the progam logic is along the lines of:
1) read in a number
2) decide wether to add or multiply (assume Add for this example)
3) set temporary variable "result" to zero.
4) loop while input greater than zero.
5) each time round the loop, add input to result, and then reduce input by one.
6) print result.
What's the bit you are having problems with?
No trees were harmed in the sending of this message; however, a significant number of electrons were slightly inconvenienced.
This message is made of fully recyclable Zeros and Ones
"Rumour has it that if you play Microsoft CDs backwards you will hear Satanic messages.Worse still, is that if you play them forwards they will install Windows"
|
|
|
|
|
I really appreciate that you are helping, but its not necessary to mock me , my instructor told me I must use a bubble sort.
I didn't understand why because it didn't make sense... I am still new at programming but take it very seriously.
The logic you just gave me is great thanks, just needed the idea.
what do you mean "reduce the input by one"?
|
|
|
|
|
I'm sorry, I wasn't mocking you. I assumed it was a mistake on your part in the original post and the made a joke of it. Please accept my apologies if I caused any offence.
I don't see where a bubble sort would be used here: I suggest you ask your tutor for clarification if you can.
Brink Fourie wrote: what do you mean "reduce the input by one"?
Because you will be going round a loop checking each time that you haven't got to the end ("while input greater than zero") you need to reduce the loop count (and the number you are adding or multiplying) each time. Otherwise you will never get out of the loop!
"input--" or "input -= 1" or "input = input - 1" all work for me!
My word! it's a lot less typing to implement the program than it is to describe it like this!
You may want to fine tune the logic to give sensible results for negative inputs...
No trees were harmed in the sending of this message; however, a significant number of electrons were slightly inconvenienced.
This message is made of fully recyclable Zeros and Ones
"Rumour has it that if you play Microsoft CDs backwards you will hear Satanic messages.Worse still, is that if you play them forwards they will install Windows"
|
|
|
|
|
hahaha no it's fine just a communication fault then.
Thank for your help! I really do appreceate it!
AND it makes sense now without a bubble sort!!! hahahahaha
|
|
|
|
|
hahaha no it's fine just a communication fault then.
Thank for your help! I really do appreciate it!
AND it makes sense now without a bubble sort!!! hahahahaha
|
|
|
|
|
Hello,
I'm working on Windows application c#
i have form1 which contain data gridview to view the content of table from sql database.
i've enabled edit, delete in the gridview, and then i've added two queries one for update and the other for delete through MyDataSet1.xsd page.
now after updating and/or deleting any record i wanna click on a button to confirm user that the operation done. but i don't know how to save updating or deleting!!
any help guys?
|
|
|
|
|
You can use DataSet by these step
1) Fill the table in DataSet from SqlDataAdapter.
2) Assign DataSource to dataSet. DefaultViewManager
E.g: dgv.DataSource = ds.DefaultViewManager
3) GetChanges
DataSet dsMyChanges = ds.GetChanges();
-Binh
|
|
|
|
|
could you please give me an example? coz i didn't get the idea
|
|
|
|
|
I don't have time to write full example to you. I extracted some code in my project. Hope that you can get my point. If you have questions, add my skype nick: binh_vu54321
1) Fill the table in DataSet from SqlDataAdapter.
private DataTable dtGetMPNs = new DataTable();
private DataSet dsGetMPNs = new DataSet();
if(dsGetMPNs.Tables.Contains("GetMPNs"))
dsGetMPNs.Tables["GetMPNs"].Clear();
daGetMPNs.Fill(dsGetMPNs,"GetMPNs");
2) Assign DataSource to dataSet. DefaultViewManager
dgvMPNs.DataSource = dsGetMPNs.DefaultViewManager;
dgvMPNs.DataSource = dsGetMPNs.Tables["GetMPNs"];
3) GetChanges
In Save change functions
DataSet dsMyChanges = dsGetMPNs.GetChanges();
if (dsMyChanges != null)
{
for (int i = 0; i < dsMyChanges.Tables["GetMPNs"].Rows.Count; i++)
{
}
}
|
|
|
|
|
Hi..
i have to draw three types of lines
- Constant Line
- Linear Line
- Quadratic Line.
Whats the difference between these three types of line.
i have draw the simple line by doing this.
OnPaint()<br />
{<br />
Graphics g;<br />
g = this.CreateGraphics();<br />
g.DrawLine(Pens.Red, 10,10,30,30);<br />
}
If sumone know plz reply..
|
|
|
|
|
I just spent ages working this out: GOOGLE.
Try typing "Constant line" into the search box - oh, look, "constant line graph" could that be one?
Then try "Linear line" - my, it's clever this, "linear line grapH" is a sugestion!
Perhaps "Quadratic line" - WOW! That was soooooo difficult!
No trees were harmed in the sending of this message; however, a significant number of electrons were slightly inconvenienced.
This message is made of fully recyclable Zeros and Ones
"Rumour has it that if you play Microsoft CDs backwards you will hear Satanic messages.Worse still, is that if you play them forwards they will install Windows"
|
|
|
|
|
I think they're not three kinds of lines. They are three expression for graph. Constant line is a point , linear line is a straight line, and quadratic line is a parabol.
|
|
|
|