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.GetProc esses
If LCase(p.Process Name) = "acrord32" Then
'p.Kill()
'p.Close()
End If
Next
The error:
************** Exeption: **************
System.Componen tModel.Win32Exc eption: Zugriff verweigert [<= Access
Denied!]
at System.Diagnost ics.ProcessMana ger.OpenProcess (Int32 processId,
Int32 access, Boolean throwIfExited)
at System.Diagnost ics.NtProcessMa nager.GetModule Infos(Int32 processId)
at System.Diagnost ics.Process.get _Modules()
at System.Diagnost ics.Process.get _MainModule()
at System.Diagnost ics.Process.get _ProcessName()
at WindowsApplicat ion1.Form2.Kill Acrobat() in
D:\PCCViewer_mp _20050112\Form2 .vb:line 1693
at WindowsApplicat ion1.Form2.setD efaultPRN(Strin g argPrinter) in
D:\PCCViewer_mp _20050112\Form2 .vb:line 2100
at WindowsApplicat ion1.Form2.btn_ printOn_Click(O bject sender,
EventArgs e) in D:\PCCViewer_mp _20050112\Form2 .vb:line 2153
at System.Windows. Forms.Control.O nClick(EventArg s e)
at System.Windows. Forms.Button.On Click(EventArgs e)
at System.Windows. Forms.Button.On MouseUp(MouseEv entArgs mevent)
at System.Windows. Forms.Control.W mMouseUp(Messag e& m, MouseButtons
button, Int32 clicks)
at System.Windows. Forms.Control.W ndProc(Message& m)
at System.Windows. Forms.ButtonBas e.WndProc(Messa ge& m)
at System.Windows. Forms.Button.Wn dProc(Message& m)
at System.Windows. Forms.ControlNa tiveWindow.OnMe ssage(Message& m)
at System.Windows. Forms.ControlNa tiveWindow.WndP roc(Message& m)
at System.Windows. Forms.NativeWin dow.Callback(In tPtr 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.resour ces
Assembly-Version: 1.0.5000.0
Win32-Version: 1.1.4322.573
CodeBase: file:///c:/winnt/assembly/gac/mscorlib.resour ces/1.0.5000.0_de_b 77a5c561934e089/mscorlib.resour ces.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__b77 a5c561934e089/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__b03 f5f7f11d50a3a/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__b77 a5c561934e089/system.windows. forms.dll
----------------------------------------
Microsoft.Visua lBasic
Assembly-Version: 7.0.5000.0
Win32-Version: 7.10.6001.4
CodeBase: file:///c:/winnt/assembly/gac/microsoft.visua lbasic/7.0.5000.0__b03 f5f7f11d50a3a/microsoft.visua lbasic.dll
----------------------------------------
AxInterop.PdfLi b
Assembly-Version: 1.3.0.0
Win32-Version: 1.3.0.0
CodeBase: file://ktkrs166/PCC/bin/PROD/AxInterop.PdfLi b.DLL
----------------------------------------
AxInterop.SHDoc Vw
Assembly-Version: 1.1.0.0
Win32-Version: 1.1.0.0
CodeBase: file://ktkrs166/PCC/bin/PROD/AxInterop.SHDoc Vw.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__b77 a5c561934e089/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__b77 a5c561934e089/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.resource s
Assembly-Version: 1.0.5000.0
Win32-Version: 1.1.4322.573
CodeBase: file:///c:/winnt/assembly/gac/system.resource s/1.0.5000.0_de_b 77a5c561934e089/system.resource s.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__b03 f5f7f11d50a3a/accessibility.d ll
----------------------------------------
Interop.SHDocVw
Assembly-Version: 1.1.0.0
Win32-Version: 1.1.0.0
CodeBase: file://ktkrs166/PCC/bin/PROD/Interop.SHDocVw .DLL
----------------------------------------
System.Enterpri seServices
Assembly-Version: 1.0.5000.0
Win32-Version: 1.1.4322.2032
CodeBase: file:///c:/winnt/assembly/gac/system.enterpri seservices/1.0.5000.0__b03 f5f7f11d50a3a/system.enterpri seservices.dll
----------------------------------------
System.Data.res ources
Assembly-Version: 1.0.5000.0
Win32-Version: 1.1.4322.573
CodeBase: file:///c:/winnt/assembly/gac/system.data.res ources/1.0.5000.0_de_b 77a5c561934e089/system.data.res ources.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_b 77a5c561934e089/system.windows. forms.resources .dll
----------------------------------------
************** JIT-Debugging **************
To aktivate the JIT debugging you have to define the jitdebugging
value in the part sstem.windows.f orms in the config file of the
application or of the computer (machine.config ).
The Application must be compiled with activated debugging.
e.g.:
<configuratio n>
<system.windows .forms jitDebugging="t rue" />
</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?