.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
MarieAdela
Imran Ghani
Post New Web Links

System.Management WMI Remote Process start

Posted By:      Posted Date: October 25, 2010    Points: 0   Category :.NET Framework
 

 

Couple questions here, some of which depends on the answer of other questions.....fun stuff   

 

1) So I have a program that starts a remote process on a PC. When trying to run this program, it's a VBscript it's attempting to run, I get a response code of "8" which is an unknown error. Can you run VBscripts using the System.Management class and WMI?

 

2) This Vbscript is launching iexploer.exe and browsing to a designated webpage. Instead of using the VBscript can I start iexploer.exe [I know I can do this] but pass it arguments so it starts at a certain webpage?

 

3) Even if I can do option 2, which is preferable, I'm having a problem with even launching iexploer.exe. On the remote PC it starts the process, but it never is shown. It appears as if it's running in the background but have no visuals of the application whatsoever. This occurs no matter what I run: notepad.exe, calc.exe, cmd.exe....you name it. Again, I see the process start [task manager] but no visual representation of that program.



View Complete Post


More Related Resource Links

System.Diagnostics.Process.Start not work with IIS, but on ASP.NET Development Server

  
System.Diagnostics.Process.Start not work with IIS, but on ASP.NET Development Server 

Team System: Streamline Team Projects With Process Templates

  

See how you can streamline your team projects using Process Templates in Visual Studio Team System (VSTS)

Brian A. Randell

MSDN Magazine December 2008


Around the Horn: Engineer a Distributed System Using .NET Remoting for Process Intensive Analysis

  

Before the Microsoft .NET Framework, creating a distributed cluster of computers to perform scientific analysis was expensive in terms of hardware, programming and debugging time, and maintenance. You had to purchase expensive servers, spend time debugging network communication, design a distributed system completely different from a system deployed locally, and maintain a melting pot of error handling, data acquisition, networking, and analysis code. In this article, the author shows you how he was able to engineer a distributed computing system in C# to perform analysis of real-world data continuously acquired at high sampling rates, thanks to the .NET Framework.

Nate D'Anna

MSDN Magazine May 2005


WMI and .NET: System.Management Lets You Take Advantage of WMI APIs within Managed Code

  

Visual Studio .NET and the Microsoft .NET Framework SDK provide a new set of APIs and tools that let you consume Windows Management Instrumentation (WMI) data and events from managed .NET applications. After presenting an overview of what's new for WMI in the .NET Framework and the Visual Studio .NET environment, the author provides an in-depth exploration of the Management Extensions in Visual Studio .NET for Server Explorer. These extensions help you develop management-aware software and come in handy in a variety of distributed application development scenarios.

Zina Pozen

MSDN Magazine May 2002


Windows Management Instrumentation: Create WMI Providers to Notify Applications of System Events

  

Windows Management Instrumentation (WMI) is based on an industry-wide standard for notifications used to manage objects and devices across a network. By receiving WMI events, an application can be notified of changes to data in WMI itself. This allows the developer to notify the consuming application that certain system configuration data has changed, without the application having to poll WMI continuously for this data. The author presents an explanation of the different types of events in WMI, then goes on to develop an event provider.

J. Andrew Schafer

MSDN Magazine September 2001


Integrate LOB Document Management System

  

Hello

I think this is the right forum but forgive me if not. 

As part of an interim solution we need to integrate an LOB document management solution within SharePoint and i need some expert advice on how to do it and hope this is the right place.

The LOB system has document indexes (meta data) stored in a database linked to documents held on hard disk. For now we can't pull all of the documents into SharePoint but i need a way to access them from SharePoint, i also need to acces them through the LOBs existing web site.

Requirements;

1. Be able to use the Entreprise Search within SharePoint to search the index data  with the LOB database.

2. The search results page to provide links to a SharePoint page which hosts the LOB's web site. Pass some unique document Id to the LOB website so that it can show the document within SharePoint.

My thoughts (i'm new to SharePoint and don't know if this is feasible or the right way to do it so shout if you think it's a load of tosh);

1. Create a new SharePoint site or add a new page to an existing site.
2. Add a Page Viewer web part (or a custom one) to the site which points, to the LOBs web site.
3. Define the LOB system to the BDC telling it how to find the indexes (meta data) in the database tables.
4. One database record corresponds to one document. So

IE Process Start and Window Height

  
Hi, I'm working on a tool for cross-browser testing: the idea being that a WinForms app will open a range of URLs over a range of browsers, and save each out as a screenshot. I have a problem with Internet Explorer though - namely that the opened window thinks it's a lot larger than it actually is... Background: I've got some javascript/jQuery, that happily reads a parameter from a URL, and scrolls a page down - so for example http://mypage/?scroll=1 will show the top part of a web page, http://mypage/?scroll=2 shows the second part, and so forth. The scrolling mechanism uses $(window).height() and $(document).height() - both of which are standard javascript methods that work happily.   $(document).ready(function () { var windowHeight = $(window).height(); var documentHeight = $(document).height(); alert("Window Height: " + windowHeight + "px, Document Height: " + documentHeight + "px" ); });   If I open my url in IE normally, it picks up (for example) a window height of 880px - which is correct since my screen is 1050px high, minus a bit for the IE toolbars/furniture. In my WinForms application, I can open IE happily with one of the scrollable urls - namely   process.StartInfo.CreateNoWindow = false ; process.StartInfo.WindowStyle = ProcessWindowStyle.Maximized; process.StartInfo.FileName = "iexpl

process.start with UseShellExecute = False

  
Hi Please help here im stuck with this issue where i am trying the fire the cmd.exe to perform a task but the cmd.exe file needs to be started with with admin rights and i wnt the file to be hidden and even if i set the process properties ProcessWindowStyle.Hidden. How can i run the process with admin right and also hide the window because the minute i set UseShellExecute = True and comment out the user name and password than it hides the window. From what i can gather is that once you set UseShellExecute = false the code does not hide the window. See my code example below and it would really help if some could show me how to start the processs with admin right and keep the window hidden. Dim myProcess As New Process ' Declare new instance of the process class myProcess.StartInfo.FileName = "cmd.exe" ' myProcess.StartInfo.Arguments = "My Arguments here" myProcess.StartInfo.UseShellExecute = False myProcess.StartInfo.Verb = "runas" myProcess.StartInfo.UserName = Username myProcess.StartInfo.Password = password myProcess.StartInfo.WindowStyle = ProcessWindowStyle.Hidden myProcess.Start() ' Start the process myProcess.WaitForExit() ' Wait for it to exit.

Process.Start - arguments length restriction to 2080 characters

  
Hi, I'm wondering why is there a limit to "The sum of the length of the arguments and the length of the full path to the process " to 2080? I see that the documentation says that a Win32Exception is thrown if this exceeds 2080 characters. Can someone please explain to me this limit? I'm trying to start a process and I have a lot of arguments to pass, and of course ... I exceed the limit of 2080.   Thanks, Ionut.

Data access from Remote system throwgh webservice

  
Hi, i wrote the webservice and configured in our server and having access the service through the browser from another system also working fine, But i am trying to access the service through in my application creating the proxy and accessing methods of the webservice, but it can't get the data from  the remote sqlserver through the webservice.    this is for my connection string  in  web config:   <add key="ConnectionString" value="server=EVEREST;initial catalog=MRMv1;uid=sa;pwd=kk"/>   the following the error was shown to me: Server was unable to process request. ---> Login failed for user 'sa' but i can login to sqlserver using 'sa' user in the remote server. how can i get the data from the remote server.        can you please guide to me. thanks and regards brite

System.Messaging - Error accessing properties of remote private queues - "UnsupportedFormatNameExcep

  
I'm having some difficulty accessing private queues on a remote machine, but no trouble using remote public queues or private queues on a local machine. Calling: System.Messaging.MessageQueue.GetPrivateQueuesByMachine("machine"); ..succesfully returns the array of private queues on the remote machine.  However, trying to access nearly all of the properties on these MessageQueue objects returns: MessageQueueErrorCode: UnsupportedFormatNameOperation Message:"The specified format name does not support the requested operation. For example, a direct queue format name cannot be deleted." I have no trouble accessing queues created identically on the local machine using GetPrivateQueuesByMachine("."), plus accessing public queues using GetPublicQueuesByMachine("machine") also returns MessageQueue objects that are useable. The FormatName returned appears to be valid, as you would expect from queues retreived via GetPrivateQueuesByMachine().  e.g: FormatName:Direct=OS:machine\\private$\\example ..so I think the error message returned may be somewhat spurious. The permissions on the queues all appear to be set correctly.  I had even attempted allowing "Full Control" to "Everyone" on these queues as an experiment, with the same results. Any ideas for other things I might try? p.s. I am running Windows XP SP2, using .NET 2.

Process Start

  
I have the following code: Private Sub StartCSVParse(ByVal CSVParse As String) Dim process As New Diagnostics.Process With process With .StartInfo .FileName = "ExcelConverter.exe" .Arguments = "" .WorkingDirectory = "C:\Program Files\Infrahealth Inc\CSVParser\" End With ' .Start() 'This Try is to catch if the application throws any kinds of errors' Try Catch Exc As Exception message2.Text = Exc.Message End Try End With End Sub and the rest of my code before this works, but this won't start the process referenced. The process will run on it's own as an executable. I've verified that the right permissions are in place to execute the program and it wont start. Can anyone offer any reason why it may not be working?Thank youDoug

Calling SlSvcUtil with Process.Start()

  
Our application relies on SlSvcUtil (the equivalient of SvcUtil) to generate our WCF service client dynamically. It has always worked in the past but for some reason, when I call the command line to run this utility the application just stoped. The code is: Process process = new Process(); process.StartInfo.FileName = SvcUtilPath; process.StartInfo.Arguments = arguments; process.StartInfo.ErrorDialog = true; process.StartInfo.UseShellExecute = true; process.Start(); process.WaitForExit(); The variables: SvcUtilPath = C:\Program Files\Microsoft SDKs\Silverlight\v4.0\Tools\SlSvcUtil.exe arguments = http://localhost/XivicServicesNPDev/SecurityService.svc /out:c:\GeneratedSourceXivicNPDev\WCFReference\Silverlight\\SilverlightSecurityService.cs  /ct:System.Collections.ObjectModel.ObservableCollection`1  /ser:Auto  /n:*,Adapt.WCF.Reference  /r:"c:\GeneratedSourceXivicNPDev\FrameworkBin\Silverlight\Adapt.Model.Common - Silverlight.dll" /r:"C:\Program Files\Microsoft Silverlight\4.0.50524.0\\System.Windows.dll" /r:"c:\GeneratedSourceXivicNPDev\FrameworkBin\\Silverlight\Adapt.Model.Security - Silverlight.dll" /r:"c:\GeneratedSourceXivicNPDev\FrameworkBin\\Silverlight\Adapt.Model.CodeGeneration - Silverlight.dll" /r:"c:\GeneratedSourceXivicNPDev\FrameworkBin\\Silverlight\Adapt.Model.DataTransformation - Silverlight.d

Where is System.Web.Extensions.dll now? Fails on remote hosted server.

  
I've read all the notes about how from RC2 to ajax.net the name space has changed. "The core ASP.NET AJAX assembly has been changed from Microsoft.Web.Extensions.dll to System.Web.Extensions.dll. In addition, the namespace has changed from Microsoft.Web.* to System.Web.*. For some reason, my app runs on my local machine but when I copy it to a remote server (that does not have the ajax updated installed) it fails.  How can I get an IIS installation to work?  Am I missing a dll that I can push up to the remote server?  I can't run the install on the remote machine becasue it's a hosted server. Thanks

System.Web.Services.Protocols.SoapException: Server was unable to process request. ---> Object canno

  
hello,i am using a web servicewrtitten in .net and i access the webservice from my wepApplication i get this error System.Web.Services.Protocols.SoapException: Server was unable to process request. ---> Object cannot be cast from DBNull to other types.my code is access webservice: protected void btnSave_Click(object sender, EventArgs e)        {            int intStatusCode;            dtProjectStatus = (DataTable)ViewState["dtProjectStatus"];            try            {                objService.Credentials = System.Net.CredentialCache.DefaultCredentials;                if(dtProjectStatus.Rows.Count>0)                {                  intStatusCode = objService.InsertTest(dtProjectStatus);                }   

"System.ArgumentException: Font '?' cannot be found" during application start up. Any ideas?

  
We have couple of users that get this error when they run our application.  I have never seen this problem before. Client says fonts are installed and Microsoft Sans Serif font is there as well. Also he states that user has Read permissions to %SytemRoot%Fonts folder. Any suggestions or ideas how to fix this problem will be appreciated. Thank you.  Here is the stack:   Exception: System.ArgumentException: Font '?' cannot be found.   at System.Drawing.FontFamily.GetGdipGenericSansSerif()    at System.Drawing.FontFamily.get_GenericSansSerif()    at System.Drawing.SystemFonts.get_DefaultFont()    at System.Windows.Forms.Control.get_DefaultFont()    at System.Windows.Forms.Control.get_Font()    at System.Windows.Forms.Control.AssignParent(Control value)    at System.Windows.Forms.Control.ControlCollection.Add(Control value)    at Bloomberg.SmartClient.Hosting.ErrorControl.InitializeComponent() in C:\Projects\Source\Client\ApplicationHosting\ErrorControl.cs:line 218    at Bloomberg.SmartClient.Hosting.ErrorControl..ctor(String appTitle, Boolean inPanel, Exception exception) in C:\Projects\Source\Client\ApplicationHosting\ErrorControl.cs:line 119    at Bloomberg.SmartClient.Hosting.ApplicationHost.OnDisplayError(ApplicationDescription appDescription, Excepti

"System.ArgumentException: Font '?' cannot be found" during application start up. Any ideas?

  
We have couple of users that get this error when they run our application.  I have never seen this problem before. Client says fonts are installed and Microsoft Sans Serif font is there as well. Also he states that user has Read permissions to %SytemRoot%Fonts folder. Any suggestions or ideas how to fix this problem will be appreciated. Thank you.  Here is the stack: Exception: System.ArgumentException: Font '?' cannot be found.   at System.Drawing.FontFamily.GetGdipGenericSansSerif()    at System.Drawing.FontFamily.get_GenericSansSerif()    at System.Drawing.SystemFonts.get_DefaultFont()    at System.Windows.Forms.Control.get_DefaultFont()    at System.Windows.Forms.Control.get_Font()    at System.Windows.Forms.Control.AssignParent(Control value)    at System.Windows.Forms.Control.ControlCollection.Add(Control value)    at Bloomberg.SmartClient.Hosting.ErrorControl.InitializeComponent() in C:\Projects\Source\Client\ApplicationHosting\ErrorControl.cs:line 218    at Bloomberg.SmartClient.Hosting.ErrorControl..ctor(String appTitle, Boolean inPanel, Exception exception) in C:\Projects\Source\Client\ApplicationHosting\ErrorControl.cs:line 119    at Bloomberg.SmartClient.Hosting.ApplicationHost.OnDisplayError(ApplicationDescription appDescription, Exception err
Categories: 
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend