Results 1 to 8 of 8

Thread: [2008] System 32 and Windows Folders

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Dec 2007
    Posts
    167

    [2008] System 32 and Windows Folders

    how can I find out the location of the folder "system32" and "windows"
    and will the code work on XP and Vista?
    thx

  2. #2
    Fanatic Member
    Join Date
    Jul 2007
    Posts
    530

    Re: [2008] System 32 and Windows Folders

    do You mean Searching ?

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Dec 2007
    Posts
    167

    Re: [2008] System 32 and Windows Folders

    I want to copy some files to the system32 folder to protect them (so the user wont mess aroung with them)
    I need the location
    "C:\windows\system32"
    but sometimes windows is installed on d or e
    so i need code to find out the location

  4. #4
    Fanatic Member
    Join Date
    Jul 2007
    Posts
    530

    Re: [2008] System 32 and Windows Folders

    You Can get The Systeme Folder by Using
    The Environement.SystemeDirectory

  5. #5

    Thread Starter
    Addicted Member
    Join Date
    Dec 2007
    Posts
    167

    Re: [2008] System 32 and Windows Folders

    does this work on Vista also?

  6. #6
    Fanatic Member
    Join Date
    Jul 2007
    Posts
    530

    Re: [2008] System 32 and Windows Folders

    I'am Using XP SP2 havent Tested on Vista
    but Normally its Should work also on Vista

  7. #7
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,222

    Re: [2008] System 32 and Windows Folders

    It returns the system directory for the current environment. If the current environment is Vista...
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  8. #8
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: [2008] System 32 and Windows Folders

    It will work on Vista but some of the folder names may be a little different then they were in XP. Like "My Music" in XP is now "Music" in Vista etc. but the constant value for finding that folder is still the same.
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

Posting Permissions

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



Click Here to Expand Forum to Full Width