如何修改XP 32位程序在Win7 32bit中工作 [英] How to modify an XP 32bit program to work in Win7 32bit

查看:74
本文介绍了如何修改XP 32位程序在Win7 32bit中工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好....

我有一个由其他人编写的程序。它在XP 32位工作,现在我有Win 7 32位它将启动,显示程序窗口但是点击开始按钮时不做任何其他操作它有按钮。兼容性并以管理员身份运行无济于事。

也许这里有人可以进行修改?如果是这样我可以给你程序链接并解释它应该做什么。

谢谢!

我很感激!

Val

Hi all....
I have a program written by somebody else.It worked in XP 32 bit , now I have Win 7 32 bit and it will start,showing the program window but not do anything else when I click the "Go" button it has. Compatability and run as administrator does not help.
Maybe somebody here can do the modifying?If so I can give you the program link and explain what it supposed to do.
Thanks!
I appreciate it!
Val

推荐答案

这个问题,如同制定,没有多大意义,因为你没有提供有关你的申请的任何信息。



同时,你可能遇到了一些真正存在的问题,可以使用一些帮助。我可以为您提供有关您可以从哪些方面开始的基本想法。首先,让我们快速考虑与程序中可能出现的错误无关的可能问题,所以让我们先考虑一下,关闭这部分问题。 XP不提供.NET,Windows 7与预装的.NET v.3.5捆绑在一起。您甚至没有报告哪个.NET版本是您的应用程序目标。如果您将其定位到v.4.0,4.5或4.6,并且它未安装在Windows 7上,则您的应用程序不起作用。这是一个微不足道的问题,但是1)您应该在发行说明中提供确切的系统要求,2)您在提出这些问题时确实需要指定目标版本,3)您可能希望分发所需的.NET版本你的应用程序(你有权这样做,.NET框架可以自由重新发布)。



如果这不是问题,如果你的应用程序确实是针对的x-86 32位(但我不知道为什么;在大多数情况下,CPU架构应该是AnyCPU,无论如何,你没有在你的问题中指明它),那么结论不是很令人愉快:你不要真的有一个应用程序,即使在XP上也能正常工作。如果是这样,你越早承认,越好。为XP编写的任何真正正确的应用程序都应该适用于Windows 7.但真正正确的是一些哲学问题。很可能,这样的应用程序无法在XP上使用某些不同的配置,甚至不能用于不同的用户。



为什么这很可能?因为存在一个最典型的问题:权限。在我解释权限注意事项之前,做一件简单的事情:使用提升的权限运行应用程序。如果它开始工作,问题实际上是权限。如果没有,它仍然可以是权限。请参阅:

https://en.wikipedia.org/wiki/User_Account_Control [< a href =https://en.wikipedia.org/wiki/User_Account_Controltarget =_ blanktitle =New Window> ^ ],

http:/ /4sysops.com/archives/vista%E2%80%99s-uac-8-ways-how-to-elevate-an-application-to-run-it-with-administrator-rights [ ^ ],

http://www.sevenforums.com/tutorials/11841-run-administrator.html [ ^ ]。



典型的mista kes是:错误的假设,某些文件或目录是可访问的,或者是应用程序中某些文件路径的硬编码。没有硬编码路径名可能有用的情况。在所有情况下(当然,在生产级应用程序中),路径名应在运行时根据可执行目录或每个用户配置的特殊目录或对所有用户,用户输入或某些配置文件计算。



另一个问题是异常处理。尽管应尽量减少异常处理,但不应留下任何未处理的异常。要处理它们,您需要至少在每个线程的顶部堆栈帧上处理它们。此外,你不应该忽视任何未处理的异常。应通过显示全面的异常信息和/或日志记录来报告任何异常行为,可能是可选的。不幸的是,许多营销人员试图向开发团队施加压力以隐瞒未处理的异常和其他未解决的问题,但我会称之为作弊。如果您无法访问客户的计算机,您仍然可以接受来自他们的问题报告,这有助于您维护产品。



-SA
The question, as formulated, make little sense, because you did not provide any information on your application.

At the same time, you probably faced some really existing problem and can use some help. I can give you basic ideas on what you can start with. First of all, let's quickly consider the possible issue that is not related to possible incorrectness in your program, so let's consider it first, to close this part of the issue. XP is not supplied with .NET, and Windows 7 is bundled with preinstalled .NET v.3.5. You did not even report which .NET version is your application target. If you targeted it to v.4.0, 4.5 or 4.6, and it wasn't installed on Windows 7, your application should not work. This is a trivial issue, but 1) you should provide exact system requirements in your Release Notes, 2) you really, really need to specify the target version when asking such questions, 3) you may want to distribute required version of .NET with your application (you have a right to do so, .NET framework is freely redistributable).

If this is not a problem, and if your application is really targeted to x-86 32-bit (but I have no idea why; in most cases, the CPU architecture should be "AnyCPU", anyway, you did not specify it in your question), then the conclusion is not very pleasing: you don't really have an application which works correctly even on XP. If so, the sooner you admit it, the better. Any really correct application written for XP should work on Windows 7. But what is "really correct" is somewhat philosophical question. It's very likely, that such application cannot work on XP with some different configuration or even for a different user.

Why it's very likely? Because there is one of the most typical problems: permissions. Before I explain permission considerations, do a simple thing: run the application with elevated permissions. If it starts working, the problem is really permissions. If not, it still can be permissions. Please see:
https://en.wikipedia.org/wiki/User_Account_Control[^],
http://4sysops.com/archives/vista%E2%80%99s-uac-8-ways-how-to-elevate-an-application-to-run-it-with-administrator-rights[^],
http://www.sevenforums.com/tutorials/11841-run-administrator.html[^].

The typical mistakes are: wrong assumption that some file or directory is accessible or hard-coding of some file paths in your application. There are no cases when hard-coded path names can be useful. In all cases (in production-grade applications, of course), path names should be calculated during runtime based on executable directory or special directories configured per user or "for all users", from user input or some configuration files.

Another problem is exception handling. Even though exception handling should be minimized, you should not leave any unhandled exceptions. To handle them all, you need to handle them all at least on the top stack frame of each thread. Moreover, you should never leave any unhandled exceptions unnoticed. Any abnormal behavior should be reported by displaying comprehensive exception information and/or logging, perhaps optional. Unfortunately, many marketing people try to press on development team to conceal unhandled exceptions and other unsolved problems, but I would call it cheating. If you have no access to the customers' computers, you still accept problem reports from them which helps you to maintain the product.

—SA


感谢Southmountain和Sergey向我提供建议。

这使我进入了这个页面,解决了我遇到的问题。

http://helpdeskgeek.com/windows-8/install-net-framework-3-5-3-0-2-0-on-windows-8/

祝圣诞快乐伙计们!

Val
Thanks to Southmountain and Sergey for giving me suggestions.
This led me to this page where the problem I had was solved.
http://helpdeskgeek.com/windows-8/install-net-framework-3-5-3-0-2-0-on-windows-8/
Have a Merry Christmas guys!
Val


你用什么语言写这个软件?



如果它是用C#编写的,可能针对较旧的.NET框架,如1.1,2.0。

因此您需要将app.config文件设置正确。请查看我的文章在C#上进行.NET版本控制和多目标定位应用程序和组件 [ ^ ]
what language do you use to write that software?

if it is written in C#, that may target to older .NET framework such as 1.1, 2.0.
so you need to put app.config file with right set up. please check out my article .NET versioning and multi-targeting on C# application and component[^]


这篇关于如何修改XP 32位程序在Win7 32bit中工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆