Skip to main content
ChrisM882
Participant
April 11, 2018
Question

Problems opening documents as admin

  • April 11, 2018
  • 1 reply
  • 796 views

Hello, I currently have the following problem:

I have a simple test program (VB6), which should open only by ShellExecute command an existing PDF document with the Acrobat Reader. This works without problems. But if you have the program e.g. renamed in update.exe and thus the program is run automatically as an administrator, the Adobe Reader is no longer started correctly. Although two reader processes open, the program hangs and the document is not opened.

For me it looks like a bug, also because other PDF viewers do not have this problem.
I was able to detect this behavior on different systems and is not an isolated case. Since this problem prevents the operation of our software, I would be very happy about a short-term solution.

Thanks in advance.

Windows 10

Acrobat Reader DC (2018.011.20038)

Sourcecode:

Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long

 

Private Sub Command1_Click()

   ShellExecute Me.hwnd, "open", "c:\test.pdf", "", "", 1

End Sub

    This topic has been closed for replies.

    1 reply

    cHi-aLi
    Participant
    May 7, 2018

    I have exactly the same problem.

    However If I have opend the Acrobat Reader DC, then the ShellExecute Me.hwnd, "open", "c:\test.pdf", "", "", 1 command works fine, and the file open in a new tab, otherwise, the two reader processes open and the acrobat reader dc not get opned.

    Thanks in advance.