Problem in Windows 7

Hello experts:

I've spent 2 days trying to solve this problem. I have a legacy application that writes to the Registry.
If I run it from the C:\My folder\LEGACY.EXE it runs fine.
but if I run it from C:\PROGRAM FILES\APPLICATION\LEGACY.EXE, it does not work.
What difference is there between running it from the c:\ vs the c:\Program Files

Who is Participating?
LeeTutorConnect With a Mentor retiredCommented:
I don't have any idea why running from another folder off the root directory would work, but this page explains the changes to Windows Vista and Win7 which are causing your problem:
aleghartConnect With a Mentor Commented:
c:\Program Files is not normally write-enabled for applications.  Newer applications write to AppData hidden folder.

Legacy apps write to files in the program directory.

Have you tried running it in compatibility mode for WinXP?  Right-click the program > Properties > Compatibility
lancerxeAuthor Commented:
Yes I have tried running with the compatibility and it still did not work.
I may have to rewrite the legacy application.
The 14th Annual Expert Award Winners

The results are in! Meet the top members of our 2017 Expert Awards. Congratulations to all who qualified!

Or alter rights on that folder so users can write to it.  Not ideal, but it's an alternative.
wantabe2Connect With a Mentor Commented:
try turning user access controll off, reboot, then try running it again.
lancerxe, any feedback?
lancerxeAuthor Commented:
I was able to find the source code and debug the application and it generated this message.
Login failed for user: The user is not associated with a trusted  SQL sever connection.

The user id I'm using is sa and the password looks correct. This application worked fine in windows xp.

lancerxeAuthor Commented:
Added a new login and password and it still fails.
lancerxeAuthor Commented:
Ended up recompiling the application using VS 2005.

Thanks for everyone's help.
All Courses

From novice to tech pro — start learning today.