Results 1 to 20 of 290

Thread: How To Fix UAC and VirtualStore Problems

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Opifex
    Join Date
    Feb 2005
    Location
    New York, USA
    Posts
    15,154

    Default How To Fix UAC and VirtualStore Problems

    How To Remove Problems with
    the Vista/Windows 7 UAC and VirtualStore



    VirtualStore (or Virtual Store, for the less careful 'searchers' among us ) is an important feature in the Vista and Windows 7 operating systems. However, it often creates problems for a Med2 (or RTW) installation, because of having been released before Vista and Windows 7 came out, and thus not having been designed with this feature in mind. This post will outline how to prevent any further VirtualStore problems for your Med2 installation.


    How it works:

    VirtualStore creates what's called a "virtualization" -- a fictious presence of a file or a folder in some location, but its actual location being somewhere else. As a simple example, you will see that if you intend to regenerate your Med2 sound pack files, they will not appear in /data/sounds:



    And yet your game won't crash either. The sound files missing above will be generated -- in a hidden VirtualStore folder, deep within c:/User/AppData; AND, here is the kicker -- your game won't recognize that they were secretly moved. The operating system leaves invisible markers in the original folder, for the program to load the files from their new location, and continue working correctly (loading all the right sounds from the above generated sound files, not realizing that they're not even contained in its /data/sounds/ folder anymore).





    Why it's there:

    Although VirtualStore causes a lot of crashes for Med2, believe it or not it actually works as it is supposed to, and serves a worthwhile function. It is meant to be a good 'programming practice' for game designers (unfortunately Med2 and RTW were written before Vista's appearance). The reason it is there is this: to add an extra layer of protection for Program Files. With Vista and Windows 7, an attentive user will notice that some folders receive an extra layer of securiy, and Program Folders is one of them. To manually copy a folder into Program Files requires a special Administrative permission, and this is done so that stray programs do not intermix with worthwhile and legitimate ones that you can know and trust. All programs within Program Files are supposed to be entirely trustworthy, after all, if you can't trust your Program Files, whom can you trust? This extra layer of protection ENSURES that your Program Files is intact.

    Here is the problem however: programs like to read and write little data files for themselves. Word processors write and save drafts of your documents; graphics programs write temporary files for themselves; games write and generate save files, etc. And they are obviously designed to create these little convenience files within their own folder. Now you can see the problem that this creates, at least in principle, if you wish to ensure complete stability for everything within Program Files. The initially installed files may be perfectly correct and legitimate, but subsequent files may be corrupt, or malicious, or both. It is simply impossible to tell. At the same time it is impossible to forbid programs to write their own little convenience files either, as 99% of those files are perfectly legitimate.

    Thus the Microsoft guys have happened upon a solution: move EVERYTHING that the program generates to an off-site location, so that Program Files itself remains completely unchanged from when the program was initially for the very first time installed. Yet, obviously the programs themselves must never know their data was moved; this movement of all new content happens under the hood, and without knowledge by either the program or the user. Usually it works well. Unfortunately it sometimes wreaks havoc on Med2 mods.



    How to fix it:

    1) One solution is to disable the whole Vista/Windows 7 UAC (the service which dims your computer whenever any program decides to acquire a little too much power for itself). Now this is highly unadvisable, as UAC (especially in Windows 7), is an extremely powerful feature, and very potent against preventing viruses and malware from taking over your computer. By removing it you're bringing your PC down to a windows XP or even a windows 98 level. You really don't want to do that.

    2) Another solution is to disable the VirtualStore feature alone. This is done by going into your computer's Security Policy:



    And disabling the last item. Now if you notice, it is actually part of UAC, which is why disabling the whole UAC seems to fix our issue. But after all, VirtualStore does serve a worthwhile function, and disabling it here unfortunately doesn't always fix problems for your Med2 install.

    3) Instead, there is solution that avoids having to disable any Vista/Windows 7 features altogether. How? By removing the security concerns about your Med2 install. You will tell the operating system that Med2 is trustworthy in your opinion, and that the OS won't need to worry about virtualizing its files to protect you!

    Here is how do to it:








    This fixes your Med2 problem, without having to in any way disable or remove the UAC or VirtualStore, and allowing them to serve their other worthwhile functions.

    You might want to consider going into C:\Users\[user name]\AppData\Local\VirtualStore\Program Files, and deleting the Med2 folder, so there's no confusion for the game, and also to save space.



    P.S.:


    How to Unhide hidden folders on Windows:
    • Go to 'My Computer' and then click 'Alt' Key on your keyboard to being the Menu bar.
    • Then then click on Tools>Folder options (Shown below) and a pop up box will appear.
      Path to Folder Options (Click)
    • Another fast way to find the 'Folder Options' is to use the search box from the start menu. Simply type "folder options" in the search field and the first result should be the Folder Options shortcut. Click on the it or press the Enter key to open it. Go to the View tab (Shown below) and make the settings you want.
      Folder Options Box (Click)
    • Select the show hidden files option and press ok as shown in the above pic & you are done.

    Last edited by Gigantus; July 07, 2017 at 07:07 AM. Reason: Restored some pictures, again


    "If ye love wealth greater than liberty,
    the tranquility of servitude greater than
    the animating contest for freedom, go
    home from us in peace. We seek not
    your counsel, nor your arms. Crouch
    down and lick the hand that feeds you,
    and may posterity forget that ye were
    our countrymen."
    -Samuel Adams

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •