问题标签 [virtualstore]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
1 回答
234 浏览

c# - C# Form App 不在 Win 7 Virtual Store 中写入

我有一个在 VS 2012 中创建的 Winfom 应用程序,只有一个调用下面代码的按钮。如果我以管理员模式(以管理员身份运行)运行应用程序,则可以创建文件夹。但是在非管理员模式下(在资源管理器中双击exe),它总是弹出标准的“访问路径'C:\ Program Files(x86)\ DirTest'被拒绝”错误。

我的疑问是,为什么在非管理员模式下运行应用程序时不写入 Win 7 虚拟商店,缺少什么?

0 投票
1 回答
747 浏览

inno-setup - 获取虚拟商店路径?

我正在安装一个应用程序并想为一个 ini 文件设置值。不幸的是,我们的主应用程序仍然构建在一个被重定向到虚拟商店的平台上。有没有办法让 Inno Setup 直接将 ini 文件存储在虚拟存储中?

0 投票
1 回答
342 浏览

registry - HKEY_LOCAL_MACHINE for all users, no Virtual Store

I have an application that has some settings in the registry that I only want the administrator, or administrator privileges to update them. As of right now, I have it on HKLM, but if I open the application as a regular user it goes over to its VirtualStore HKCU/../../VirtualSture instead of HKLM/Software/AppName/..

Is there a way to change this? Or is there a work-around?

Thanks.

0 投票
1 回答
308 浏览

wix - Wix 工具集与 InstallShield - VirtualStore 访问

我使用 VS2010 开发了一个应用程序,并使用 IS Limited Edition 进行了设置部署。该应用程序在 XML 文件中提供一些数据,该文件安装在同一文件夹中。如果应用程序在 XML 文件中进行更改,则会将其保存在 virtualStore 中。

我现在使用 VS2015 和 Wix 工具集。该应用程序可以编译,我可以编写一个 WXS 文件。新构建的 MSI 安装应用程序,一切似乎都很好。但现在应用程序无法访问 XML 文件。访问被拒绝。我试图将 MSI 与 Orca 进行比较,但没有看到明显的东西。我不确定这是设置问题还是应用程序本身的问题。

编辑

如果我在新安装中复制“旧”EXE 文件,应用程序可以访问 XML 文件。

感谢您的帮助和提示

0 投票
2 回答
2602 浏览

c# - 如何跳过 VirtualStore 并读取 Program Files 文件夹中的文件?

我在 Windows 10 PC 上有 ac# 应用程序。安装文件夹 (C:\Program Files (x86)\xxx) 中有我想阅读的设置文件,但除非用户具有管理员访问权限,否则不能编辑。问题是 Windows 正在将这些设置文件复制到 VirtualStore 并将所有读取重定向到那里 - 而以管理员身份运行的同一应用程序会看到 Program Files 文件夹中的原始设置文件。

我的问题:有没有办法让应用程序看到程序文件中的原始文件,即使不是以管理员身份运行?我只想阅读它们,而不是编辑它们。

0 投票
2 回答
577 浏览

c - GetPrivateProfileString 和 AppData VirtualStore 目录

我有一个GetPrivateProfileString从文件“.\abcd.ini”中读取的程序——即它将在当前目录中查找ini 文件。如果没有找到 ini 文件,则在第三个参数中将默认值设置为GetPrivateProfileString.

我有一个将程序安装到c:\program files (x86)\abcd\client目录的安装程序。

最初,安装程序还在同一目录中安装了一个带有特定配置文件字符串键/值对的 abcd.ini 文件。发布后,我将安装程序更改为不安装任何 ini 文件。

然而,程序继续从我提供的旧 ini 文件中获取值,即使该目录中不存在它。

在进行系统范围的搜索后,我发现了 abcd.ini 的副本c:\Users\myusername\AppData\Local\VirtualStore\Program Files (x86)\abcd\Client

一旦我删除它,程序就可以正常工作(好像没有 ini 文件一样)。

谷歌搜索似乎使用了虚拟存储,因为 myuser 没有 c:\program 文件(x86)的完全权限。但是,程序本身不会写入 ini 文件,它只会从中读取。

这真的是它应该的样子吗?为什么将ini文件复制到AppData&如果没有本地副本,为什么程序会从那里读取?

我在 Windows 10 64 位。

0 投票
0 回答
160 浏览

visual-studio-2012 - 32 位系统上的安装程序将文件保存到 Windows 10 中的虚拟存储

我已更新旧安装程序以在 Windows 10 上运行。该程序可以在 64 位系统上正确安装,但不能在 32 位系统上正确安装。这些文件最终位于“C:\users\etc....\appdata\local\virtual store”而不是我指定的路径。有谁知道为什么会这样?

0 投票
0 回答
181 浏览

c# - C# .NET VS 安装项目,添加到 Program Files (x86) 的文件在用户切换后消失

我有一个 C# .NET 项目和一个 VS 安装项目来安装它。在 C# .NET 项目中,我有 System.Configuration.Install.Installer 子类。Installer 子类需要在“c:\Program Files (x86)\AppName”文件夹中写入一个文件,该文件将包含安装程序中要求的参数的内容。在用户决定注销并且另一个用户登录之前,这一切都很好。然后文件消失,程序不工作。我需要将该文件永久保存在应用程序的 Program Files (x86) 文件夹中,并且不应将其删除。

我读到这与 Windows Vista 有关,后来有一个称为程序文件虚拟存储的东西,但我不明白如何绕过它,所以我可以真正将文件放在那里。在大多数情况下,存储在此目录中是不正确的,但在这种情况下,我确实需要。这是在安装程序中进行的设置,应该在那里。这是正确的地方。

下面是Installer类的代码

编辑:现在我发现了一些我以前没有注意到的东西。好像当我登录到其他用户时,安装程​​序在 login 后立即再次执行,但这次没有 Context.Parameters["ActivationCode"] 。这是预期的吗?什么是实际启动安装程序?它对每个用户都这样做吗?由于它失败了,我猜它会回滚并删除文件。

0 投票
0 回答
29 浏览

virtualstore - I use an old editor which writes information to the VirtualStore but still reads from Program Files (x86)

I use an old editor which originally was designed to save its state on exit into a few files in its installation directory under c:\Program Files (x86)...

Clearly it can't do that now, so Windows 10 redirects those files to be written in the relevant VirtualStore location. However when I restart the editor it reads that information from the c:\Program Files (x86)... area.

How do I get it to look in the VirtualStore location? The editor won't have an option for that as VirtualStore never existed when it was released.

0 投票
0 回答
34 浏览

windows - What rights to assign during installation time to avoid 'Unable to write to' error message related to Windows VirutalStore?

I have leagcy Windows program (written in Delphi 2009, that uses Rx TFormStorage component), that tries to write ini file into Windows directory. Of course, Windows 10 does not allow it, instead, Windows 10 writes and reads this ini file from the C:\Users\\AppData\Local\VirtualStore\Windows directory. It works normally, however, sometimes the users receive error message 'Unable to write to'.

Why is that? For all that Windows is not required to give access to C:/Windows, it should redirect the user to the VirtualStore but why this redirection gives such error meesage? As I understand, then users are not required to have special rights to write and read in VirtualStore directory even it is VirtualStore/Windows directory?

So, why there is this error message and what user rights can I grant to the end user in my InnoSetup installation script (which is run with Administrator privileges) with the aim to get rid of the error message 'Unable to write to'?

https://answers.microsoft.com/en-us/windows/forum/all/files-going-to-cwindows-instead-of-virtualstore/f230007b-892d-47b4-a569-627929231f8b