|
Gofur Halmurat wrote: when i open the link with media player, it should work
For a particular format/encoding?
That's the main reason why some streams don't "work" in the Media Player; it lacks a decoder to read it.
I are Troll
|
|
|
|
|
In a C# application I create a Process object and as Process.StartInfo.Arguments I set an environment variable like this:
Process p = new Process();
p.StartInfo.FileName = "cmd.exe";
p.StartInfo.Arguments = @"/k SET MYVAR1=HELLO";
p.Start():
But know I need to add another environment variable also valid for the cmd.exe process. The process object needs to pass a second variable called MYVAR2=WORLD . But the StartInfo.Arguments is just a string and if I try something like this:
...
p.StartInfo.Arguments = @"/k SET MYVAR1=HELLO MYVAR2=WORLD";
...
it doesn't work since MYVAR1 then gets the value:HELLO MYVAR2=WORLD .
Does anyone have a clue on how to achieve this?
|
|
|
|
|
Try seting the Arguments like this:
/K SET MYVAR1=HELLO && SET MYVAR2=WORLD
[EDIT] Added SET to the command after &&.
|
|
|
|
|
Thanks Dave, I'll try that when I'm back at the office.
|
|
|
|
|
First step is to realize that the shell, not Process is processing the env var command which you are passing.
So Process itself, as you are using it, is meaningless in the context of the question. It would require using so feature of 'cmd' itself. The other response referring to '&&' could be made to work although I doubt the exact form suggested is correct.
However ProcessStartInfo (which is the type of Process.StartInfo) has a property called EnvironmentVariables. That is probably what you want.
|
|
|
|
|
Yours is the better solution. I just kept my answer within the bounds of the code he already has.
The "&&" does work though. You can try it yourself in a simple Start -> Run line:
CMD /K SET MYVAR1=HELLO && SET MYVAR2=WORLD
When the CMD box shows up, just type SET and look for the variables.
|
|
|
|
|
Dave Kreskowiak wrote: The "&&" does work though. You can try it yourself in a simple Start -> Run line:
That would of course be a variation - as a I suggested.
Your first reply is missing the second 'set'.
|
|
|
|
|
Oh *#&$, I did screw that up, didn't I...
Thanks for the extra pair of eyes!
|
|
|
|
|
Thank you for your reply. I know that environment variables are used by shell and not Process per se, but as you saw in the example I need to start a cmd process and set more than one variable. I don't think using the EnvironmentVariables property of ProcessStartInfo will work since it seems to be readonly according to MSDN.
Anyway, it works with the previous suggestion (with a slight correction) as shown below.
/K SET MYVAR1=HELLO && SET MYVAR2=WORLD
|
|
|
|
|
Calla wrote: EnvironmentVariables property of ProcessStartInfo will work since it seems to be readonly according to MSDN.
The collection itself is readonly. The items in the collection are not.
|
|
|
|
|
I see. Thank you for pointing that out!
|
|
|
|
|
I am to create an ERP Solution in .NET and I want it to be a module base application. I am unable to figure out how can I do this.
Any suggection regarding modular approach is highly appreciatable.
Thanks
|
|
|
|
|
Umair Feroze wrote: Any suggection regarding modular approach is highly appreciatable.
Break your problem down into small modules and develop from there. This is too much of an open question to get a short answer, and you have not described what your application will do (what is ERP?).
Just say 'NO' to evaluated arguments for diadic functions! Ash
|
|
|
|
|
Richard MacCutchan wrote: what is ERP?
Enterprise Resource Planning, probably.
"I love deadlines. I like the whooshing sound they make as they fly by." (DNA)
|
|
|
|
|
Definitely ERP Stands for Enterprise Resource Planning and my project covers inventory management till payroll creation.
It covers inventory mangement, sales and purchase, an Accounting System, an HR system including payroll system.
Although I am developing all these as individual projects but the thing which is worrying me is how to join all these in a way that incase of adding another system I dont have to change the code for my project. I just create another project compile it and just plug into the system
|
|
|
|
|
I assume you are talking about dropping in different modules at runtime, without having to change any code to add them. If you are, then you are talking about creating a plugin based system - and I'd recommend using the Managed Extensibility Framework[^].
|
|
|
|
|
I am very gratefull to you for your guidance. It is the thing I was looking for.
Thanks again
|
|
|
|
|
An ERP system is a huge project to tackle, and if it is to be a generic system, where the user can configure the ERP in a way that suits his business, then the complexity becomes multiplied. Having worked a lot with ERP systems, you are going to have to dedicate several years to it if you are working on your own.
The practical solution would be first to buy a ready-built accounting system with APIs to hook into. Then you need to think deeply about the clients business, and decide what functions he will require - sales and order management, inventory management, inventory obsolescence, parts supercessions, labour billing, JIT ordering, bin location systems - the list is huge, and unless you are deeply familiar with the client's business, it is several months work on its own, before you even start to design the project.
In the last five years I have seen three major ERP projects fail due to a failure of the vendor to understand the client's requirements, so think very carefully before you take this on.
|
|
|
|
|
I am very gratefull to you Chris. Your advice is very handy and I will keep these points in mind during analysis phase.
Thank you so much
|
|
|
|
|
One other thing for you to keep in mind, which latches onto MDL=>Moshu's comment - at all costs try to avoid inter-process communication, and make everything database-centric. If not, when you have to redesign a module, you will find the changes rippling through just about every other module that the first one touched. Modding the DB and a couple of modules is easy compared with a major rewrite.
|
|
|
|
|
Totally agree. I mean we created separate let's call them apps, for moving a product(s) from one location to another,
from Quality to Scrap from prod to qual ....
The apps were available as some small asp.net web apps for desktops and as a "desktop" app(.net compact framework) for the wireless scanners/pc(windows ce).
Specialized to the max. No big huge thingy.
All the best,
Dan
|
|
|
|
|
Yeah just like Pete said.
But sooner or later the day will came when you'll need to modify almost everything at least in a module
if not all. Situations like:
Up till now you(not you personally, the company/people) moved a product from an area to another eg from production to warehouse for example.
Then they decide that they want a more detailed transaction so instead of moving from production to warehouse you will
have to move them from the production line to the warehouse. Or the other way around meaning that management decided that they don't need such detailed transactions. Such modifications are bound to affect many reports/modules.
So the best thing you could do is make it pluginable(sorry if the word doesn't exist) and try to design the app/modules
with such modifications in mind. Even then someday you(the team) will have to modify large bits of code.
After all an ERP system is meant to accommodate the businesses of a particular company/plant.
If/when that changes you'll have to change it too.
I've done something like this a little while ago. Fortunately I was familiar with the business process and I
anticipated some of the possible changes. But not all of them.
Best of luck.
All the best,
Dan
modified on Tuesday, December 28, 2010 10:10 AM
|
|
|
|
|
I am gratefull to you Dan for a very good piece of advice. It's very handy to have suggestions from the ones who have already done the work on ERP.
Thank you so much.
|
|
|
|
|
You're welcome.
Oh, and it's not that hard really. Just a lot of work(huge if just one person) and most importantly carefully design of the businesses process.
If you're not familiar with it, I suggest you take some time to familiarize yourself with it and then start
designing/developing the app.
All the best,
Dan
|
|
|
|
|
Umair Feroze wrote: It covers inventory mangement, sales and purchase, an Accounting System, an HR system including payroll system.
Although I am developing all these as individual projects but the thing which is worrying me is how to join all these in a way that incase of adding another system I dont have to change the code for my project. I just create another project compile it and just plug into the system
This is would be a large project even for a relatively small company.
The larger the company the more complexity involved in the integration. A simple example is a company might want to manage contractors as personal (human resources) while paying them as a project expense rather than a payroll expense.
An inexperienced developer is unlikely to get the functionality of the individual components correct much less correctly architecting/designing the cross project needs correctly. As an example of this corrrectly implementing point of sale taxes for a retail company is a very complicated task.
Not to mention of course that any cross project needs are directly dependent on the business needs of the company itself. Thus the first step is to learn the needs of the company.
|
|
|
|