472,144 Members | 1,892 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,144 software developers and data experts.

kill a process with insufficient user permissions

Hi
my program should run on terminal server. I open Acrobat process and I
have to kill them at some points in my application. This fails cause
of insufficient rights on terminal server.

the lines:
Dim p As New Process
For Each p In Process.GetProcesses
If LCase(p.ProcessName) = "acrord32" Then
'p.Kill()
'p.Close()
End If
Next

The error:

************** Exeption: **************
System.ComponentModel.Win32Exception: Zugriff verweigert [<= Access
Denied!]
at System.Diagnostics.ProcessManager.OpenProcess(Int3 2 processId,
Int32 access, Boolean throwIfExited)
at System.Diagnostics.NtProcessManager.GetModuleInfos (Int32 processId)
at System.Diagnostics.Process.get_Modules()
at System.Diagnostics.Process.get_MainModule()
at System.Diagnostics.Process.get_ProcessName()
at WindowsApplication1.Form2.KillAcrobat() in
D:\PCCViewer_mp_20050112\Form2.vb:line 1693
at WindowsApplication1.Form2.setDefaultPRN(String argPrinter) in
D:\PCCViewer_mp_20050112\Form2.vb:line 2100
at WindowsApplication1.Form2.btn_printOn_Click(Object sender,
EventArgs e) in D:\PCCViewer_mp_20050112\Form2.vb:line 2153
at System.Windows.Forms.Control.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnMouseUp(MouseEventAr gs mevent)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons
button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ButtonBase.WndProc(Message& m)
at System.Windows.Forms.Button.WndProc(Message& m)
at System.Windows.Forms.ControlNativeWindow.OnMessage (Message& m)
at System.Windows.Forms.ControlNativeWindow.WndProc(M essage& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg,
IntPtr wparam, IntPtr lparam)
************** Geladene Assemblys **************
mscorlib
Assembly-Version: 1.0.5000.0
Win32-Version: 1.1.4322.2032
CodeBase: file:///c:/winnt/microsoft.net/framework/v1.1.4322/mscorlib.dll
----------------------------------------
mscorlib.resources
Assembly-Version: 1.0.5000.0
Win32-Version: 1.1.4322.573
CodeBase: file:///c:/winnt/assembly/gac/mscorlib.resources/1.0.5000.0_de_b77a5c561934e089/mscorlib.resources.dll
----------------------------------------
System
Assembly-Version: 1.0.5000.0
Win32-Version: 1.1.4322.2032
CodeBase: file:///c:/winnt/assembly/gac/system/1.0.5000.0__b77a5c561934e089/system.dll
----------------------------------------
System.Drawing
Assembly-Version: 1.0.5000.0
Win32-Version: 1.1.4322.2032
CodeBase: file:///c:/winnt/assembly/gac/system.drawing/1.0.5000.0__b03f5f7f11d50a3a/system.drawing.dll
----------------------------------------
PCC
Assembly-Version: 1.0.1838.29424
Win32-Version: 1.0.1838.29424
CodeBase: file://ktkrs166/PCC/bin/PROD/PCC.exe
----------------------------------------
System.Windows.Forms
Assembly-Version: 1.0.5000.0
Win32-Version: 1.1.4322.2032
CodeBase: file:///c:/winnt/assembly/gac/system.windows.forms/1.0.5000.0__b77a5c561934e089/system.windows.forms.dll
----------------------------------------
Microsoft.VisualBasic
Assembly-Version: 7.0.5000.0
Win32-Version: 7.10.6001.4
CodeBase: file:///c:/winnt/assembly/gac/microsoft.visualbasic/7.0.5000.0__b03f5f7f11d50a3a/microsoft.visualbasic.dll
----------------------------------------
AxInterop.PdfLib
Assembly-Version: 1.3.0.0
Win32-Version: 1.3.0.0
CodeBase: file://ktkrs166/PCC/bin/PROD/AxInterop.PdfLib.DLL
----------------------------------------
AxInterop.SHDocVw
Assembly-Version: 1.1.0.0
Win32-Version: 1.1.0.0
CodeBase: file://ktkrs166/PCC/bin/PROD/AxInterop.SHDocVw.DLL
----------------------------------------
System.Data
Assembly-Version: 1.0.5000.0
Win32-Version: 1.1.4322.2032
CodeBase: file:///c:/winnt/assembly/gac/system.data/1.0.5000.0__b77a5c561934e089/system.data.dll
----------------------------------------
System.Xml
Assembly-Version: 1.0.5000.0
Win32-Version: 1.1.4322.2032
CodeBase: file:///c:/winnt/assembly/gac/system.xml/1.0.5000.0__b77a5c561934e089/system.xml.dll
----------------------------------------
Interop.PdfLib
Assembly-Version: 1.3.0.0
Win32-Version: 1.3.0.0
CodeBase: file://ktkrs166/PCC/bin/PROD/Interop.PdfLib.DLL
----------------------------------------
System.resources
Assembly-Version: 1.0.5000.0
Win32-Version: 1.1.4322.573
CodeBase: file:///c:/winnt/assembly/gac/system.resources/1.0.5000.0_de_b77a5c561934e089/system.resources.dll
----------------------------------------
Accessibility
Assembly-Version: 1.0.5000.0
Win32-Version: 1.1.4322.573
CodeBase: file:///c:/winnt/assembly/gac/accessibility/1.0.5000.0__b03f5f7f11d50a3a/accessibility.dll
----------------------------------------
Interop.SHDocVw
Assembly-Version: 1.1.0.0
Win32-Version: 1.1.0.0
CodeBase: file://ktkrs166/PCC/bin/PROD/Interop.SHDocVw.DLL
----------------------------------------
System.EnterpriseServices
Assembly-Version: 1.0.5000.0
Win32-Version: 1.1.4322.2032
CodeBase: file:///c:/winnt/assembly/gac/system.enterpriseservices/1.0.5000.0__b03f5f7f11d50a3a/system.enterpriseservices.dll
----------------------------------------
System.Data.resources
Assembly-Version: 1.0.5000.0
Win32-Version: 1.1.4322.573
CodeBase: file:///c:/winnt/assembly/gac/system.data.resources/1.0.5000.0_de_b77a5c561934e089/system.data.resources.dll
----------------------------------------
System.Windows.Forms.resources
Assembly-Version: 1.0.5000.0
Win32-Version: 1.1.4322.573
CodeBase: file:///c:/winnt/assembly/gac/system.windows.forms.resources/1.0.5000.0_de_b77a5c561934e089/system.windows.forms.resources.dll
----------------------------------------
************** JIT-Debugging **************
To aktivate the JIT debugging you have to define the jitdebugging
value in the part sstem.windows.forms in the config file of the
application or of the computer (machine.config).
The Application must be compiled with activated debugging.
e.g.:
<configuration>
<system.windows.forms jitDebugging="true" />
</configuration>

If JIT dedugging is activated all exeptions will be send to the JIT
debugger, that is registered on the computer, and will not be handeled
of this dialogue window.

MY QUESTION:
Howto realize that the user can KILL or CLOSE or however the acrobat
process?
Jul 21 '05 #1
0 3182

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by craig | last post: by
3 posts views Thread by pattanawadee | last post: by
6 posts views Thread by Matthew Wieder | last post: by
reply views Thread by Darren Mart via DotNetMonster.com | last post: by
reply views Thread by Markus Poehler | last post: by
4 posts views Thread by =?Utf-8?B?VkIgSm9ubmll?= | last post: by
reply views Thread by Saiars | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.