• Windows, solid-state disks, and “trim”

    Home » Forums » Newsletter and Homepage topics » Windows, solid-state disks, and “trim”

    Author
    Topic
    #465444


    LANGALIST PLUS[/size][/font]

    Windows, solid-state disks, and ‘trim’[/size]

    ByFred Langa

    It’s a little-known fact that all solid-state disks — all of them — suffer inevitable performance declines over time.

    It’s also little known that Windows 7 and Server 2008 are currently the world’s only operating systems to fully implement the new trim command that helps forestall this speed decline.[/size]


    The full text of this column is posted at WindowsSecrets.com/2010/01/07/04 (paid content, opens in a new window/tab).

    Columnists typically cannot reply to comments here, but do incorporate the best tips into future columns.[/td]

    [/tr][/tbl]

    Viewing 15 reply threads
    Author
    Replies
    • #1196045

      On “Dealing with undeletable Registry keys” the most common issue I have run into with keys that I cannot delete is bad, corrupt or missing permissions on the registry keys. Open Regedit and check permissions on the key(s). There were a few software packages that occasionally splattered during installation or installation and trashed the key permissions. In these cases you had to manually take over each level of registry keys one after the other updating ownership and permissions to allow you to delete them.

      Open Regedit.
      Go to the key in question
      Right click Permissions OR select key then Edit | Permissions
      Click on Advanced
      Go to Owner TAB
      Take ownership (you can do it as yourself or the Administrators group)
      Note1: Checking the “Replace owner on sub containers and objects” may allow you to fix permissions for the entire subtree in one operation.
      Note2: This may now make subkeys visible.
      Repeat on keys and subkeys as necessary.
      Once you have fixed permissions on the entire subtree, you can then delete the subtree.

    • #1196074

      I looked up the Devcon KB article (311272) and it says this applies only to:
      # Microsoft Win32 Device Driver Kit for Windows 2000
      # Microsoft Windows XP Driver Development Kit
      # Microsoft Windows Server 2003 Driver Development Kit

      So not much use to a Windows 7 user, it seems?

      • #1196533

        So not much use to a Windows 7 user, it seems?

        Has anyone tried it yet? I often find Microsoft information on valid systems is out of date because they do not update all the old web pages when new software versions come out.

        • #1196644

          Has anyone tried it yet? I often find Microsoft information on valid systems is out of date because they do not update all the old web pages when new software versions come out.

      • #1196869

        I’m trying out the Windows Driver Kit (619 MB download) which has current OS support and CONTAINS DevCon (or so they say).
        The download is a DVD-image (.iso) so you need to mount the image or use some DVD-access software.
        See my notes in the second quote below David Hutton-Squire’s quoted entry.
        –Fred Barnett

        I looked up the Devcon KB article (311272) and it says this applies only to:
        # Microsoft Win32 Device Driver Kit for Windows 2000
        # Microsoft Windows XP Driver Development Kit
        # Microsoft Windows Server 2003 Driver Development Kit

        So not much use to a Windows 7 user, it seems?

        Jan 8, 2010 7:45:30 PM
        Windows Driver Kit contains the DevCon command utility recommended by Windows Secrets and others…

        http://msdn.microsoft.com/en-us/library/ms792824.aspx

        DevCon is included in the WDK in the toolsdevcon directory. There are separate versions for 32-bit applications for Windows (toolsdevconx86) and 64-bit applications for Windows (toolsdevconia64) systems.

        Note To run DevCon commands on a remote computer, the Group Policy setting must allow the Plug and Play service to run on the remote computer. On computers that run Windows Vista and later versions of Windows, the Group Policy disables remote access to the service by default.

        cf.:
        http://www.microsoft.com/whdc/DevTools/WDK/WDKpkg.mspx

        download:
        http://download.microsoft.com/download/A/A/7/AA7A3E5E-2279-4431-B363-7EC0E3113F90/GRMWDK_EN_7600.ISO

        via:
        http://www.microsoft.com/downloads/details.aspx?FamilyID=2105564e-1a9a-4bf4-8d74-ec5b52da3d00&displaylang=en
        Windows Driver Kit Version 7.0.0
        Brief Description
        Supporting Windows 7, Windows Vista, Windows XP, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003
        The WDK Version 7.0.0 is the latest driver development kit for Windows.
        On This Page
        Quick DetailsOverviewSystem RequirementsInstructionsRelated ResourcesWhat Others Are Downloading

        Quick Details
        File Name: GRMWDK_EN_7600.ISO
        Version: 1.0
        Date Published: 8/6/2009
        Language: English
        Download Size: 610.2 MB
        Estimated Download Time: 24 hr 48 min 56K
        Overview
        The Windows Driver Kit (WDK) Version 7.0.0 contains the tools, code samples, documentation, compilers, headers and libraries with which software developers create drivers for Windows 7, Windows Vista, Windows XP, Windows Server 2008 R2, Windows Server 2008, and Windows Server 2003. This development kit does not contain device drivers for your personal computer. If you are looking for drivers for your personal computer, go to Microsoft Update for downloads, or visit Windows Hardware Help for more information to find device drivers and hardware.

        A working knowledge of C programming is necessary to use this kit to develop Windows drivers. For additional information about doing driver development, please go to Windows Developer Hardware Central.
        Top of page
        System Requirements
        Supported Operating Systems: Windows 7; Windows Server 2008

        • #1196874

          I’m trying out the Windows Driver Kit (619 MB download) which has current OS support and CONTAINS DevCon (or so they say).
          The download is a DVD-image (.iso) so you need to mount the image or use some DVD-access software.
          See my notes in the second quote below David Hutton-Squire’s quoted entry.
          –Fred Barnett

          Welcome to the Lounge, Fred 🙂

          Could you please explain the benefits of downloading this 619MB file over using the 32 or 64-bit part of the 150Kb download of DevCon? Is it a later version, better in some way?

    • #1196272

      In the past, when dealing with undeleteable registry keys I have used the following command from a cmd prompt window:

      at [insert time +2 minutes] regedt32 /interactive

      You will need to insert a time in the command (between the brackets in the example above) in order for it to run the command. When that time hits it should run the regedt32 command and work normally from there.

      The at command causes regedt32 to run under the system account and the interactive runs it so that you can get around in the usual regedit window. I have yet to find a key that you cannot delete or modify permissions on with this command (even keys that have no security on them at all). A Microsoft Tech showed me this while working on printer issues on an XP machine that the registry would not let us get rid of the older NT4.0 drivers. He stated that the system account opens the registry like it is a text file and ignores any inherent security on the keys.

      I would caution that this is much more dangerous than using regular regedit in that there is nothing that you can’t do with this command. Please make sure to backup your registry before making any changes in this manner.

      • #1205540

        In the past, when dealing with undeleteable registry keys I have used the following command from a cmd prompt window:
        at [insert time +2 minutes] regedt32 /interactive

        In Windows XP Home, SP3, the order of the parameters matters. The command to start the ultimate program (regedt32, in this case) needs to be the last parameter, and any switches specified for that command (regedt32) should come after it; parameters for the at command need to come before the command to launch the ultimate program.

        In Klinton’s example, the command boils down to: at [b]time[/b] run regedt32, and feed regedt32 the parameter /interactive. Nonstarter in this OS.

        Instead, in Windows XP (and, I trust, in all versions of Windows that support the at command), the parameter for at needs to come before the command that starts the program: at [time] /interactive regedt32 [plus other command-line parameters for regedt32, if any].

    • #1196284

      I found the comments on the TRIM command interesting, so with Google’s help, I did some research, and would like my conclusions confirmed:

        [*]TRIM is automatically “turned on” in Windows 7, but there is a command whereby you can turn it off (for whatever reason).[*]All SSD’s may not be “TRIM” ready.[*]As best I can tell, you do NOT open up a command window and specify “trim c:” to get drive c: trimmed … instead, Windows 7 does it automatically whenever you delete a file (not overwrite, but delete), and only then.

      So, this begs the question: how can I determine if my SSD is “TRIM” ready?

      PS: Just ran across this white paper on the TRIM command:

      http://www.maximumpc.com/article/features/white_paper_trim_command

    • #1196331

      Regarding Zone Alarm 9 acting up, not functioning, and then leaving behind undeletable Registry Keys:

      (1) Zone Alarm has their own special uninstaller and cleanup tool. Apparently, the reader did use these tools.

      (2) For a more reliable and complete removal of any software, using RevoUninstaller in its Level 4 Mode can automatically remove files, folders and most Registry traces left behind in most uninstaller operations. The new Revo Pro version ($40.00) can also cleanup many failed uninstalls and failed installs, as well as clean up Registry traces most Registry cleaners would have trouble with. I cannot guarantee success with either of Revo’s uninstaller programs, but I have successfully completely removed Zone Alarm Free with the free version. I generally use RevoUninstaller on any program I want to completely remove. Then I run CCleaner’s Registry and System cleaners to make sure everything is gone. Very important when trying for a clean install or a clean reinstall.

      -- rc primak

    • #1196346

      I don’t know if I should quote previous Windows Secrets paid content here or not, so I won’t. I also don’t know whether this is applicable to the specific situation described, but regarding undeletable registry keys, how about the tip in the 2009-01-22 Windows Secrets about using psexec to edit the registry remotely?

      • #1196379

        I don’t know if I should quote previous Windows Secrets paid content here or not, so I won’t. I also don’t know whether this is applicable to the specific situation described, but regarding undeletable registry keys, how about the tip in the 2009-01-22 Windows Secrets about using psexec to edit the registry remotely?

        It’s fine to refer to past WS articles in Lounge posts, whether they appeared in the paid section or the free section. Here’s a link to the item in Fred’s Jan. 22, 2009, column on SysInternals’ PsExec utility (scroll to the last item, “Powerful free tool simplifies Registry edits”):

        http://WindowsSecrets.com/2009/01/22/04

    • #1196532

      Devcon Powerful, free alternative to Device Manager

      I have had my Wireless connection go walkabout, occasionally on booting the system, the wireless icon just fails to appear in the systray and I have no connection to my router, network or internet. If I go into device manager there is no sign of a wireless network device. Rebooting, toggling the WiFi switch on the front of the laptop, safemode, nothing I tried would fix the problem so in desperation thinking my wireless device was broken I plugged in a LAN cable. On bootup the wireless device is back and working fine again. This has now become my fix for this problem as it works every time and I haven’t bothered to diagnose the loss of wireless any further. However, next time it happens I will try DEVCON and report back if I find anything.
      [/color][/size][/font]

    • #1196535

      It’s a little-known fact that all solid-state disks — all of them —
      suffer inevitable performance declines over time.

      Does this apply to USB drives also? If so is TRIM relevant to them as well?

    • #1196649

      Yes, I’ve tried it in Vista. It open another command-line window with the results, then disappears after a few seconds. It then pops up a window that says the program may not have installed correctly.
      Tried issuing from the command line, from within a command-prompt window . . . I even tried piping the output to a text file. All it did was create an empty text file.
      I would expect the same results with Win7.
      I suppose you cannot expect software written in 2003 and never updated, to work in new 2010 OS’s.

    • #1196670

      Devcon seems to work as expected fror me running from an elevated Command prompt using Windows 7 32-bit Build 7100.

    • #1196702

      Andy is correct. I retried devcon running the Command Prompt with “Run as Administrator” and it does work properly for both Vista and Win7.
      I should have tried that before I posted.
      Thanks, Andy.

      • #1196915

        Andy is correct. ….. Thanks, Andy.

        Thanks to you as well Pete. You at least reminded us about the Admin bit. It is always possible that it may work most of the time, but not in some combinations of options or with some particular software installed. That’s why this lounge with real users’ experience is so valuable.

        JG

    • #1196796

      Re: Undeleteable Registry Keys.

      I also recommend Microsoft’s Windows Installer Cleanup utility for fixing bad installs. See If your program’s name appears in its program list and click on it. It helped me get rid of a bad uninstall of Spy Sweeper Antivirus some time ago, plus one or two others.

    • #1197079

      Peter Boyles beat me to the punch with his post about taking ownership of keys that resist all efforts to delete them. For the record, I’ve used this method to take over and delete keyss, and, in one case, a whole hive (the HKEY_USERS, a. k. a. HKEY_CURRENT_USER, hive, for a deleted user).

      The same thing applies to NTFS permissions. If you are logged in as a member of the Administrators group, you shouldn’t need the at trick, except, perhaps, on Vista and Win7. Logged on as administrator, I’ve always been able to take over any key whose owner has vanished.

      Along the same lines, one of the first cases in which I needed this knowledge was when I deleted a user from the Security Accounts Manager, by way of the Computer Management snap-in. Once you do that, any object, be it Registry key, file, or directory, becomes an orphan, and is unreachable until an administrator takes ownership of it. I have learned, therefore, that the easiest way to set about deleting a user is to start with the profile, under Documents and Settings (for Windows 2000, XP, and 2003) or Documents (Vista and 7), then delete the user from the SAM.

      Using this methid, the HKCU hive requires no special attention, since it lives in a hidden file, NTUSER.DAT, in the profile, as it has since Windows NT. Hence, deleting the profile folder also discards the user’s Registry hive.

      Finally, I have discovered that the same problem can arise with respect to domain user profiles. Once you disconnect from the domain, they become orphans.

      David A. Gray

      Designing for the Ages, One Challenge at a Time

    • #1197297

      I have experienced issues with registry key permissions such as Petter Boyles describes. There is a Microsoft command line tool named subinacl that will let you take ownership and change permissions of registry keys and all subkeys. The problems I had related to registry keys that had many subkeys and I was having to manually fix each one all the way down the tree. Subinacl let me do it in a couple of steps (take ownership and reset permissions). Subinacl is available from Microsoft. Google “subinacl download site:microsoft.com”. Be sure to backup the registry anytime you edit it. The download link does not mention compatibility with Vista or Windows 7.

      • #1208388

        I have experienced issues with registry key permissions such as Petter Boyles describes. There is a Microsoft command line tool named subinacl that will let you take ownership and change permissions of registry keys and all subkeys. The problems I had related to registry keys that had many subkeys and I was having to manually fix each one all the way down the tree. Subinacl let me do it in a couple of steps (take ownership and reset permissions). Subinacl is available from Microsoft. Google “subinacl download site:microsoft.com”. Be sure to backup the registry anytime you edit it. The download link does not mention compatibility with Vista or Windows 7.

        If you’re already in the UI, there is a check box that lets you propoagate changes in permissions and ownership all the way down the tree. If the tree is large, you will see a progress bar as the system drills down the tree.

        David A. Gray

        Designing for the Ages, One Challenge at a Time

    • #1197541

      Since NTFS hasn’t changed much, if at all, since Windows 2000, I suspect Subinacl works just fine in all newer versions of Windows.

      David A. Gray

      Designing for the Ages, One Challenge at a Time

    • #1197871

      Reply to F. Langa’s on deleting files – This is about a Zone Alarm application.

      A friend’s notebook (Toshiba with XP Pro)was getting error conditions on boot up that VSinit wasn’t registered, etc.

      I decided to reinstall ZA to clear the problems, but it failed because of the bugs….

      So I used XPs Add/Delete which made things worse..ZA has its own uninstaller…

      I then went in to delete the Zone Alarm directory, but was denied because no Admin privileges, but was in Admin mode!

      Went onto the web and found a program zfix.zip but didn’t help. But also somebody said back date your machine clock
      and try the delete.

      I backdated the machine 2 years and was able to delete all files without any problems

      I redated the machine, then reinstalled ZA. All boot bugs were gone.

      Question – Why did backdating release the file protection?

      Thanks
      MikeD

    Viewing 15 reply threads
    Reply To: Reply #1196532 in Windows, solid-state disks, and “trim”

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information:




    Cancel