PRocesses: A B C D E F G H I J K L M N O P Q R S T U V W X Y Z 0 1 2 3 4 5 6 7 8 9
Dlls: A B C D E F G H I J K L M N O P Q R S T U V W X Y Z 0 1 2 3 4 5 6 7 8 9
Popular: svchost.exe | csrss.exe | rthdcpl.exe | spoolsv.exe | mrt.exe | lsass.exe | Home | Manufacturers | Top 1000

utility.exe

Run new process as admin and read standard output

I want to allow users to run a command line utility as administrator from within my non-admin program and for my program to get the output. The utility is third-party but is distributed with my programme.

I can redirect the output of a program and I can run a program as administrator but I can't do both at the same time.

The only thing that I can get to work at the moment is using cmd.exe to redirect the output to a file, e.g.:

using System.Windows.Forms;
using System.Diagnostics;
using System.IO;
using System.Reflection;

string appDirectory = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
string utilityPath = Path.Combine(appDirectory, 'tools', 'utility.exe');
string tempFile = Path.GetTempFileName();

Process p = new Process();
// hide the command window
p.StartInfo.WindowStyle = ProcessWindowStyle.Hidden;
p.StartInfo.FileName = 'cmd.exe';
// run the tool, redirect the output to the temp file and then close.
p.StartInfo.Arguments = ' /C ''' + utilityPath + '' > '' + tempFile + '''';
p.StartInfo.Verb = 'runas'; // run as administrator
p.Start();
p.WaitForExit();

// get the output, delete the file and show the output to the user
string output = File.ReadAllText(tempFile);
File.Delete(tempFile);
MessageBox.Show(output);


This has two problems: 1) it uses a temporary file and 2) the UAC is for cmd.exe rather then utility.exe. There must surely be a better way to do this?

View Complete Forum Thread with Replies

Related posts for utility.exe

See Related Forum Messages: Follow the Links Below to View Complete Thread

How to handle multiple syntax command line arguments using boost.program_options
Server.MapPath and running a command line utility from an ASP.NET application
Dropping a file onto an EXE with parameters
Run new process as admin and read standard output
VBScript to Un-install windows application

utility.exe: How to handle multiple syntax command line arguments using boost.program_options

Consider a utility which can be used in different modes, like:

utility.exe --mode x (one list of arguments expected)
utility.exe --mode y (different list of arguments expected)

How can i write code for parsing such arguments in Boost.Program_Options???

utility.exe: Server.MapPath and running a command line utility from an ASP.NET application

I need to run an executable from an ASP.NET app using Process. The .exe file is located inside the ASP.NET project - 'ProjectRoot/Utilities/utility.exe'

Why does this code fail to run it:

string path = Server.MapPath('/Utilities/');
string args = ' etc etc';
Process p = Process.Start(new ProcessStartInfo(path + 'utility.exe', args));
p.WaitForExit(3000);


I've tried '\utility.exe' too.

utility.exe: Dropping a file onto an EXE with parameters

I'm not sure if this is going to be a programming question or not - it really depends on the answer I guess.

I have command-line utility that can be triggered by dropping a file onto it.

When this occurs, essentially this triggers the process as:

myUtility.exe Filepath/FileName.xyz


I'd like to retain the drag/drop facility, but include a fixed set of options:

myUtility.exe Filepath/FileName.xyz -f -g


Is there a way to do this?

Note the onl

utility.exe: Run new process as admin and read standard output

I want to allow users to run a command line utility as administrator from within my non-admin program and for my program to get the output. The utility is third-party but is distributed with my programme.

I can redirect the output of a program and I can run a program as administrator but I can't do both at the same time.

The only thing that I can get to work at the moment is using cmd.exe to redirect the output to a file, e.g.:

using System.Windows.Forms;
using System.Dia

utility.exe: VBScript to Un-install windows application

I tried to uninstall the windows application exe which is already installed in my system using VBScript. But was not able to Uninstall the exe. Please help me on this. Thanks in advance.

I tried with following code:

Dim oReg, oShell, oFSO
Dim UninstallString, ProductCode
Dim strComputer, colItems, objWMIService, objItem
Dim strKeyPath, subkey, arrSubKeys
strComputer = '.'

'********************************
'Enter Product Code Of The Application Here That You

wmiprvse.exe: Want to script Windows WMI (wmiprvse.exe) to release handle on file

I'm working with a VB Script file written by someone else that uses Windows Management Instrumentation (WMI) calls to check on the status of several Windows Services. This script runs every few minutes on set schedule. I need to upgrade/replace the .exe for those services.

I stop the VB Script, stop the services, and uninstall the services so they no longer appear in the Services panel (services.msc). Unfortunately, WMI (wmiprvse.exe) still has a handle on the service .exe files. I ca

kernel32.dll: C# GetProcAddress Returns Zero

For some reason, whenever my C# .NET 2.0 application makes a call to GetProcAddress it always returns zero.

public id MyClass
{
internal static id UnsafeNativeMethods
{
[DllImport('kernel32.dll', CharSet = CharSet.Auto, SetLastError = true)]
internal static extern IntPtr LoadLibrary(string lpFileName);

[DllImport('kernel32.dll', CharSet = CharSet.Auto, SetLastError = true)]
internal static extern bool SetDllDirectory(string

javaw.exe: Difference between java.exe and javaw.exe

Recently I noted that some applications are running on javaw (not in java). What is the difference between them and how can I run my Swing application on javaw?

googleearth.exe: Embedding Google earth in QT

Iam trying to embed Google earth in Qt . I have downloaded Google earth plugin on my system but when I use the statement

#import 'C:Program FilesGoogleGoogle Earthclientgoogleearth.exe' named_guids

using namespace EARTHLib;


in mainwindow.h or mainwindow.cpp file , it throws a lot of errors . Is there anything I have to add in my project settings.Find the code below

Please help!!!

outlook.exe: Outlook.Exe Keeping Handle After Attachment Save VB

I have some VBA that i use to download all the attachments from an email and save them to a directory.

This is causing me some problems because the handle from Outlook is remaining on the folder and as a result it fails to delete correctly.

I thought my code is pretty fool proof and shouldn't be keeping a hold on the folder after the completion of the script.

Can someone please point out to me what I have done wrong :/

Sub SaveCustDetails(myItem As Outlook.MailItem)<

avastsvc.exe: (AvastSVC.exe and XAMPP) / (Virtual Host on XAMPP)

So I installed XAMPP and it worked fine at first (At least I think so. I typed in localhost and got the XAMPP page).

I have the files for the site I'm working on in my Dropbox folder so they stay up to date across my computers. I was looking for a way to point XAMPP to my working folder so I didn't have to work in htdocs and then move it back to Dropbox.
I found this thread:
Make XAMPP/Apache serve file outside of htdocs

And I followed cmcculloh's answer on how to set up a

defrag.exe: Can't call defrag from perl script on Windows 2008

I would like to run a perl script that runs the defrag command on windows. When I try to just use

system('defrag C:');


I get ''defrag' is not recognized as an internal or external command,
operable program or batch file'. I get the same error even if I give the full path of C:WindowsSystem32defrag.exe. Also, any test for the existence of defrag.exe fails. For example:

if(-f 'C:\Windows\System32\defrag.exe'),

if(-x 'C:\Windows\System32\defrag.exe'), and
<

iexplore.exe: How to capture keystrokes of iexplore.exe only?

My goal is to capture keystrokes of the user when he is interacting with Internet Explorer (iexplore.exe).

This is my DLL code for a DLL called hook.dll.

#include <iostream>
#include <windows.h>

extern 'C' __declspec(dllexport)
LRESULT keyboardHook(int nCode, WPARAM wParam, LPARAM lParam)
{
if (nCode >= 0) {
std::cout << 'nCode: ' << nCode << '; wParam: ' << wParam
<<' (' << ch

soffice.exe: Starting OpenOffice Server via ProcessBuilder

im using JOD converter to convert .RTF to .PDF, but it need the OpenOfficeService running to do that, however, i cant open .odt documents while server is running, and this will be installed in user machine, and i dont want to say to everybody 'HEy, lets do CTRL + ALT + DEL and close the Process' after each convertion...

so im trying to do this:

public static void Start(){
pb = new ProcessBuilder('cmd', '/c', 'C:\OpenOffice 4\program\soffice.exe -headless -accept=socket,

servic~1.exe: 32-bit windows service do not start on 64-bit windows 7

I have a 32-bit windows .exe. Which will run as windows service. This .exe runs fine as servics for window 2000/xp 32-bit version.

However when try to run on 64-bit windows 2008 server it crash. I am observing two cases.

1) If I build the application on VC++ 6. From Event log entry it seems to Kernel.dll is crashing.


Faulting application name: , version: , time stamp: 0x4e6461c0
Faulting module name: KERNELBASE.dll, version: 6.1.7600.16385, time stamp: 0x4a5bdbdf
E

See this page in: English Espanol

Disclaimer
This web site and all information written here is for information purposes only, WITHOUT ANY VARANTY. YOU ARE USING THIS PAGES ON YOU OWN RISK. You should always verify the accuracy of information provided on this page. We pay a big attention to provide you with the correct information. However, many spyware and malware programs use filenames of usual, non-malware processes and DLLs. If we have included information about utility.exe that is inaccurate, we would appreciate your help by getting us know about your user review. Also, web links to software and DLL vendors are provided just for your conform, and we cannot guarantee its accuracy nor relevance with DLL or process listed on this page. We are not affiliated with this pages. We are not responsible for misprints on this site or changes occured since this page was published. The product, software and operating system names mentioned on this web site, can be copyrighted and registered trademarks of their owners.

utility.exe