|
You can search CP (search box near the top of the page). I know there are a few good articles.
Alex Korchemniy
|
|
|
|
|
I have created a windows installer i VS.NET 2003 to install my application. The application consists of a windows service, a small winforms application and some dll's. The application installs and runs fine but only when I have hardcoded a path I have in a settings file.
What I want to do is get the folder where I install the application and write that to the file when I install the application. Because that is what I want, the default path for this setting should be the folder where the application is installed. So is there any way to get that folder during the installation? I have tried using the Installer class but they alone doesnt seem to be enough. The only folder I can get from there is C:\windows\system32 which happens to be the current folder in the Installer class.
|
|
|
|
|
Check out the MsiGetProductInfo[^] function in the msi.dll .
The INSTALLPROPERTY_INSTALLLOCATION property returnes the installation path.
Sorry that I do not have any samples on how to do it in .NET and C#.
But it should be fairly straight forward using pInvoke.
/cadi
24 hours is not enough
|
|
|
|
|
You could create a class library for the custom action of writing the installation path into your config file.
Inside your InstallerClass you can use reflection to get the location the custom action is executed from (Assembly.GetExecutingAssembly().Location ). This usually would be in the directory your service has been installed to.
Regards,
mav
|
|
|
|
|
I managed to find a solution. I had a custom action in the installation to handle the Installer classes I had in my projects and there is a propery for a custom action called CustomActionData there. By setting the value of that parameter to /installdir="[TARGETDIR]\" I could get the installation directory in my Installer class with this code: this.Context.Parameters["installdir"] . And that was all I needed. Took a while to find all parts of this solution and puzzle it together. I found one part of this solution at a time. Nowhere was it explained all the way.
Thanks everybody for trying to help me!
|
|
|
|
|
sorry im new at this....can someone tell me how to combine two button image.... so i will get a onmouseup and down effect?
|
|
|
|
|
Please clearify. Are you trying to create a two state image button?
If so... you just need to write a simple custom control that override OnPaint and paint accordingly.
Alex Korchemniy
|
|
|
|
|
I would like to ask how can I print the windows form by C#? the print screen method doesnt work as the form to be printed may be masked by other applications
|
|
|
|
|
after u print screen u go to paint and paste......from there u can delete the sides by dragging it to make it smaller
|
|
|
|
|
Perhaps, this[^] little tidbit on MSDN may help...
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
The WM_PRINT message is sent to a window to request that it draw itself in the
specified device context.
Alex Korchemniy
|
|
|
|
|
does anybody knows how to get XP key using c#?
|
|
|
|
|
It may be in the registry. Why do you want it ?
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Try using regmon that should revel where the key is hiding ?Then use csharp to access the registry and get the key.
What are u going to do next seems useless to me to get the product key ???Anyway u have ur reason probably
|
|
|
|
|
Trance Junkie wrote:
What are u going to do next seems useless to me to get the product key ???
Seems useless to me too, the guy who asked this question didn't get an email because you repsonded to me instead of him.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
I have about 200 workstations and I need to reenforce the license policy so I need a simple utility that I can create to verify uniqueness of the Key.
|
|
|
|
|
Do you not have a pile of 200 CD's then ?
According to google, it's not stored as clear text in the registry.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
When you right-click on a file, you get the version tab properties. How to include this information when you comple a C# application?
thanX
|
|
|
|
|
You change it in the AssemblyInfo.cs file automatically generated when you create a new project. All those assembly attributes.
-- LuisR
Luis Alonso Ramos
Intelectix - Chihuahua, Mexico
Not much here: My CP Blog!
|
|
|
|
|
Hi All
Export to excel data from ultrawebgrid rows, Each data row contain one worksheet in excel sheet like as
row1 data contain sheet1
row2 data contain sheet2
row3 data contain sheet3
this opertaion getting at a time on pressing one button.
we have pressing one button ultrawebgrid rows data to export excel sheet, In excel sheet each worksheet contain one grid row deatails,
for example grid have 10 rows ,pressing any button,
In excel sheet 10 worksheets will occure and each worksheet contain 1 row data of grid pls send me a solution for this example
sunny
|
|
|
|
|
Suppose I have two custom classes, class A and class B. What I want to do is access the propeties and methods of class B from Class A using index notation e.g. A[index].B_property1, A[index].B_method1, etc.
How do I do this in C#?
Thanks!
|
|
|
|
|
Do you mean to access this form another class other than a and b,
eg:
Class c
{
A[ind].//Method from b ? .
}
|
|
|
|
|
class A needs to contain an array of class B instances, then you need to write your own indexing code. Here[^] is an example.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
I've asked this once before, and got no suggestions that worked. Is there a way to get the SMTP server details from either a COM object or the registry when the user has Outlook ? What about Outlook Express ?
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
I just got done writing an ATL/COM addin for Word and I remember something in the registry that might help. See HKCU\Software\Microsoft\Office\Outlook ... I have a key: OMI Account Manager and under that I have details on each account including the SMTP info.
If you don't see this info there is probably a way of finding it with COM... I can try help.
Alex Korchemniy
|
|
|
|