相关文章推荐
*disclaimer - didn't know what group to post this in so I am placing it in software.  At mods if there's a better location please feel free move my post, thanks!*
Hello spiceheads, I am in no way a programmer nor know any programming language, this post wouldn't even be considered a n00b post so please bear with me.

There's a home-brew document management application that was built years ago by some programmer at my place of work.  This application works fine on 2008R2 remote desktop servers, when I try to run this application on a desktop running Windows 7 or 8.1 it doesn't run properly.  Either I am missing some dotnet or vb redistributable package or just a single file somewhere that's missing from the desktop
Before I paste the error, let me explain a litte of what it does.  Application is an exe located in a network share drive which users have the shortcut on their desktops.  The user runs the shortcut and application window opens.  User enters an application number in a search box, the applications looks up this number on a network share (it will find a folder that has the application number) and it returns whatever PDF's have been saved into that folder.  The application lists the pdf's but when you double click on the PDF to view it an error pops up.  With my limited knowledge I saw that it's looking for .net 2.0.50727 but when I look at installed applications I see v4 and in add features the dotnet option (I think it's 3 in win7) is already checked.  I've read articles that says that various versions are already preinstalled in the os and that's why I dont see them listed.
Either way, I am at a loss and I would like to run his hateful little home-brew application on desktops so I can get rid of those remote desktop servers >:-[
==============================
See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.IO.FileNotFoundException: File not found.
at Microsoft.VisualBasic.Interaction.Shell(String PathName, AppWinStyle Style, Boolean Wait, Int32 Timeout)
at DocumentManagementSystem.frmViewer.ctrDocumentList_DoubleClick(Object sender, EventArgs e)
at System.Windows.Forms.Control.OnDoubleClick(EventArgs e)
at System.Windows.Forms.TreeView.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


************** Loaded Assemblies **************
mscorlib
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.5485 (Win7SP1GDR.050727-5400)
CodeBase: file:/ Opens a new window / / C:/ Windows/ Microsoft.NET/ Framework64/ v2.0.50727/ mscorlib.dll
----------------------------------------
DocumentManagementSystem
Assembly Version: 1.0.0.0
Win32 Version: 1.0.0.0
CodeBase: file:/ Opens a new window / domain.local/ share/ Applications/ Document%20Management%20System/ DocumentManagementSystem.exe
----------------------------------------
System.Configuration
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.5483 (Win7SP1GDR.050727-5400)
CodeBase: file:/ Opens a new window / / C:/ Windows/ assembly/ GAC_MSIL/ System.Configuration/ 2.0.0.0__b03f5f7f11d50a3a/ System.Configuration.dll
----------------------------------------
System
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.8686 (QFE.050727-8600)
CodeBase: file:/ Opens a new window / / C:/ Windows/ assembly/ GAC_MSIL/ System/ 2.0.0.0__b77a5c561934e089/ System.dll
----------------------------------------
System.Xml
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.5494 (Win7SP1GDR.050727-5400)
CodeBase: file:/ Opens a new window / / C:/ Windows/ assembly/ GAC_MSIL/ System.Xml/ 2.0.0.0__b77a5c561934e089/ System.Xml.dll
----------------------------------------
System.Drawing
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.5495 (Win7SP1GDR.050727-5400)
CodeBase: file:/ Opens a new window / / C:/ Windows/ assembly/ GAC_MSIL/ System.Drawing/ 2.0.0.0__b03f5f7f11d50a3a/ System.Drawing.dll
----------------------------------------
System.Windows.Forms
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.5491 (Win7SP1GDR.050727-5400)
CodeBase: file:/ Opens a new window / / C:/ Windows/ assembly/ GAC_MSIL/ System.Windows.Forms/ 2.0.0.0__b77a5c561934e089/ System.Windows.Forms.dll
----------------------------------------
Microsoft.VisualBasic
Assembly Version: 8.0.0.0
Win32 Version: 8.0.50727.5483 (Win7SP1GDR.050727-5400)
CodeBase: file:/ Opens a new window / / C:/ Windows/ assembly/ GAC_MSIL/ Microsoft.VisualBasic/ 8.0.0.0__b03f5f7f11d50a3a/ Microsoft.VisualBasic.dll
----------------------------------------
ADODB
Assembly Version: 7.0.3300.0
Win32 Version: 7.10.2346
CodeBase: file:/ Opens a new window / / C:/ Windows/ assembly/ GAC/ ADODB/ 7.0.3300.0__b03f5f7f11d50a3a/ ADODB.dll
----------------------------------------
System.Web
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.5491 (Win7SP1GDR.050727-5400)
CodeBase: file:/ Opens a new window / / C:/ Windows/ assembly/ GAC_64/ System.Web/ 2.0.0.0__b03f5f7f11d50a3a/ System.Web.dll
----------------------------------------

************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.

For example:

<configuration>
<system.windows.forms jitDebugging="true" />
</configuration>

When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.
==============================
Thanks and hope that this info actually makes sense to someone.

You're missing something in the configuration of the application.  Is there an <application>.config or <application>.exe.manifest file in the folder with the application on the server?  If so open those in Notepad (they're both text files) and see what files & folders this application is looking for.

The file that's actually missing would be listed as the first parameter to the Shell.Execute() function that's throwing the error.

You're missing something in the configuration of the application.  Is there an <application>.config or <application>.exe.manifest file in the folder with the application on the server?  If so open those in Notepad (they're both text files) and see what files & folders this application is looking for.

The file that's actually missing would be listed as the first parameter to the Shell.Execute() function that's throwing the error.

Other than the exe file there's a .config file within the folder of the application, this is what's in there:

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<appSettings>
<add key="DocumentManagementSystemDatabaseConnectionString" value="Driver={SQL Server};Server=DBSERVER;DataBase=DocumentManagementSystem;Trusted_Connection=Yes;"/>

<add key="AdobeAcrobatViewerPath" value="C:\Program Files (x86)\Adobe\Reader 11.0\Reader\AcroRd32.exe"/>
<add key="SystemName" value="Document Manangement System"/>
</appSettings>
</configuration>

So after looking this file the problem was the version of PDF editor that was installed.  I am on a test system that had nitro installed, I changed the AdobeAcrobatViewerPath to the path of nitro but it would crash.  I installed Acrobat Reader DC, changed the path to DC and now the program works.  You're seeing ACrobat 11 because that's what is installed on remote desktop servers running this home-brew program.

I suppose it's hard coded to work with Acrobat reader only?  There's nothing I can do unless I have original code and have someone with programming language to be able to recompile and upgrade the pdf viewer or give us ability to use non-adobe viewers.

I'm glad you found it.  Adobe has a programming API that this application might be using but this API requires Adobe Acrobat or Adobe Acrobat Reader be installed on the system.  The fact that this program is executing this API and not just doing a shell.execute on the PDF file is why you couldn't use Nitro as a replacement.

Mike400 wrote:

I'm glad you found it.  Adobe has a programming API that this application might be using but this API requires Adobe Acrobat or Adobe Acrobat Reader be installed on the system.  The fact that this program is executing this API and not just doing a shell.execute on the PDF file is why you couldn't use Nitro as a replacement.

so bottom line, crappy programming :/   in my opinion the developer should've used the shell execute instead of hard coding acrobat in there.

Now I was able to change the path to acrobat pro path, but I can't seem to add another line so the program has the ability to use a mix of adobe versions.  Would this be possible on this config file?

Mike400 wrote:

I'm glad you found it.  Adobe has a programming API that this application might be using but this API requires Adobe Acrobat or Adobe Acrobat Reader be installed on the system.  The fact that this program is executing this API and not just doing a shell.execute on the PDF file is why you couldn't use Nitro as a replacement.

so bottom line, crappy programming :/   in my opinion the developer should've used the shell execute instead of hard coding acrobat in there.

Now I was able to change the path to acrobat pro path, but I can't seem to add another line so the program has the ability to use a mix of adobe versions.  Would this be possible on this config file?  I agree with crappy programming.  Unfortunately without the source code and development environment you won't be able to fix this.

Mike400 wrote:

I'm glad you found it.  Adobe has a programming API that this application might be using but this API requires Adobe Acrobat or Adobe Acrobat Reader be installed on the system.  The fact that this program is executing this API and not just doing a shell.execute on the PDF file is why you couldn't use Nitro as a replacement.

so bottom line, crappy programming :/   in my opinion the developer should've used the shell execute instead of hard coding acrobat in there.

Now I was able to change the path to acrobat pro path, but I can't seem to add another line so the program has the ability to use a mix of adobe versions.  Would this be possible on this config file?  I agree with crappy programming.  Unfortunately without the source code and development environment you won't be able to fix this.
sorry to ask again, but even without the source code I could not even be able to add additional lines in the config file to use different versions of adobe, be it reader or pro?

Mike400 wrote:

I'm glad you found it.  Adobe has a programming API that this application might be using but this API requires Adobe Acrobat or Adobe Acrobat Reader be installed on the system.  The fact that this program is executing this API and not just doing a shell.execute on the PDF file is why you couldn't use Nitro as a replacement.

so bottom line, crappy programming :/   in my opinion the developer should've used the shell execute instead of hard coding acrobat in there.

Now I was able to change the path to acrobat pro path, but I can't seem to add another line so the program has the ability to use a mix of adobe versions.  Would this be possible on this config file?  I agree with crappy programming.  Unfortunately without the source code and development environment you won't be able to fix this.
sorry to ask again, but even without the source code I could not even be able to add additional lines in the config file to use different versions of adobe, be it reader or pro?

Correct.

Read these next...

  • Curated Server Hard Drive setup

    Server Hard Drive setup

    Windows

    I have a new server with 4 hard drives.  Previously I would setup a RAID 5 and then a c: drive for the OS and then a second drive letter for the data.  I was wondering if this is still necessary or can I just put everything on the c: drive.  I don't have ...

  • Curated Pay Rate and Negotiation with Recruiting Firms

    Pay Rate and Negotiation with Recruiting Firms

    IT & Tech Careers

    I recently obtained a job through a recruiting agency. I wasn't aware of the pay rate until my manager showed me the pay rate at work.The company I'm working for is paying the recruiting agency Robert Half $70 an hour and they are paying me $38 an hour.I ...

  • Curated Spark! Pro Series - 12 September 2023

    Spark! Pro Series - 12 September 2023

    Spiceworks Originals

    490 BC – Traditional date of the Battle of Marathon, where a small Athenian force defeats the Persian Empire 1755 – Giacomo Casanova is sentenced to 5 years imprisonment in Ven...

  • Curated Support ending for M365 apps on Windows Server 2019 and 2022 - opinions?

    Support ending for M365 apps on Windows Server 2019 and 2022 - opinions?

    Windows

    You may (or may not) be aware that Microsoft are ending support for M365 apps running on Windows Server 2019 and 2022.M365 app support will end for Server 2019 in October 2025 and for Server 2022 in October 2026.I imagine most/a lot of businesses that use...

  • Curated Convert MBR to GPT on File Server

    Convert MBR to GPT on File Server

    Windows

    Has anyone done an MBR to GPT partition conversion on a file server?I see lots of threads about doing this in general, but my question is if the conversation process will reset all the File ACL and Share configurations?  Thanks

  •  
    推荐文章