|
Try using NSIS. It's a scripting system used and developed by the winamp team.
company, work and everything else @ netis
|
|
|
|
|
Hello!
Im trying to write a deployment project in VS.net 2005.
What Im trying to do is this.
Take the target installation path and write this string value to the registry.
I just cant figure out how to do this. I know how to write to the registry, but somehow I need to get the target path and write this parameter to the registry.
Very thankfull for any help.
|
|
|
|
|
The VS deployment projects aren't very flexible. You might be better off using WiX[^]. That said, you can use [TARGETDIR] for your registry value in most cases. If you're trying to write the exact location of a file you can use the notation [#filekey] but that where things get difficult, since the VS.NET deployment projects don't show you the component, file, registry, etc. key names (the deployment projects compile into .msi files, which are relational databases processed by Windows Installer).
This posting is provided "AS IS" with no warranties, and confers no rights.
Software Design Engineer
Developer Division Customer Product-lifecycle Experience
Microsoft
[My Articles] [My Blog]
|
|
|
|
|
Hello!
Thanks for your answer!
I found out [TARGETDIR] right after I posted
What is WiX and where can I find it?
Best regards!
|
|
|
|
|
|
It looks promissing I must say!
Does this integrate into VS.net?
|
|
|
|
|
If you create your own project installer (System.Configuration.Install.Installer), you can easily get the install path by just using reflection on the executing assembly. Here is some code I use to do this in my installer:
System.Reflection.Assembly asm = System.Reflection.Assembly.GetExecutingAssembly();
string baseAppDir = (new System.IO.FileInfo( asm.Location )).DirectoryName;
RegistryKey softwareKey = Microsoft.Win32.Registry.LocalMachine
.OpenSubKey( "Software", true )
.OpenSubKey( "Company Name", true )
.OpenSubKey( "Application Name", true );
softwareKey.SetValue( "InstallLocation", configFilepath );
Keep in mind that I added a registry value in setup project that creates the HKLM\Software\Company Name\Application Name\InstallLocation key with some default or empty value. The setup project actually creates the keys you specified in the registry editor part of the setup project before it calls your code in the Installer class.
-Matt
------------------------------------------
The 3 great virtues of a programmer:
Laziness, Impatience, and Hubris.
--Larry Wall
|
|
|
|
|
hi,
how i can apply transaction on a dataset ?
|
|
|
|
|
neerajxp wrote: how i can apply transaction on a dataset ?
A dataset is a disconnected set of data. There is nothing to transact against.
|
|
|
|
|
I have successfully used binary remoting with an object containing generic signatures on its public methods on XP development machines.
I am trying to implement the client web site and the serving remoting site on a Windows 2003 server.
I am finding that methods without generics work fine, but ones with generics are failing.
There appears to be a problem with handling the declared class instance as T. Again, on an XP machine this works fine.
Here is an excerpt from my remoting web config.
"
<system.runtime.remoting>
<customerrors mode="Off">
<application>
<channels>
<channel ref="http">
<serverproviders>
<formatter ref="binary">
<service>
<wellknown mode="Singleton" type="MyApp.DataServices.DataService, MyApp.DataServices" objecturi="DataService.rem">
"
Here is an excerpt from the web client web config
"
<system.runtime.remoting>
<application>
<client>
<wellknown url="http://localhost:##/MyRemotingVirtualDirectory/dataservice.rem" type="MyApp.DataServices.Interfaces.IDataService, MyApp.DataServices.Interfaces">
<channels>
<channel ref="http" usedefaultcredentials="true">
<clientproviders>
<formatter ref="binary">
"
Here is the code that makes the remoting call
"
IDataService obj = RemotingServices.Connect(typeof(IDataService),
ConfigurationManager.AppSettings[WebConfigContants.REMOTINGSERVERURL]) as IDataService;
"
The exception I get back on the web site client is to the effect
"
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Runtime.Remoting.RemotingException: The argument type 'MyDomain.MyDomainClass' cannot be converted into parameter type 'T'.
at System.Runtime.Remoting.Messaging.Message.SoapCoerceArg(Object value, Type pt, Hashtable keyToNamespaceTable)
at System.Runtime.Remoting.Messaging.MethodCall.SetObjectFromSoapData(SerializationInfo info)
at System.Runtime.Remoting.Messaging.MethodCall.SetObjectData(SerializationInfo info, StreamingContext context)
at System.Runtime.Remoting.Messaging.MethodCall.RootSetObjectData(SerializationInfo info, StreamingContext ctx)
at System.Runtime.Remoting.Messaging.SerializationMonkey..ctor(SerializationInfo info, StreamingContext ctx)
--- End of inner exception stack trace ---
Server stack trace:
at System.RuntimeMethodHandle._SerializationInvoke(Object target, SignatureStruct& declaringTypeSig, SerializationInfo info, StreamingContext context)
at System.RuntimeMethodHandle.SerializationInvoke(Object target, SignatureStruct declaringTypeSig, SerializationInfo info, StreamingContext context)
at System.Reflection.RuntimeConstructorInfo.SerializationInvoke(Object target, SerializationInfo info, StreamingContext context)
at System.Runtime.Serialization.ObjectManager.CompleteISerializableObject(Object obj, SerializationInfo info, StreamingContext context)
at System.Runtime.Serialization.ObjectManager.FixupSpecialObject(ObjectHolder holder)
at System.Runtime.Serialization.ObjectManager.DoFixups()
at System.Runtime.Serialization.Formatters.Soap.ObjectReader.Deserialize(HeaderHandler handler, ISerParser serParser)
at System.Runtime.Serialization.Formatters.Soap.SoapFormatter.Deserialize(Stream serializationStream, HeaderHandler handler)
at System.Runtime.Remoting.Channels.CoreChannel.DeserializeSoapRequestMessage(Stream inputStream, Header[] h, Boolean bStrictBinding, TypeFilterLevel securityLevel)
at System.Runtime.Remoting.Channels.SoapServerFormatterSink.ProcessMessage(IServerChannelSinkStack sinkStack, IMessage requestMsg, ITransportHeaders requestHeaders, Stream requestStream, IMessage& responseMsg, ITransportHeaders& responseHeaders, Stream& responseStream)
"
Any suggestions would be most welcomed.
Luke Hammond
|
|
|
|
|
Remoting web config should read
<system.runtime.remoting>
<customerrors mode="Off">
<application>
<channels>
<channel ref="http">
<serverproviders>
<formatter ref="binary">
<service>
<wellknown mode="Singleton" type="MyApp.DataServices.DataService, MyApp.DataServices" objecturi="DataService.rem">
Client web site config should read
<system.runtime.remoting>
<application>
<client>
<wellknown url="http://localhost:##/MyRemotingVirtualDirectory/dataservice.rem" type="MyApp.DataServices.Interfaces.IDataService, MyApp.DataServices.Interfaces">
<channels>
<channel ref="http" usedefaultcredentials="true">
<clientproviders>
<formatter ref="binary">
|
|
|
|
|
O.K. I need to use preview and figure out what is happening to my text
Here is the remoting config
system.runtime.remoting
customErrors mode="Off"/
application
channels
channel ref="http"/
serverProviders
formatter ref="binary"/
/serverProviders
/channels
service
wellknown mode="Singleton" type="MyApp.DataServices.DataService, MyApp.DataServices" objectUri="DataService.rem"/
/service
/application
/system.runtime.remoting
And here is the web site client config
system.runtime.remoting
application
client
wellknown url="http://localhost:##/MyRemotingVirtualDirectory/dataservice.rem" type="MyApp.DataServices.Interfaces.IDataService, MyApp.DataServices.Interfaces"/
/client
channels
channel ref="http" useDefaultCredentials="true"
clientProviders
formatter ref="binary"/
/clientProviders
/channel
/channels
/application
/system.runtime.remoting
|
|
|
|
|
Hi all,
I have to make a application for synchronous and Asynchronous socket communication so right now i am able to Asynchronous socket by AsyncCallback
function but i am unable to synchronous socket so please tell how can i cretae synchronous socket in .net framwork.
if any body have idea please share with me.
thanks
bankey
|
|
|
|
|
I have a requirement to draw a rectangle and a line on a the
container control and sometimes as i move the mouse the drawing must
occur on top of user controls and other controls, which are placed in
the container control...
I'm using System.Drawing namespace (C#) to perform the drawing.
But as i move the mouse and draw the rectangles, the drawing takes
place behind the user controls....I have a requirement to draw the
shapes on top of the controls...
Please helppppppp
|
|
|
|
|
The controls will always be drawn on top of your rectangle because your drawing on the container the controls are in.
What you need to do is draw on the controls themselves when appropriate.
You can do this by handling the controls paint event.
Simon
|
|
|
|
|
I can call JavaScript functions from my C# dll, but I was hoping I could send information via function calls from the javascript back to me C# dll.
I can not find anyway to do this. Please let me know where this information would be at in this great web of ours.
Thanks
|
|
|
|
|
Hello
You can call C# functions from javascript using XMLHTTP calls ...I think you can use Mschwarz ajax library( http://weblogs.asp.net/mschwarz/ )
Cheers
Navaneeth!!
|
|
|
|
|
As has already been suggested, you can use AJAX, but if you just want to post back user input, you can also just set the value of hidden fields using your javascript code. Just register a hidden field in your form by some name that will be known both in your javascript and your server side C# code. Then have javascript obtain that field by using document.getElementById and set its value to whatever you want. Then, when the page gets posted back, you will have access to the value that was placed in that field.
-Matt
------------------------------------------
The 3 great virtues of a programmer:
Laziness, Impatience, and Hubris.
--Larry Wall
|
|
|
|
|
It works like a champ! Thanks of the info.
Programmer
Glenn Earl Graham
Austin, TX
|
|
|
|
|
Hi,
I have developed a windows form application.Now,i am using task manager to monitor its perfomance,i got that the cpu usage is lower(but sometime will raise to 9) ,but when i look at the memory usage(In Processes),i was used about 40000k memory to 60000k memory, sometime even higher than these values.I will very appreciate if anyone can tell me my application is consider high perfomance or low perfomance? (How to evalute?)
If my post is place wrongly,please guide me where should i get my answer.
thanks
cocoonwls
|
|
|
|
|
Hi,
to me performance is measured in functional results per unit of time, so it does not involve CPU load or memory footprint. Functional results could be
transactions/second in a database, pages/minute printed in a report tool, etc.
I can not tell you whether your app is hi or lo performance. Do you consider a
10 page/minute printer fast or slow ??
You can compare with two kinds of things:
- the performance of another program with similar functionality;
- your own expectations.
In either case, you (or your customers) will be the judge.
Having the same performance at a lower cost (less CPU load, smaller memory footprint)
can be an added bonus. It could become relevant if your app is being ran by
several concurrent users on the same machine (especially if a server app).
Hope this helps.
Luc Pattyn
|
|
|
|
|
hi Luc Pattyn,
Thanks for reply.Actually my application is using for monitory[include displaying data in chart format(in real time,display 30 charts at the same time with using thread ),generate log file and save into database & textfile, and report view function] certain information which get from third party device through seriall port. Each 3 sec will get request a data from third party device.
May be i should change my question,it should be "Isn't a good quality application which develop by using c#?"
Anyway,you have gave me a good answer on it.Thanks
regards
cocoonwls
|
|
|
|
|
Hi, I like it when the question can change and the answer can remain the same...
Luc Pattyn
|
|
|
|
|
hi, I am welcome and appreciate if you would like to answer the question "Isn't a good quality application which develop by using c#?"
cocoonwls
|
|
|
|
|
I am not sure I understand the question. If you mean to ask "Can we develop quality
software in C# ?" the answer is yes (you can in any language, some make it easier
to achieve quality and/or productivity, and C# certainly is amongst them).
If you mean to ask "Can we develop the highest performance app with C# ?" then
I would say you can achieve good performance with C#, but you also can waste a lot
of performance using it. And you might get somewhat better (or even much better) perfo
when staying closer to the hardware (anything from C++ downto assembly code,
e.g. when you want to exploit the vector processing capabilities known as MMX and SSE
on Pentium).
Luc Pattyn
|
|
|
|