32 位 cmd.exe 如何在 Windows Server 2003 x64 上启动 64 位 cmd.exe? [英] How can a 32-bit cmd.exe launch a 64-bit cmd.exe on Windows Server 2003 x64?

查看:51
本文介绍了32 位 cmd.exe 如何在 Windows Server 2003 x64 上启动 64 位 cmd.exe?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是 64 位 Windows Server 2008 上的 7-Zip 执行权限.

我试图避免使用过于复杂的构建过程来制作多个 7-Zip EXE 文件.在阅读了一些 64 位注册表项后,我只需要一个 .cmd 来启动我的 Java 进程.但是,要成功处理单个 EXE 文件,它需要是 32 位的.

上述问题找到了一个让 Windows Server 2008 检测 32 位 cmd.exe 并将其交换为 64 位的技巧.有没有办法在 Windows Server 2003 上做到这一点?有一个 Windows 修补程序允许 reg.exe 在 32 位模式下访问 64 位条目,但我不能确定它在客户的服务器上,因此无法解决.

解决方案

要从 32 位 cmd.exe 启动 64 位 cmd.exe,您必须能够访问 c:WindowsSystem32 文件夹而不会被重定向到 c:WindowsSysWow64 文件夹.在 Win2008 中,您可以通过访问 c:WindowsSysnative 路径来实现这一点.不幸的是,在 Win2003 上需要修补程序(请参阅 http://support.microsoft.com/kb/942589)..>

有一个解决方法 - 您可以创建一个指向 c:WindowsSystem32 文件夹的 NTFS 连接点,并使用该连接点的路径而不是 c:WindowsSystem32.使用 System Internals 的 junction.exe 我设法从 32 位 cmd.exe 创建了这样一个连接点并启动 64 位 cmd.exe.

This is a follow up to 7-Zip execution permissions on Windows Server 2008 64-bit.

I'm trying to avoid having an overly complicated build process to make multiple 7-Zip EXE files. I just need a .cmd to kick off my Java process after reading some 64-bit registry entries. However, to succeed with a single EXE file, it needs to be 32 bit.

The above question found a trick for getting Windows Server 2008 to detect a 32 bit cmd.exe and swap it to 64 bit. Is there a way to do this on Windows Server 2003? There's a Windows hotfix that allows reg.exe to access 64-bit entries in 32-bit mode, but I can't be assured that's on the customer's server so that workaround is a no go.

解决方案

To launch 64-bit cmd.exe from 32-bit cmd.exe you must be able to access c:WindowsSystem32 folder without being redirected to c:WindowsSysWow64 folder. In Win2008 you can achieve this by accessing c:WindowsSysnative path. Unfortunately on Win2003 a hotfix is required (see http://support.microsoft.com/kb/942589).

There is a workaround - you can create an NTFS junction point that directs to c:WindowsSystem32 folder and use path to that junction point instead of c:WindowsSystem32. Using System Internals' junction.exe I managed to create such a junction point from 32-bit cmd.exe and launch 64-bit cmd.exe.

这篇关于32 位 cmd.exe 如何在 Windows Server 2003 x64 上启动 64 位 cmd.exe?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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