Showing posts with label disc. Show all posts
Showing posts with label disc. Show all posts

Saturday, February 18, 2012

Saving Disk Space; Finding Types of Files to Shrink

I wanted to save drive space.  The first line of attack was to use a freeware program to find large files.  Among the various possibilitiesWinDirStat, TreeSize, and SpaceSniffer seemed to be the most positively reviewed and/or familiar to me.  Among those three, TreeSize and WinDirStat used a directory listing to indicate the largest folders, while SpaceSniffer and WinDirStat used a graphic approach to highlight large individual files.  In other words, WinDirStat offered both.  The graphic approach led me to multiple space-saving solutions faster than the TreeSize approach.  Between the two graphic progams, I found SpaceSniffer's graphic presentation more readable and zoomable than that of WinDirStat, except that WinDirStat made it easier to tell, right from the start, whether a folder was large because it had many small or few large files.  SpaceSniffer also offered a full right-click Windows Explorer context menu, while the right-click options in WinDirStat were more limited.

This sort of program was good for quickly locating large space hogs.  The concept, which I pursued to some extent, was that you would probably free up the most space most quickly by homing in on very large files or folders.  But once I got past the point of being impressed by the graphics, I noticed certain drawbacks.  One was disorientation, especially in SpaceSniffer:  its method of zooming in on a particular folder was not the exact opposite of its method of zooming out.  It seemed like I was coming out by a route different than the one I had gone in on.  So it could be hard to build an intuitive sense of where you were located, with respect to the drive or directory as a whole.  Another drawback was that I could not compare across partitions.  I had to back out and start over, or run a different session of the program, to see clearly that I should be focusing on one drive rather than another.  Another missing dimension of coherence:  file type.  I might never know, from looking at the graphic maps, that I was consistently making PDFs or JPGs that were larger than they needed to be.  Even a grossly large PDF could escape notice when nestled among AVIs ten times its size.  There was also no logging or comparison capability that might alert me to the fact that a certain folder had been growing more rapidly than I would have expected -- or, for that matter, that a certain folder had disappeared since the last time I ran the comparison.

I thought that I might be able to capture the chief benefits of these programs -- that is, their ability to draw attention to large files -- while also adding at least some of those missing ingredients (though admittedly I could not compete with their graphics).  What I wanted, for this purpose, was a simple file list that I could sort according to selected criteria, particularly folder size, file date, file size, and file extension.  This approach seemed likely to require a much larger time investment up front; but once I had the file list, it seemed I would be able to do quite a bit of analysis and revision of files and processes, so as to root out a variety of kinds of disk space waste.  In short, I was seeking a systematic approach that would minimize my preoccupation with the same few large files (which may have had to remain large for good reason), turning my attention instead to other areas where I could make an impact on drive bloat.

The approach I took was to develop a somewhat automated method of generating a list of files across multiple partitions, and then put that list into a spreadsheet.  It took some work to figure out a way to automate the production of a file list that would work simply in a spreadsheet.  The problem was that simple batch commands, with which I had some familiarity, did not want to put all relevant information about each file on a single line.  (While I was particularly interested in the full path, file size, and date, others might have wanted to draw on some other available types of file information, such as file attributes.)

As described in another post, I found the desired solution by installing TCC/LE and running its PDIR command in a batch file. This operation required two parts. First, I had to work up the command that I would run to make everything happen. This command would start TCC/LE and would tell it to open a batch file. To find where TCC was, I used the Properties > Target path I found in a right-click on its Start Menu icon. To see if this would all work, I generated a little batch file called Test File.bat. Then I ran this:

"C:\Program Files\JPSoft\TCCLE13x64\tcc.exe" "D:\Current\Test File.bat"
It worked. Test File.bat ran. So I went ahead and replaced the second part of that command with the name and location of the real batch file that I wanted to run. I called it ListAllFiles.bat, and I put it in a permanent location with other batch files that I would run for various purposes. (For the moment, it was an empty file, but that would change momentarily.) I also made a copy of the Start Menu shortcut that would run TCC. I modified that shortcut's Properties so that its Target line contained the information just described: the path to tcc.exe, and then the path to ListAllFiles.bat, each in quotation marks as shown in the line quoted above. Now I could double-click on that icon to make TCC run ListAllFiles.bat, instead of having to look up the proper command syntax. Once that was done, I just needed to make sure ListAllFiles.bat said what I wanted. I was still working on that, but for now it looked like this:
@echo off
cls
echo.
echo For cleanest results, empty the Recycle Bin before proceeding.
echo.
pause
cls
echo.
echo Notepad may take several minutes to display a large list.
echo.
echo Be patient ...
echo.
:: PDIR requires TCC/LE to be installed

pdir D:\ /s /(dy-m-d zc fpn) > "D:\Current\List of All Files on D and E.txt"

pdir E:\ /s /(dy-m-d zc fpn) >> "D:\Current\List of All Files on D and E.txt"

start notepad.exe "D:\Current\List of All Files on D and E.txt"

exit
The last four lines (double-spaced for clarity, in case the blog wraps them) were where the action was; everything before that just displayed a few informational notices and a comment about PDIR that would not be visible when the batch file ran. I opened the resulting text file, "List of All Files on D and E.txt," in a LibreOffice Calc spreadsheet, since LibreOffice (alternately OpenOffice 3.3) could accommodate a large number of rows. When I did that, LibreOffice Calc detected that it was a text file and defaulted to LibreOffice Writer, but I just copied and pasted from there into Calc. I told it that the imported text had fixed-width columns, and I pointed out where those columns were.  LibreOffice Calc crashed repeatedly during this process -- I had to remember to save frequently -- but in the end it came through.

So I had my table. I added a column to display the extension, extracted it using the RIGHT function (using different values to extract extensions of different length, e.g., .html, .px), and saved the extension in an adjacent column (i.e., undisturbed by those calculations of varying extension length).  I added a column in which I could record the date on which I had last examined the file to see whether it was currently feasible to shrink it, and another column for notes.  For instance, I had a 6GB zip file that I couldn't get into right now, because there were things I needed to do and learn before I would be ready for the project that its opening would commence.So I added that "Last Examined" column.  For purposes of making a first pass through the files, I could filter out that one, among many others, as not being of further concern right now.

Now that the spreadsheet was ready, I could do some file sorting.  First, I sorted by date, and also by extension, to find any files whose name or other properties might need to be adjusted, perhaps with the aid of a relevant utility (e.g., SetFileDate, TrID).  Then I sorted by file extension.  I added a Flag column to the spreadsheet, to indicate files that would be worth looking at, to see if I could possibly shrink them.  I put an X in the Flag column for each AVI file.  I suspected that, with or without editing, most AVIs could probably be converted to MP4 or some other more compressed format that would retain about the same apparent quality for a fraction of the space.  Likewise for BMPs (most could probably be JPGs) and WAVs (many could be converted to MP3).  I also flagged all ISOs, which I probably didn't need to keep, and all ZIP (and RAR and 7z) files, because they could hold a lot of unnecessary stuff somewhat removed from notice.

Next, I sorted the spreadsheet in order of declining file size, and flagged all files larger than 500MB.  Within that sort, I filtered for common image extensions (including PDF as well as JPG and PNG) and flagged all files larger than 100MB.  I could see that these steps were going to draw attention to whole folders full of files.  For example, I noticed a folder of mixed MP3 and WAV files, all of which could have been MP3s.  In that instance, I suspected I would probably wind up converting the whole folder at once.

I figured I would probably refine this approach, if I went back through it again sometime in the future.  But for right now, these steps resulted in the flagging of about 9% of the total number of files on these partitions -- and those 9% accounted for about 60% of disk usage.  I probably wouldn't have time to work through all of those files individually.  But identifying a few major categories of unnecessarily large files did seem likely to yield some reductions in disk usage that I could achieve through mass conversions and other relatively simple steps.  Finally, while I had concluded that I liked LibreOffice Calc -- it had pretty much stopped crashing as I got more familiar with it, thus probably making fewer finger fumbles -- the focus on just 9% of the files gave me a list short enough to handle in Excel 2003.

Saturday, May 14, 2011

ASUS Eee PC: Windows 7, Acronis True Image Universal Restore, and Partitions

I put my laptop up for sale and got an ASUS Eee PC 1215T-MU17-SL.  Got it on sale for $359, reasoning that if inflation kicked in and/or the Japanese earthquake/tsunami damage affected equipment production, prices may not continue to drop as rapidly as they have in recent years.  Operationally speaking, the theory, not yet tested, was that I would be able to go running with this in my Deuter Speed Lite 20 backpack, and then just sit down and go to work, out in the woods or wherever.

First, I had to configure the Eee the way I wanted it.  Its hard drive, at around 300GB formatted, was big enough for a lot of material, but they had devoted 100GB to the Win7 Home Premium partition.  Then there was another 15GB partition, apparently containing a backup of the original Win7 installation, as well as a tiny program partition at the end.  It seemed advisable to squeeze out some disk space, if possible.

My plan for disk space was to start with a backup of the existing program partition, copied to an external USB drive in case everything went south.  I used Acronis True Image for this purpose.  I was able to get Acronis loaded onto a USB flash drive, which was necessary since (a) the Eee didn't have a CD/DVD drive and (b) I didn't have an external USB CD/DVD drive to connect to it.  I wasn't taking notes at the time, but in my recollection the process I used to get Acronis onto the thumb drive was, first, to install Acronis on a desktop and then use that program's Bootable Rescue Media Builder to install the program onto the USB drive.  If I hadn't already bought Acronis, I probably would have started with a highly rated freeware imaging program.  CNET listed several -- Easeus Todo, Macrium Reflect, and Paragon Backup & Recovery Advanced -- that would have been worth trying.  Getting them onto a USB drive might have entailed the use of Unetbootin or Universal USB Installer.  In all events, booting from a USB flash drive was a hassle:  the BIOS on the Eee would not reliably remember its previous settings, so that it was necessary to reset the BIOS to boot from the jump drive each time.  The essential first step, there, was to hold down F2 as soon as the machine started to boot.

I really wanted to move if not delete that 15GB original backup partition.  I'd be glad to keep an image of a virgin installation offline, on a hard drive on the desktop, where space was cheap; but in the field, if I was limited to one backup image, I'd prefer that it would be an image of the program drive in its current configuration.  In other words, if I had to restore Windows 7, I would ordinarily try first to restore from a drive image that included a fairly recent collection of the various programs and settings that I would be using from day to day.  And I wouldn't store this image in the middle of the hard drive; I'd put it on a partition at the end, where it would be out of the way.

I gathered, from various comments, that if you moved that backup partition, the machine would no longer be able to restore it quickly using the built-in backup setup.  I wasn't too concerned about that, but it was a thought to take into account.  I was also concerned that messing with the partitions would somehow invalidate the warranty.  I didn't explore that question extensively, but as far as I could tell at a brief glance, that was not the case.  So it seemed that I could go ahead and adjust the partitions to taste.

My first step, after making an image of the original installation, was to delete the drive C partition.  I did this with a copy of GParted, installed on a UHSB drive using Universal USB Installer (above).  That step gave me 100GB of unallocated space at the start of the drive.  Now, ideally, I would use the Universal Restore feature of Acronis Drive Image Plus Pack (my reason for buying an Acronis update) to restore a previous Windows 7 installation to what they called "dissimilar hardware."  That is, I wondered whether I could save myself a lot of program installation and tweaking time by restoring a copy of my desktop computer's Windows 7 installation to the Eee.  Apparently I'd have to either uninstall Win7 from the desktop or buy a second license if I wanted to use Win7 on both.  Either way, it seemed like it would be a lot easier to use the Acronis approach than to manually recreate all of the steps I had gone through to tweak my Win7 system the way I liked.  In my previous experiments with the Universal Restore capability, it had seemed that it would be crucial to obtain the drivers for the Eee's hard drive controller or chipset.  The Acronis procedure asked me whether I wanted to include such drivers but, alas, I was not able to detect exactly where the desired drivers were located.  I tried running the restore without them, but got this message:

Device driver 'PCI \VEN_1002&DEV_4391&SUBSYS_11171043&REV_00' for 'Windows 7' cannot be found.
The driver for the device cannot be found in the operating system or in the additionally specified drivers.
I tried searching my desktop computer and online for various forms of that specified driver, but no luck.   I clicked "Ignore" and got no further error messages, but also got a system that would not start.  It would get to the point of giving me a choice of booting into Safe Mode or Normal Mode, but neither went anywhere.  One problem was that I was working with current Eee drivers in the downloaded .exe format, whereas I was supposed to extract the .inf, .sys, or .oem drivers from those exes.  There seemed to be drivers for both the SATA and the chipset, with no explanation as to which I needed.  I decided to extract them both, put them into one folder on another USB drive, and let Acronis choose which one it needed.  But I really had no idea what to extract.  The SATA download, for instance, contained no files in any of those three formats.  It did contain two .cab files, but neither WinRAR nor 7zip was able to extract anything from them.  The Acronis forums seemed to contain a number of messages from frustrated users, but I thought I should probably post a question myself.  But I hated to burden the system with a question that had already been asked and answered, so I searched againOne thread advised that I should extract from the .exe, not from the .cab, so I tried that; but that, too, gave me the "not a supported archive" error in 7zip.  That was when I used the right-click 7zip option in Windows Explorer.  When I went at it from inside 7zip, the recommended "Open Inside" command did nothing.  Another post clarified that the single thing I most clearly needed was the driver for the hard drive controller -- but even then, it still sounded like I also needed chipset drivers.  HackerJoe in that same thread suggested that perhaps I should have installed the latest hard drive controller while I still had the system running, and then keep a copy of the C:\Windows\Inf folder and point Acronis to that.  Well, but at least I had an old copy of that folder, in the drive image that I had already made.  I hooked the backup drive to another computer, opened that image, and copied its C:\Windows\Inf folder to a new folder, INF, on the external drive.  I reconnected the external drive to the Eee, re-ran Acronis, pointed to that inf folder, and told it to restore both drive C and the MBR.  This time, it ended with a different error message:
File 'amdsata.sys', that is required for installation of device 'AMD SATA Controller (ID: AMD)' in Windows 7, cannot be found.
It seemed to me that this message should have come up during the first try, when I clicked "Ignore" instead of "Ignore All."  Anyway, a quick search on the desktop computer suggested that amdsata.sys came in different versions, but that for the last two years its size had not changed.  I added a copy of that file to the INF folder on the external USB drive and clicked Ignore.  Now I got another error:
File 'AtiPcie.sys', that is required for installation of device 'AMD PCI Express (3GIO) Filter Driver (ID: Advanced Micro Devices Inc)' in Windows 7, cannot be found.
I was grateful that, this time, I did get more than one error message, so as to remedy multiple problems before trying again.  On the other hand, I was concerned that a message relating to PCIE did not really seem to be relevant to the the hard disk controller -- that, in other words, the advice from Acronis to focus on the hard drive controller did not seem to cover the entire situation.  On the desktop machine, atipcie.sys was in C:\Windows\System32\drivers.  That was also where amdsata.sys (above) had been.  It seemed that I might be able to anticipate most if not all Universal Restore errors by adding the contents of that Drivers folder to the INF folder on the external drive.  I did that.  The INF folder now had 1,912 items, but they took only 146MB of disk space -- less, if I had deleted the subfolders contained within it, where I doubted the Acronis process would search.  Then it occurred to me that these desktop versions of these files -- of amdsata.sys, AtiPcie.sys, and so forth -- might not be what was needed on the Eee.  It seemed, in other words, that I should have copied C:\Windows\System32 from within the previous Acronis backup, not from the desktop.  So I went back, wiped out the INF folder, and did it over again, this time copying everything from the C:\Windows\Inf and C:\Windows\System32\drivers folders contained within the Acronis backup of the original Eee PC's drive C installation.

With that done, I clicked Ignore again. This time, it said, "Recover operation failed."  Before attempting another recover process, I tried booting the Eee in Safe Mode.  It got as far as listing AtiPcie.sys.  There, it stalled and, after a minute or so, it rebooted.  Seeing AtiPcie.sys at that location suggested that the list of .sys files shown when going into Safe Mode might be the complete list of what was needed in order to make the Acronis Universal Restore process work.  What I should have done, in that case, was to boot the Eee in Safe Mode in the first place (while I still had the original drive C partition), videotape the list of files that it was loading, and make sure those were present in the INF folder on the external drive.  But it seemed the list might change, and anyway it would take time to write it up and verify it, so I hoped this simple step of copying over these files from these folders would do the trick.  I went back into Acronis on the Eee, pointed toward the INF folder on the external drive as the source of drivers, and went through the steps of recovering the full Windows 7 installation from the desktop machine.  This time, I got "Recover operation succeeded" without any error messages.  So it appeared that the approach of pointing Acronis to a whole folder full of .inf and .sys files was on the right track.  I rebooted the Eee and got a "Starting Windows" screen.  Success!

Now there was a problem of making sure Windows 7 from the desktop was actually going to run.  It was trying to load all the things that the desktop version would load, and some of those were not relevant.  I restarted in Safe Mode by hitting F8 repeatedly as soon as it rebooted.  There, I went into Control Panel (using Small Icons, not Category view) and went into two different areas.  First, in Programs and Features, I uninstalled programs that I would not be using on the notebook (e.g., video editing).  Second, in Device Manager, I looked for inappropriate hardware.  The only item marked as dysfunctional was the ethernet device, probably because I had chosen Safe Mode without networking.  I rebooted into Normal Mode.  No, there was an Ethernet Controller problem here too.  I right-clicked and chose Uninstall.  Also, since there did not seem to be a need for the 15GB partition mentioned above, I went into GParted and deleted it, and also rearranged and added partitions as desired.  The desktop installation used one of these new partitions as drive X (called BACKROOM) to hold the paging file, caches, temporary internet files, and other items that did not need to be on drive C, where they would bloat any backup drive images I might make, so now I imitated that layout on the Eee.

Unfortunately, at this point I began running into problems.  It seems that my first step should have been to delete my user profile and create a new one, or perhaps to include some kind of generic or blank user profile before making the drive image that I was now restoring.  Win7 was trying to load all kinds of stuff that wasn't going to work, and many of its settings were wrong.  In both Normal and Safe modes, I wound up getting stymied by "Server execution failed" errors.  A search led to suggestions that the problem was due to the registry looking for partitions that did not yet exist -- that I had not yet had time to create or re-letter using diskmgmt.msc in the new installation.  That may have been related, also, to my attempt to set up a paging file on one of those other partitions before re-lettering it.  Specifically, the desktop machine had the drive X (BACKROOM) partition just mentioned, as well as an INSTALL partition as drive W, containing my customized Start Menu.

So I started again.  Second time around, restoring again from the Acronis backup of the desktop, I was back to getting the first error reported above:  "Device driver 'PCI \VEN_1002&DEV_4391&SUBSYS_11171043&REV_00' for 'Windows 7' cannot be found."  I wondered if this was because I had allowed the contents of the C:\Windows\inf folder, copied to the external USB drive, to be overwritten by the contents of the System32\drivers folder.  So now I connected the USB drive back to the desktop computer and copied just the inf folder to it.  That is, I did not again copy the drivers folder.  But this was not the solution:  I got the PCI device driver error again.  Puzzling!  After I clicked "Ignore" on that error, it again reported that the recovery operation had succeeded.  I tried to boot the machine into Safe Mode.  It stalled momentarily at the line referring to CLASSPNP.SYS and then restarted itself back to the boot menu.  Second time, I let it try to go into Normal Mode, but that failed too.  Same thing when I selected the Last Known Good Configuration option from the boot menu.  I verified that the INF folder did have a copy of Classpnp.sys.  It hadn't been bad previously.  A search led to the suggestions that this could involve a problem with hardware or a corrupted master boot record on the hard drive.  Someone at Microsoft suggested that Classpnp.sys problems could stem from many sources, including a corrupt registry or a missing or damaged system file or device driver.  It occurred to me that, of course, I had been rewriting the external USB drive with the contents of the inf and drivers folders on the desktop PC, not from the backup of the Eee.  In other words, I had deleted the INF folder, thinking I wouldn't be needing it anymore, and now that I did need it, I had been recreating it the wrong way.  Dumb mistake.  I started over, making sure this time to populate the INF folder on the external drive with drivers and system files from the Acronis backup of the original Eee installation.  I copied both of those folders to the INF folder at the same time, paying no attention as to which would overwrite which.  I tried again with Acronis.  This time, I did something a little different from before.  I had not previously noticed the Options option in Acronis, but now I selected "Validate backup archive before recovery" and "Reboot the computer automatically if needed for the recovery."  But as I saw after five or ten minutes, the validation step was going to take an estimated hour or more, so I clicked Cancel and tried again without that option.  I had already validated the backup when I had made it, so that step did not seem vital.

This time, the recovery process was successful.  Now I had to see about a more cautious way of proceeding.  It seemed that the first task was to create those drives W and X, before something in the registry could try to refer to them and get itself confused.  I wondered if the DISKPART command-line tool would provide a solution.  A search led to a Microsoft webpage telling me basically to go to Start > Run > cmd, here on the desktop machine, and type "diskpart" and then "commands."  The information provided there wasn't very helpful, so I tried a search and concluded that the sequence was, first, to type "diskpart" to get to the DISKPART prompt, and then use LIST and SELECT commands to find the right partition, and then use ASSIGN commands to assign the drive letters.  So the sequence I actually used, after booting up my new Win7 reinstallation (and now it did boot), was to start by ignoring error messages produced by Win7's attempt to identify all the ways in which this Eee PC is so different from the desktop machine where the Acronis drive image came from.  Instead, when the hard drive mostly stops searching, go directly to Start > Run > cmd > DISKPART.  Doing this, while there was still an hourglass prompt, gave me a message, "Windows Explorer is not responding."  I opted to close the program.  The keyboard would not let me type "cmd" -- it was giving me "c0d" instead -- but fortunately there was a drop-down cmd option.  Apparently the installation remembered that I had run cmd on the desktop machine.  So I arrowed down and hit Enter on that.  But this was no solution:  it was not letting me type "diskpart" at the command prompt either.  So now there seemed to be a choice between rebooting or trying to run diskmgmt.msc.

Rebooting seemed like sure death, so I tried Start > Run > diskmgmt.msc.  Here, again, the keyboard was noncompliant; the drop-down option saved me.  It hadn't worked to reletter INSTALL as W first, so this time I began with relettering BACKROOM as X.  That worked.  I was tempted to reboot now, but I thought maybe I should try to clean up as much as I could before taking the risk that the system might never wake up once I let it go to sleep.  The first step, I thought, would be to create a new Administrator profile.  I went into Start > Control Panel but, alas, "Server execution failed."  The keyboard was still noncompliant.  Stuck!  Rebooted into Safe Mode.  Attempts to get into Control Panel from the Start Menu produced "Server execution failed" error messages here too.  I tried to start Control Panel > User Accounts in a cmd box by typing nusrmgr.cpl.  The keyboard was still screwed up, so I tried typing it using ASCII codes:  hold down the Alt key, type the three-letter code, and then let go of the Alt key and repeat for each letter.  So, for instance, from the list of ASCII codes, I saw that the code for the letter U (the first one that was giving me trouble) was 117, so I hit Alt-117.  The Eee PC didn't have a separate numeric keypad (essential for this purpose), so I actually had to hold down Alt-FN and then use the double-purpose keys, which in this case happened to be jj7.  So it was Alt-FN-jj7 to get a "u" on the command line.  This ultimately gave me nusrmgr.cpl, but that wasn't the answer:  I got "nusrmgr.cpl is not recognized as an internal or external command, operable program or batch file."  Another webpage made me think that what I should have been typing was "control.exe nusrmgr.cpl."  I tried that, using the Up arrow and the Home key to recycle the previous command instead of having to retype it.  The command worked, in the sense of giving me another "Server execution failed" error.

Drawing on another source, I tried typing lusrmgr.msc at the prompt and, woo hoo!  that actually opened something.  Under "Local Users and Groups (Local)" I clicked on Users.  Then, from the menu, I selected Action > New User.  I created a new user, Admin2, and then closed out of that.  I right-clicked on Admin2 and went into Properties > Member of (because it only showed "Users") > Add > Advanced.  It defaulted to "Groups" as the object type, so I clicked on "Find Now" and selected Administrators > OK > OK.  Now I seemed to be seeing Administrators as a group that Admin2 was a member of.  In the General tab, I indicated "Password never expires" > Apply.  I restarted the computer in Safe Mode.  It went right in without asking for a password, so I figured I must have previously set Administrator to be the default login.  I went into Start > Shut Down (the little button next to it) > Switch User.  I logged in as Admin2.  No errors!  Control Panel available!  I went into Control Panel > User Accounts > Change your account type.  It wouldn't let me change Admin2 to be an administrator.  I went to Start > Run > controluserpasswords2.  There wasn't actually a Run option, and that command yielded nothing in the search box.  I switched back to Administrator account and tried controluserpasswords2 there.  Ultimately, I wound up back in the Local Users and Groups dialog.  This time, I decided to make Admin2 have the same groups as Administrator, so I used the same procedures to designate Admin2 a member of Administrators, Debugger Users, and HomeUsers, but not of just plain Users.  Then I tried deleting Administrator.  It wouldn't let me delete a built-in account.  I switched into Admin2 and remembered that I could use Start > cmd even if I couldn't use Start > Run.  So in cmd I typed "controluserpasswords2."  But that didn't work either.  David Candy said the command-line equivalent of controluserpasswords2 was "rundll32.exe netplwiz.dll,UsersRunDll." He was right.  There, in the Users tab, I clicked "Users must enter a user name and password to use this computer." That ungreyed the "Properties" option for Admin2, where the Group Membership tab gave me an option to name Admin2 as an Administrator.  Apparently the previous attempt to do that hadn't worked, but now I selected that and went Apply > OK and then unchecked that same "Users must enter a user name and password" option.  Then Apply > OK > logoff.  Now it asked me who I wanted to log in as.  So I wouldn't be automatically out of luck if the Administrator account went south.  I rebooted into Normal Mode and logged in as Admin2.  Still good, but now it was logging that user in automatically.  Turns out I was using the wrong command:  I should have been typing "control userpasswords2" as two words, not one.  OK, so it worked now.  I didn't really want to have to construct a whole new Admin2 account, so I thought I'd try again to fix the Administrator account, now that I was confident that the machine would probably work for me in some sense even if that particular account was fubar.  I logged in as Administrator.  But attempts to do anything still gave me "Server execution failed."

It occurred to me that possibly I could help the situation by going into Task Manager (Ctrl-Alt-Del) and killing programs that might be causing related difficulties.  I basically closed every program that was shown with the Administrator (as distinct from SYSTEM or Admin2) user, except for taskmgr.exe itself.  Then I restarted a session of explorer.exe (using File > New Task right there in Task Manager) and tried again to get into Control Panel.  I still got "Server execution failed."   I could have proceeded on to close system programs in Task Manager, but the situation seemed futile.

In short, I had made some progress and had learned some things, but in the end I had not achieved a superior result over the default installation on the ASUS Eee PC.  It would have been, and was going to be, faster and more reliable to start with the pre-installed Windows 7 on the Eee and build a new user profile -- a copy of the built-in Administrator account, it seemed -- than to attempt to bring one over from the existing desktop computer's Windows 7 installation.  I restored the original Win7 installation to the Eee, arranged my partitions to suit, and began painfully working through the tweaks that I had developed on the desktop computer.  This process, on the Eee, is described in another post.

Friday, March 25, 2011

Windows 7: Windows Explorer: CDs and DVDs: Files Ready to Be Written to the Disc

When loading a program DVD, I noticed that Windows Explorer showed its files in two groups:  "Files Currently on the Disc" and "Files Ready to Be Written to the Disc."  This wasn't a DVD/RW disc, so this grouping didn't make sense.  I wanted to get rid of it.  I ran a search and got advice to paste this address into the address bar in Windows Explorer:

%userprofile%\AppData\Local\Microsoft\Windows\Burn\Temporary Burn Folder
and, there, to delete all contents from the Temporary Burn Folder (but not the folder itself). That solved half the problem:  the "Files Ready" group was gone, but I still had "Files Currently on the Disc."  I ran another search and found a webpage leading to a How-To Geek page that said this was a result of having Windows 7 built-in (as distinct from e.g., Nero third-party) DVD burning enabled.  To disable the built-in burning, I downloaded their registry hack for Vista and verified in regedit that it added the desired value to the Win7 registry.  I checked in Windows Explorer.  The Files Currently on the Disc message was still there.  I rebooted.  On reboot, I got an error:
explorer.exe
The parameter is incorrect
I wasn't sure if this resulted from the registry edit.  The Files Currently on Disc message was no longer there when I selected the DVD drive (with a disc in the drive) in Windows Explorer.  The original problem seemed to be fixed.  Glary Registry Repair did not identify the registry tweak as a problem.  I went ahead and added it to my all-purpose Win7RegEdit.reg registry tweak file that I would run when installing Windows 7.