|
Hi,
I want to create a setup for a C# application. After the installation the setup should be deleted. Do you have any idea about this?
Pls tell me how to do this )
Thanks!
jayasshc
|
|
|
|
|
csecharithjayasshc wrote: I want to create a setup for a C# application
There are many ways to accomplish this. E.g. you could use a Visual Studio setup project or a open-source tool like NSIS[^].
csecharithjayasshc wrote: After the installation the setup should be deleted
Why would you do that? Maybe the user want to store the setup so he doesn't need to download it aganin if he wants to reinstall or use the app on another computer.
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cook www.troschuetz.de
|
|
|
|
|
Hi there,
I'm guessing if anybody knows how to manipulate Access relationships using the Microsoft.Office.Interop.Access package. What I'm trying to do is to deactivate the referencial integrity option (I hope it is so named in english) so I can change values that act as primary keys (I know, it's a bad idea, but we need to). Later, when primary keys are changed, I want to restore referencial integrity.
I've tried to manipulate the MSysRelationships table, but I have no read permission. I have also throughly reviewed the object model, but to no results.
Does anybody know how to achieve this?
Thanks in advance,
Juan Pedro Pérez
|
|
|
|
|
Hi!
I'm trying to get a table schema from a Oracle database. I've tried it doing a "select * " from the table and after using "GetSchemaTable" from the OleDbDataReader.
My problem is that it doesn't show me the primary key's. Help me!!
|
|
|
|
|
Hello all!
Please help me understand the following "little" problem:
I'm trying to find the printers which another mashine in the network sees. For that, I'm using the following piece of code:
ManagementScope ms = new ManagementScope("\\\\Someone\\root\\cimv2);
ObjectQuery oq = new ObjectQuery("Select * from win32_Printer");
ManagementObjectSearcher os = new ManagementObjectSearcher(ms, oq);
ManagementObjectCollection queryCollection = os.Get();
I mention that my permissions on the other pc are granted both for the CIMV2 and WMI
(as set through My Computer>Manage>WMI Control>Properties>Security)
If the installed printers are shared on the other computer, I see them, otherwise the queryCollection is empty. WHY?
PS: When querying anything else, it works with no problems (for example,win32_Product).
Thanks for any comment!
SkyWalker
|
|
|
|
|
Hi,
I have a AxWebBrowser control in a dialog and I would like to populate same fields of the HTML page hosted by it when it comes up.
For example, if I want to browse to the Yahoo email page, I'll put
axWebBrowser1.Navigate("https://login.yahoo.com/config/mail?.intl=us");
but I would like to set the user name in the Yahoo ID field.
Any ideas on how to do that?
thanx
|
|
|
|
|
kozu wrote: Any ideas on how to do that?
Use the DHTML interface, the Document I think.
led mike
|
|
|
|
|
Hi all,
How can i know the application environment at runtime?
i.e whether the application is run from Visual Studio IDE or an Exe.
Can we determine the application mode programmatically at runtime.
Thanks,
Pranu
|
|
|
|
|
|
System.Diagnostics.Debugger.IsAttached is what iam looking for?
Thanks for ur reply.
Pranu.
|
|
|
|
|
I am building a server based (ASP) application in VS2005. Together with that, i have also built an accompanying small "Licencer" application to be used by the same person that performs the installation so as to create an encrypted file on the HD of the server.The encrypted file will maintain the variables under which the Application was licenced.
When the technician performing the installation runs "Licencer" he inputs the [Product Key], [number of max. concurrent users], [company name] and together with that, "Licencer" also retrieves from the server the [CPUID],[OS],[DATE]. Then, those data are combined in an XML Document which "Licencer" encrypts (using symmetric encryption) and stores in the HD of the server.
When the Application starts-up it will have to decrypt the file that "Licencer" created and check it against the current system variables to see if all things are ok. If not, should stop working (lock).
My question is how am i going to implement a secure model for the creation and safe strorage of the Symmetric Key on the server, in order for nobody to be able to use it from another application?
By reading various articles on symmetric encryption i found out that i can use DPAPI in order to encrypt the Symmetric Key in the Windows registry. That could work for me but how can i be sure that my application will be the only one that will be able to decrypt the DPAPI-encrypted string from the registry?
How will it be possible not to hard-code critical information?
Apart from these questions i am open to alternate ways of managing licencing information.
Thank you in advance. I wouldn't be posting this message but i have reached a dead end.
Vasilis
|
|
|
|
|
sleepless_b wrote: how am i going to implement a secure model for the creation and safe strorage of the Symmetric Key on the server
You can't.
http://en.wikipedia.org/wiki/Symmetric-key_algorithm[^]
The disadvantage of symmetric-key algorithms is the requirement of a shared secret key, with one copy at each end. Since keys are subject to potential discovery by a cryptographic adversary, they need to be changed often and kept secure during distribution and in service. The consequent requirement to choose, distribute and store keys without error and without loss, known as key management, is difficult to reliably achieve.
You would have to use asymmetric encryption, provide a server and require a network connection during installation.
led mike
|
|
|
|
|
led mike wrote: You would have to use asymmetric encryption, provide a server and require a network connection during installation.
First of all thank u for replying..
I don't think i got that. I know all about asymmetric encryption but how could it help me on this? What does a network connection has to do during installation?
|
|
|
|
|
It allows you to keep the private key on your server so it can't be hacked locally during installation.
sleepless_b wrote: When the Application starts-up
Yeah.. missed that. That would require the same to occur at application start up.
Sorry but there is no "absolute" way of protecting symmetric encryption locally, all you can do is make it more difficult.
led mike
|
|
|
|
|
Hi
If you are storing your license information on server why can't you use a server based license checker?
Consider this scenario:
App Starts
App Sends its licensing data to server (it's been encrpyted by the server the first time the app is installed and client dosen't know how to decrypt it actually no one but the server should not know how to decrypt it)
Server decrpyts the data and checks its validity and if every thing is OK it let's App to work.
Regards
Nima H
|
|
|
|
|
Hello!
If i got it right, you mean that i should have an in-house server responsible for keeping licencing info(+encrypted keys) and every installed instance of my server-based softwrare in different servers of different companys that i have distributed it, should communicate with my in-house server in order to check the validity of its environment based on the encrypted licence i have stored in my in-house server. And this, for each time an application starts or a user tries to log himself in.
Is this what you mean?
|
|
|
|
|
Hi
Yes.I mean that if there can be a (or some) server(s) that can handle the licescing issues ,then clients don't have to know anything about them.
|
|
|
|
|
Hi,
I have an ArrayList populated by a text file made up of lines comprising 3 columns: ID, Duration, Description. They roughly look like this
12345678.abc 020 This is a description
12345678.abd 030 This is another description
etc
The ID column is always 12 characters, the duration is always 3 numbers, the description obviously can change from line to line.
Each line of the text file is read into the array in sequence, I need to be able to break each element of the ArrayList into the appropriate columns. The problem is with the description column as it contains multiple spaces. I can't work out how to break each string into the columns required
Please can anyone help?
Thank you very much in advance
Scott
|
|
|
|
|
If the format is as you described then using substring would probably be easiest.
<br />
string s = "12345678.abc 020 This is a description";<br />
string id = s.Substring(0, 12);<br />
string duration = s.Substring(13, 3);<br />
string description = s.Substring(17);<br />
You might want to put this in a catch block if there is a chance an line is incorrect. For more complex string manipulation you might want to look at regular expressions.
|
|
|
|
|
Thank you for replying, I see where you're going with this. It does however raise another question in as much as I then need to bind those strings into a datagrid under the same headings.
Any ideas how?
|
|
|
|
|
Create a class to store the id,duration and description. Then create an arraylist with instances of that class instead of strings.
|
|
|
|
|
Alternatively use Split - it has a parameter specifying the maximum number of strings in the array result.
|
|
|
|
|
I need to send an email message to receipients in my program. My problem is that I need it to send without an smtp relay. I found an example on this site on how to do it but it was written in C++ when I need it in C#. If someone can send me a link or code of how to do this, it would be greatly appreciated.
|
|
|
|
|
numbers1thru9 wrote: I need it to send without an smtp relay.
numbers1thru9 wrote: I found an example on this site
Please supply the link for that example. I have no idea how to send a SMTP message without a SMTP server.
led mike
|
|
|
|
|
As part of your mail methods you could make your own SMTP that can only send messages generated internally. Then it would seem as though its being sent without the use of an SMTP server.
|
|
|
|