Click here to Skip to main content
16,022,798 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
Dear All,
I have created exe file in vs2008 with Windows XP,but its not working in windows7
Posted
Comments
[no name] 9-Jan-13 7:37am    
Sorry, but my crystal ball has gone all cloudy so I cannot see what is happening!

Please think about your problem, explain exactly what your program is doing and what results you are seeing. If you are not seeing any results then use your debugger to diagnose where it is going wrong.
Sergey Alexandrovich Kryukov 9-Jan-13 10:40am    
You are right, but there is one most typical reason which covers most of the developer's mistakes manifested by Windows 7. Please see my answer.
—SA
ZurdoDev 9-Jan-13 8:30am    
Why isn't it working in windows7?
Sergey Alexandrovich Kryukov 9-Jan-13 10:40am    
Who knows, but there is one most typical reason which covers most of the developer's mistakes manifested by Windows 7. Please see my answer.
—SA
Sandeep Mewara 9-Jan-13 8:52am    
Please elaborate.

1 solution

One of the most typical reasons is the protection of the file system.

People often use some illegal file path names. Strictly speaking, such applications are incorrect in first place, but XP is tolerant to such mistakes, but Windows 7 is strict.

You can of cause recommend the users to provide proper access rights for the directories you use, and everything will work, but this is not a solution. Basically, there are no situations where any hard-coded file path can be useful. You need to calculate those paths based on system configuration or application location. I provided full information in my past answers:

Entry assembly: How to find my programs directory[^],
"special folders", working directories: How to find my programs directory[^].

—SA
 
Share this answer
 
Comments
fjdiewornncalwe 9-Jan-13 10:52am    
+5. Logical.
Sergey Alexandrovich Kryukov 9-Jan-13 11:38am    
Thank you, Marcus.
—SA
Jibesh 9-Jan-13 19:36pm    
I agreed but there can be thousands of other reasons too.Also agreed OP didnt give any other clue about his problem so.I am 50-50 with this solution. not convinced yet. well wait for OPs reaction for others question.

If the above solution solved his problem then I would say you read starters mind.
Sergey Alexandrovich Kryukov 9-Jan-13 19:40pm    
That's true, but most of CodeProject experience around the inquirers' complains "not working on Windows 7" is reduced to this single reason. You don't have to be convinced: this is the most fruitful attempt to address this problem so far, which should be checked anyway, even if there are other problems. Isn't that fair enough?
—SA
Jibesh 9-Jan-13 19:47pm    
"but most of CodeProject experience around the inquirers' complains "not working on Windows 7" is reduced to this single reason."
If this was the case then its fair enough.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900