|
Hi^^
^^
I want installed product by Window installer.
But I want all installed product in window system.
I refer to System.Management
see below plz^^;;
Vendor
MicrosoftMicrosoft CorporationMicrosoft CorporationMicrosoft CorporationMicrosoftDAEMON'S HOME////DAEMON Tools////3.47.0
Haansoft////한글 2005////6.5.0.824
Microsoft Corporation////WebFldrs XP////9.50.7523
NetSarang Computer, Inc.////Xmanager Enterprise////2.0.0203
Microsoft////Visual J# .NET Redistributable 1.1- Korean Language Pack////1.1.4322
Adobe Systems Incorporated////Adobe Reader 7.0.7 - Korean////7.0.7
Sony Corporation////OpenMG Secure Module////4.4.00.11241
Microsoft////Visual Studio.NET Baseline - Korean////7.1.3091
Microsoft////Microsoft FrontPage Client - Korean////7.00.9209
Microsoft////Microsoft .NET Framework 1.1////1.1.4322
Green Eclipse////StickyPad////2.2.48
Microsoft////Microsoft .NET Framework 1.1 한국어 언어 팩////1.1.4322
Microsoft////MSDN Library for Visual Studio .NET 2003 - Korean////7.38.3095
Press any key to continue
It's not all installed product in window system.
It's installed product by window installer.
( MSDN : Win32_Product - Represents a product as it is installed by Windows Installer. )
help me^^
Have a good time^^
Nothing!! But gonzo!!
-- modified at 14:06 Sunday 30th April, 2006
|
|
|
|
|
I have no clue what you are talking about. You post says nothing about what you are trying to do, what the problem is, or what you need help with.
---
b { font-weight: normal; }
|
|
|
|
|
Looks like I guess what do you want. If you need the list of all applications, officially installed in the system, you'll need to parse system registry key
HKEY_LOCAL_MACHINE\\Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall.
If you need all applications installed and used in the system - it's impossible.
____________________________________________
Robin Panther http://www.robinland.com
|
|
|
|
|
thank you for reply^^
I did that you informed.
and I got a information about installed application in system.
void ShowWqlObjectQuery( string winInfo )<br />
{<br />
WqlObjectQuery objectQuery = new WqlObjectQuery("select * from " + winInfo );<br />
ManagementObjectSearcher searcher = new ManagementObjectSearcher( objectQuery );<br />
<br />
foreach( ManagementObject info in searcher.Get() )<br />
{<br />
Console.Write( info["Vendor"] );<br />
Console.Write( "////" + info["Name"]);<br />
Console.WriteLine( "////" + info["Version"] ); <br />
}<br />
}
Nothing!! But gonzo!!
|
|
|
|
|
Hi
I need a code example or an known Object that can count the number of word in a text
eyalso
|
|
|
|
|
Why don't you try using string.Split(" \t\n.;:\"\'") with cleaning empty results? may be some more symbols, but you got the idea. You can use Regex for same effect...
____________________________________________
Robin Panther http://www.robinland.com
|
|
|
|
|
can u send me code example (with regex or split)
thanks
eyalso
|
|
|
|
|
string input="Hello World!"+Environment.NewLine+"Goodbye World.";
int wordCount=Regex.Matches(input,"[\\w\'-]+").Count;
Console.WriteLine("Word Count: {0}",wordCount);
Needs further testing, and probably not perfect. But on the tests I have done so far, it seems to account for itself.
Hope this helps, Graham.
-- modified at 17:50 Sunday 30th April, 2006
|
|
|
|
|
hey guys,
I've been searching like a lunatic for this. Here's what I have... I get a generated xml file. I made an xslt file to make it nice looking. Now I'm trying to write a program that imports the xml, pushes it thru the xslt, and spits out html again.
at the moment I have 2 tabs, one already showing the clean xml file, a second tab would show the html which was generated.
now here's the problems:
1. for some reason the program can't find the xslt file. is there any way I can bind the file to where the exe is running instead of the path where the xml file is loaded from?
2. how do I get from 1 xml file and 1 xslt file to a proper html file. (from what I've seen theres something like an xsltransformer, but I can't figure it out)
thx guys
|
|
|
|
|
Khepry wrote: where the exe is running
Use Application.StartupPath .
Khepry wrote: how do I get from 1 xml file and 1 xslt file to a proper html file.
Will this[^] link help?
/ravi
My new year's resolution: 2048 x 1536
Home | Music | Articles | Freeware | Trips
ravib(at)ravib(dot)com
|
|
|
|
|
Hi,
I would like to create a small application to create/modify my app.config file, in which I store my database connection string.
1. I would like to know if it is possible to obtain a list of installed ODBC drivers on a PC.
does anyone have clue?
kind regards
|
|
|
|
|
|
Hi..
Ihave downloaded the microsoft SAPI SDK to make a simple speech Recognition C# application.After search the internet for examples i wrote the code:
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;
using SpeechLib;
using System.IO;
namespace ReviewWinApp
{
///
/// Summary description for Form1.
///
public class Form1 : System.Windows.Forms.Form
{private SpSharedRecoContext objRecoContext;
private SpeechLib.ISpeechRecoGrammar grammar;
private System.Windows.Forms.MainMenu mainMenu1;
private System.Windows.Forms.MenuItem menuItem1;
private System.Windows.Forms.MenuItem menuItem2;
private System.Windows.Forms.MenuItem menuItem3;
private System.Windows.Forms.Button button1;
private System.Windows.Forms.TextBox tbxOFile;
private System.Windows.Forms.GroupBox groupBox1;
private System.Windows.Forms.RadioButton rdoEVoice;
private System.Windows.Forms.MenuItem menuItem4;
private System.Windows.Forms.Button button2;
///
/// Required designer variable.
///
private System.ComponentModel.Container components = null;
public Form1()
{
//
// Required for Windows Form Designer support
//
InitializeComponent();
//
// TODO: Add any constructor code after InitializeComponent call
//
}
///
/// Clean up any resources being used.
///
protected override void Dispose( bool disposing )
{
if( disposing )
{
if (components != null)
{
components.Dispose();
}
}
base.Dispose( disposing );
}
#region Windows Form Designer generated code
///
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
///
private void InitializeComponent()
{
this.mainMenu1 = new System.Windows.Forms.MainMenu();
this.menuItem1 = new System.Windows.Forms.MenuItem();
this.menuItem2 = new System.Windows.Forms.MenuItem();
this.menuItem3 = new System.Windows.Forms.MenuItem();
this.menuItem4 = new System.Windows.Forms.MenuItem();
this.button1 = new System.Windows.Forms.Button();
this.tbxOFile = new System.Windows.Forms.TextBox();
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.rdoEVoice = new System.Windows.Forms.RadioButton();
this.button2 = new System.Windows.Forms.Button();
this.groupBox1.SuspendLayout();
this.SuspendLayout();
this.objRecoContext = new SpSharedRecoContext();
this.objRecoContext.Recognition += new _ISpeechRecoContextEvents_RecognitionEventHandler(RecoContext_Recognition);
// mainMenu1
//
this.mainMenu1.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
this.menuItem1});
//
// menuItem1
//
this.menuItem1.Index = 0;
this.menuItem1.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
this.menuItem2,
this.menuItem3,
this.menuItem4});
this.menuItem1.Text = "&File";
//
// menuItem2
//
this.menuItem2.Index = 0;
this.menuItem2.Shortcut = System.Windows.Forms.Shortcut.CtrlO;
this.menuItem2.Text = "Open";
this.menuItem2.Click += new System.EventHandler(this.menuItem2_Click);
//
// menuItem3
//
this.menuItem3.Index = 1;
this.menuItem3.Shortcut = System.Windows.Forms.Shortcut.CtrlN;
this.menuItem3.Text = "New";
//
// menuItem4
//
this.menuItem4.Index = 2;
this.menuItem4.Shortcut = System.Windows.Forms.Shortcut.CtrlE;
this.menuItem4.Text = "Exit";
this.menuItem4.Click += new System.EventHandler(this.menuItem4_Click);
//
// button1
//
this.button1.Location = new System.Drawing.Point(184, 184);
this.button1.Name = "button1";
this.button1.TabIndex = 0;
this.button1.Text = "Read Text";
this.button1.Click += new System.EventHandler(this.button1_Click);
//
// tbxOFile
//
this.tbxOFile.Location = new System.Drawing.Point(32, 16);
this.tbxOFile.Multiline = true;
this.tbxOFile.Name = "tbxOFile";
this.tbxOFile.Size = new System.Drawing.Size(384, 160);
this.tbxOFile.TabIndex = 1;
this.tbxOFile.Text = "";
//
// groupBox1
//
this.groupBox1.Controls.Add(this.rdoEVoice);
this.groupBox1.Location = new System.Drawing.Point(168, 224);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(280, 40);
this.groupBox1.TabIndex = 2;
this.groupBox1.TabStop = false;
this.groupBox1.Text = "Voice Orders";
//
// rdoEVoice
//
this.rdoEVoice.Location = new System.Drawing.Point(3, 16);
this.rdoEVoice.Name = "rdoEVoice";
this.rdoEVoice.Size = new System.Drawing.Size(133, 24);
this.rdoEVoice.TabIndex = 0;
this.rdoEVoice.Text = "Enable Voice Orders";
this.rdoEVoice.CheckedChanged += new System.EventHandler(this.radioButton1_CheckedChanged);
//
// button2
//
this.button2.Location = new System.Drawing.Point(104, 184);
this.button2.Name = "button2";
this.button2.TabIndex = 3;
this.button2.Text = "TestRecognition";
this.button2.Click += new System.EventHandler(this.button2_Click);
//
// Form1
//
this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
this.ClientSize = new System.Drawing.Size(448, 266);
this.Controls.Add(this.button2);
this.Controls.Add(this.groupBox1);
this.Controls.Add(this.tbxOFile);
this.Controls.Add(this.button1);
this.Menu = this.mainMenu1;
this.Name = "Form1";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "FilesReader";
this.Closing += new System.ComponentModel.CancelEventHandler(this.Form1_Closing);
this.Load += new System.EventHandler(this.Form1_Load);
this.groupBox1.ResumeLayout(false);
this.ResumeLayout(false);
}
#endregion
///
/// The main entry point for the application.
///
[STAThread]
static void Main()
{
Application.Run(new Form1());
}
private void button1_Click(object sender, System.EventArgs e)
{
SpeechLib.SpVoiceClass sp=new SpVoiceClass();
sp.Speak(tbxOFile.Text,SpeechVoiceSpeakFlags.SVSFDefault);
}
private void radioButton1_CheckedChanged(object sender, System.EventArgs e)
{//SpSharedRecoContext objRecoContext;
if(rdoEVoice.Checked==true)
{
grammar = objRecoContext.CreateGrammar(0);
grammar.DictationLoad("", SpeechLoadOption.SLOStatic);
/*grammar=objRecoContext.CreateGrammar(1);
grammar.CmdLoadFromFile("D:\\newDocuments\\FrequentlyUse\\listg.xml",SpeechLoadOption.SLODynamic);
grammar.CmdSetRuleIdState(0,SpeechRuleState.SGDSActive);*/
}
else
{
grammar.DictationSetState(SpeechRuleState.SGDSInactive);
this.objRecoContext.State=SpeechRecoContextState.SRCS_Disabled;
}
}
public void RecoContext_Recognition(int StreamNumber, object StreamPosition, SpeechRecognitionType RecognitionType, ISpeechRecoResult Result)
{
string strData = Result.PhraseInfo.GetText(0, -1, true) ;
// Debug.WriteLine("Recognition: " + strData + ", " + StreamNumber + ", " + StreamPosition);
tbxOFile.Text+= strData;
}
private void menuItem2_Click(object sender, System.EventArgs e)
{
StreamReader rd;
string fName;
OpenFileDialog of=new OpenFileDialog();
of.Filter="txt files (*.txt)|*.txt|All Files (*.*)|*.*";
of.FilterIndex=2;
of.InitialDirectory="C:\\";
if(of.ShowDialog()==DialogResult.OK)
{
fName=of.FileName;
rd=new StreamReader(fName);
while(rd.Peek()!=-1)
{
tbxOFile.Text+=rd.ReadLine();
}
rd.Close();
}
}
private void Form1_Closing(object sender, System.ComponentModel.CancelEventArgs e)
{
}
private void menuItem4_Click(object sender, System.EventArgs e)
{
this.Close();
}
private void Form1_Load(object sender, System.EventArgs e)
{
}
private void button2_Click(object sender, System.EventArgs e)
{
this.objRecoContext = new SpSharedRecoContext();
this.objRecoContext.Recognition += new _ISpeechRecoContextEvents_RecognitionEventHandler(RecoContext_Recognition);
this.objRecoContext.State=SpeechRecoContextState.SRCS_Enabled;
grammar = objRecoContext.CreateGrammar(0);
grammar.CmdLoadFromFile("D:\\newDocuments\\FrequentlyUse\\tryRecog.xml",SpeechLoadOption.SLODynamic);
}
}
}
But unfortunately nothing happend.Could any one help?
|
|
|
|
|
From what I can see, you dont appear to have started grammar (I assume button2_Click is the method that you want to start the recognition). Try placing the following code at the end of that method...
grammar.DictationSetState(SpeechRuleState.SGDSActive); Just a guess
“Accept that some days you are the pigeon, and some days you are the statue” -- David Brent
Cheers,
Will H
|
|
|
|
|
You are right..
After i have added your code the dictation grammar worked..that helped me to find how to use the grammar in my file(tryRecog.xml) as a context free grammar (CFG) using the code:
grammar.CmdSetRuleIdState(0,SpeechRuleState.SGDSActive);
You found exactly where does the error exist in the whole code..That was realy impressive.Thank you very much.
|
|
|
|
|
Hi..iam happy to talk to you again.
I want to use the CmdLoadFromResource() method of ths speech SDK 5.1 to make the xml file that includes the Grammar embeded but i dont know how to use this method in C#.
Do you know how to use this method?
|
|
|
|
|
I'm sorry, but I have never used this method. I haven't used XML files for use with SAPI either. I think your best bet would be to ask again in the forums, or just try and attempt it and see what happens.
Sorry I couldn't be of more help.
“Accept that some days you are the pigeon, and some days you are the statue” -- David Brent
Cheers,
Will H
|
|
|
|
|
Thank you for your respond..I will take your advice and put my question in the C# forum..We spent an interesting time together thank you very much .
|
|
|
|
|
I want to create my own timer but because it's running on another thread than the main-form, the program will throw an InvalidOperationException every time the timer ticks.
The code looks like this:
class MyTimer
{
public delegate void TimerTick();
public event TimerTick TickEvent;
Thread t;
public MyTimer()
{
t = new Thread(new ThreadStart(Run));
}
public void start()
{
t.Start();
}
private void Run()
{
while (true)
{
Thread.Sleep(10);
TickEvent();
}
}
}
I know that there already are a timer in the .NET framework but i want to learn how to make thread-safe calls.
Btw: What's the <code>-tag on this forum good for? It removes all code-indentation
|
|
|
|
|
Erikerikerikerikerassa wrote: want to learn how to make thread-safe calls.
See this[^] article.
Erikerikerikerikerassa wrote: What's the <code>-tag on this forum good for? It removes all code-indentation
<code> is used for inline code. Use <pre></pre> around code blocks.
/ravi
My new year's resolution: 2048 x 1536
Home | Music | Articles | Freeware | Trips
ravib(at)ravib(dot)com
|
|
|
|
|
http://www.codeproject.com/csharp/begininvoke.asp[^]
Thank's, i've read the article and think i understand what it means. But there is one problem, i want the BeginInvoke to be built in in my timer, now i have to put it everywhere the timmer throws an event in the main form, BeginInvoke is only availible in Forms. I want all the thread-checking to be in the timer-class so i don't have to rewrite it every time i use the timer.
Is it a good idea to send a reference of the main form to the timer and then use BeginInvoke on that reference?
Like this:
class MyTimer
{
public delegate void TimerTick();
public event TimerTick tick;
Thread t;
Form main;
public MyTimer(Form f)
{
t = new Thread(new ThreadStart(Run));
main = f;
}
public void start()
{
t.Start();
}
private void Run()
{
while (true)
{
Thread.Sleep(10);
main.BeginInvoke(tick);
}
}
}
|
|
|
|
|
Erikerikerikerikerassa wrote: i want the BeginInvoke to be built in in my timer,
Imho, you should do the opposite - i.e. let the implemented delegate call InvokeRequired() and do the appropriate thing when necessary. The timer should know very little (preferably nothing) about its listeners.
/ravi
My new year's resolution: 2048 x 1536
Home | Music | Articles | Freeware | Trips
ravib(at)ravib(dot)com
|
|
|
|
|
In his case he knows InvokeRequired is true as he is calling from another thread
|
|
|
|
|
Quite right.
But checking InvokeRequired() allows the delegate method to be called from the same thread (if reqd in the future) without the performance penalty of Begin/EndInvoke() .
/ravi
My new year's resolution: 2048 x 1536
Home | Music | Articles | Freeware | Trips
ravib(at)ravib(dot)com
|
|
|
|
|
hello ; I need to code a project that uses a map ; the idea of the project is to find the minimum road between to locations ; given the fact that I have found that path , I need a little help now ; I want to color the path that I have found ; so , what I need to know is how to draw on top of an image ; I have the map (which is actually a jpg) and it is loaded in an picturebox object ; so I need to draw a few lines over that picture ; if you know this , please tell me also how can I clear the picture from those lines (becase I can choose to find the minimum path of other 2 locations) ; thanks
|
|
|
|