none
File With Windows Macros? RRS feed

  • Question

  • Hello Folks:

       A couple of days ago it was time to re-install Windows 10.  Something's been corrupted for a while and the system's performance has been deteriorating for several months. 

       The install went well.  I have all of my old system files backed up.  I can look through them whenever I want. 

       My problem now is that I defined a lot of system macros that I told Visual Studio to use when building applications. And I don't have those macros on my new install of Windows. 

       Is there a file, perhaps an XML file, that records system macros, including those I've created?  Can you tell me where such a file might be found in my old backups so I can re-create those macros on my new system?

          Thanks
          Larry


    Friday, August 23, 2019 3:53 AM

Answers

  •    The macros I'm referring to are environmental variables I've created using Control Panel->System->Advanced system settings->System Properties->Environmental Variables->System variables. 

       



    Environment variables are stored in the registry. System wide variables are stored in HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment. The file name is C:\Windows\System32\Config\SYSTEM. That is a special file and is not normally accessible. It is backed up as part of the system state backup and is not treated as a normal file.

    User environment variables are in HKEY_CURRENT_USER\Environment. Each user has their own NTUSER.DAT in C:\Users\Your-User-Name

    If you have those files you will need to run regedit and load them as a hive into the current registry.

    See http://smallvoid.com/article/winnt-offline-registry-edit.html 

    • Proposed as answer by EckiS Friday, August 23, 2019 4:07 PM
    • Marked as answer by a_unique_name Sunday, August 25, 2019 1:48 AM
    Friday, August 23, 2019 1:57 PM

All replies

  • Hi,

    Thank you for your post.

    According to your description, the system macros for Visual Studio are missing in your new system.

    For this issue, I suggest that you could post the issue to Visual Studio forum. They'll be more familiar with Visual Studio related files and recovery issues. It will be help you better.

    https://social.msdn.microsoft.com/Forums/vstudio/en-US/home?category=visualstudio

    Regards,


    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    Friday, August 23, 2019 9:36 AM
    Moderator
  • According to your description, the system macros for Visual Studio are missing in your new system.

    For this issue, I suggest that you could post the issue to Visual Studio forum. They'll be more familiar with Visual Studio related files and recovery issues. It will be help you better.

    Thanks Carl:

       I'm sorry.  I should have been using the term "environmental variable" instead of "macro".

       The macros I'm referring to are environmental variables I've created using Control Panel->System->Advanced system settings->System Properties->Environmental Variables->System variables. 

       These environmental variables happen to be referenced in Visual Studio's properties pages that I've created.  Users can create environmental variables that have nothing to do with Visual Studios. 

       I'm interested in the location of the file where these environmental variables are found so I can copy them from my backed up image to my new installation of Windows.  Hopefully, this is clear text, like an XML file, that will allow me to find and copy each environmental variable that I need. 

       I appreciate your suggestion. I should have been clearer with my original question. 

          Larry




    Friday, August 23, 2019 11:19 AM
  •    The macros I'm referring to are environmental variables I've created using Control Panel->System->Advanced system settings->System Properties->Environmental Variables->System variables. 

       



    Environment variables are stored in the registry. System wide variables are stored in HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment. The file name is C:\Windows\System32\Config\SYSTEM. That is a special file and is not normally accessible. It is backed up as part of the system state backup and is not treated as a normal file.

    User environment variables are in HKEY_CURRENT_USER\Environment. Each user has their own NTUSER.DAT in C:\Users\Your-User-Name

    If you have those files you will need to run regedit and load them as a hive into the current registry.

    See http://smallvoid.com/article/winnt-offline-registry-edit.html 

    • Proposed as answer by EckiS Friday, August 23, 2019 4:07 PM
    • Marked as answer by a_unique_name Sunday, August 25, 2019 1:48 AM
    Friday, August 23, 2019 1:57 PM
  • Thanks Carl and MotoX80:

       That answers my question.  The environmental variables were there and accessible in my backups. 

       Unfortunately, there seems to be more to getting Visual Studio using these environmental variables to find headers than I though. 

       I'll have more questions tomorrow.

       I appreciate your advice.

          Larry



    Sunday, August 25, 2019 1:51 AM