0

I created a VB.net application that, among other things, uses two DLLs to update the firmware on a microprocessor. It works perfectly during debugging.

To distribute it, I used InstallShield LE to create an installer. If I install the program and run from the Start Menu or Desktop icon, the program works - except for that part that uses the DLLs... that fails part of the way through.

The kicker is that if I go to C:\Program Files (x86)\programName\ and run the .exe from there everything works perfectly.

When I run from the shortcuts or from the actual directory and go to Task Manager and view the process properties, it lists the same directory. So I am under the assumption that the shortcuts are properly referencing the correct location.

So, how can running from a shortcut affect the running of the .exe?!

Thank you for your help. -Mschmidtbauer

MSchmidtbauer
  • 243
  • 1
  • 2
  • 4
  • Did you set the working directory in the shortcut? – Rob P. Jan 28 '16 at 19:52
  • I think so... I have the "Target" set to Advertised Shortcut to [INSTALLDIR]ProgramName.Primary output. If that was incorrect wouldn't the information in process manager show the path for the running process as different that the .exe in the Program Files folder? – MSchmidtbauer Jan 28 '16 at 20:47
  • 1
    The working directory is not the same as executable path. I guess the DLL-files you are using are located in the program installation folder. I also guess you do access these with a relative path, and not absolute (c:\xxx\yyy ...). I would suggest that you switch to using absolute path. The directory of your executable can be found with Application.Startuppath (if I'm not remembering wrong). – LinusN Jan 28 '16 at 23:07
  • I think that it is finding the appropriate Dlls. If I rename either one of them, the application will notify me that it cannot locate it. So, I don't know how this is a directory issue. If I were to change the working directory, as you mention, where would that be? Under the InstallShield Project or my application VB.net project? I don't see a optioni to change it (unless you mean the – MSchmidtbauer Feb 04 '16 at 19:05

0 Answers0