Friday, August 31, 2018

ntfs - Disable Windows 8.1 Component Store (WinSxS/DriverStore) automatic compression?



Windows 8.1 has a new Scheduled Task (Servicing\StartComponentCleanup) which will automatically delete or compress superseded and unused files from the Side by Side store, DriverStore and drivers folder.



I was wondering if anyone knows if it is possible to keep the component cleanup but skip the compression, all without disabling NTFS compression or the scheduled task?




Note that if some of the drivers/files start to be loaded/used Windows does not seem to uncompress them after they've been compressed. To uncompress them you have to manually run "compact /U" as the TrustedInstaller service.




Answer



After some experimentation in a VM it appears that running DISM with the added switch "/ResetBase" will not compress any files whilst still cleaning up superseded components. There is a catch however, running ResetBase will remove the ability to uninstall updates.




Full solution:





  • Edit the Component Cleanup Task


    1. Open taskschd.msc and browse to \Microsoft\Windows\Servicing\

    2. Double click StartComponentCleanup

    3. Delete the Custom Handler in the Actions tab

    4. Add a new action with "C:\Windows\System32\Dism.exe" as the Program and "/Online /Cleanup-Image /StartComponentCleanup /ResetBase" as the Arguments














  • Decompress \Windows\WinSxS\, \Windows\System32\drivers\ and \Windows\System32\DriverStore\



    1. Open a Elevated (Administrator) Command Prompt

    2. Browse to the base folder you want decompressed (ex: Windows\WinSxS)

    3. Type "Compact /U /S /A /I /Q" and wait for it to finish

    4. Type "PSExec -hsi cmd"

    5. Browse to the base folder you want decompressed

    6. Type "Compact /U /S /A /I /Q" and wait for it to finish

    7. Type "Exit"

    8. Type "net start TrustedInstaller"

    9. Type "runassystem_x64.exe "runfromtoken_x64.exe trustedinstaller.exe 1 cmd""


    10. Browse to the base folder you want decompressed

    11. Type "Compact /U /S /A /I /Q" and wait for it to finish

    12. Type "Exit"

    13. Type "net stop TrustedInstaller"




Note: Your running compact 3 times because of different ACL's on files (Once as a Administrator, Once as Local System and once as the
TrustedInstaller service.




Thursday, August 30, 2018

networking - How to debug missing DLNA connection

I am not sure this is the best place to ask this question, but I am stuck and hope to get some hints from the knowledgeable community. I am having hard time making my DLNA home audio system work.


Hardware configuration


My music collection is stored on a Synology DS414 NAS with Media Server for DLNA support. It used to be connected via Powerline adapters, but now, for the sake of speed, I have connected it directly to the router.


There are two main renderers:



  • Samsung Smart TV (connected via WiFi)

  • Marantz NR1504 AV receiver (connected via Ethernet)


Android smartphones are mainly used for playback control with BubbleUPnP.


Network is provided by an Ethernet/WiFi Technicolor TC7200 router.


Problem description


Until about a week ago, the whole system was working fine, with the NAS connected to the network via Ethernet-Powerline-Powerline-Ethernet. I was able to browse the music collection on the smartphones as well as on the TV and the receiver, and I could make the smartphone take the music from the NAS and play it on the receiver.


Then I connected the NAS directly to the router (for faster file transfer, since Powerline seemed to be a bottleneck). I am not sure if the problem appeared immediately and if it is connected to this change of networking at all, but now:


What works:



  • The TV sees the NAS and has no problem accessing the files. It can also play them via ARC using the AV receiver.

  • Media Player can playback local files both locally and to the AV receiver.

  • BubbleUPnP app can play the local smartphone library locally and to AV receiver.

  • Media Server on Synology can see all DLNA devices:


    List of DLNA devices visible to Synology DiskStation


  • Audio Station on Synology can playback to AV receiver.



What doesn't work:



  • Most importantly, neither the AV receiver, nor the BubbleUPnP app can see the NAS.

  • Windows Media Player can see both the Synology:


    Media Player library list


    but when trying to playback, it gives an error:



playback error


After this, the NAS disappears from the list of libraries and will re-appear after Media Player restart.


So it looks like Synology became practically invisible as a DLNA server (smartphones and AV receiver do not see it, and the Windows computer sees it at first but gives error when trying to playback), except for the fact that the TV sees it perfectly well.


I wonder if there is any way I can debug this situation besides trying to restore the previous configuration and trying all over again. It would be difficult, since all these devices are regularly updating themselves, so the problem may potentially have been caused by one of the updates.

Bad sectors on hard drive = corrupted files?

Three times over the past week or two my laptop (9-year-old Dell running Windows XP Home SP3) has auto-run chkdsk when I've turned it on. The process has taken about 2 hours to complete, after which Windows appears to boot up normally. The chkdsk scans have detected bad sectors on my hard drive. I've made an image of the hard drive and ordered a replacement, but I want to know more about bad sectors.


If the computer can still boot to Windows (which it can), does that just mean that the bad sectors are being marked, the data in those sectors is being relocated and all the files on the hard drive are still fully intact?


Or is it the case that these bad sectors mean that some files have already become corrupted? When I made the image of the hard drive (with Redo Backup & Recovery), it also gave warnings of encountering bad sectors. If I clone the image to my replacement hard drive and corrupted files get replicated to the new drive, I may be missing some critical data and suffer crashes in the future as a result, correct? If that's the case, am I wasting my time cloning the old hard drive to the new one?


Thanks for your insight.

windows 7 - Samsung Laptop cuts out at 37% battery life

I use a Samsung i5 (I think, I'm nowhere near the box to check specifics) laptop purchased summer of last year, running Windows 7 with a Quad core and AMD Radeon graphics. I'm pretty gentle with it, and leave it plugged in while using intensive programs, but within the last month my battery life has been strange. It would normally run down to 15%, give a warning, and shut off by 10 if I hadn't plugged in. Now I get about 37% and no warning- I've been exceedingly glad of Word's backup feature.


As a matter of course, it's always run a bit warm and I keep the vent clear, so I don't think it's overheating (I've been vigilant, having two pets). It's also set to Power Saver when unplugged with the lowest brightness settings, so I should have about 3 hours of battery life.


Any help much appreciated. I figured it'd be best to ask around before calling in my warranty.

Windows 10 Desktop wakes from sleep to hibernate even when disabled


A strange occurrence has recently been annoying me: I usually put my computer into sleep mode rather than shutting it down, but Windows has started deciding I really want to hibernate instead. Between 1 and 10 minutes after sleeping, the computer wakes up and hibernates. It only wakes very briefly and it seems impossible to prevent it from going into hibernation, but input is nevertheless registered.


In Event Viewer the reason for the wake is the infamous "S4 Doze to Hibernate" as the Wake Reason.


By my understanding the setting governing this behaviour is the "Hibernate After" setting listed under Sleep in the settings of the current power plan. Most people seem to be able to alter this behaviour by changing this setting to a high number or to zero, disabling it. However, this setting is already zero, i.e. "Never," yet the phenomenon still occurs. I tried changing it to a very large number (999999) but the computer still wakes up. In this situation, though, it seems like the computer wakes up, attempts to hibernate and fails to do so: subsequently booting up doesn't succeed properly and the computer reboots itself.


This is pretty bizarre behaviour because it seems like it should only occur with a computer on battery power anyway. What else governs this behaviour, and how can I disable it - without also disabling some other useful feature (e.g. disabling wake timers, disabling hibernate, that kind of thing)?


Answer



I believe I've found the answer to this particular problem thanks to this page.


The problem was caused by the service AdaptiveSleepServices which was included in some update to AMD drivers. I have disabled the service and switched it to not automatically start as per the page's suggestion and this seems to have fixed the problem (my computer hasn't woken up to hibernate, and it should have done by now.)


It's worth noting that, though this service is from AMD, I've switched my graphics card to an nVidia one so have no AMD hardware running any more and have completely deleted AMD drivers using Driver Sweeper. This did not get rid of the service.


Why on earth AMD includes this trash in its drivers when there is a perfectly serviceable API for performing the same function is, unfortunately, plainly obvious: incompetence.


iso image - What's the difference between burning an ISO and copying a DVD's contents?




Is converting a DVD to an ISO, and then burning that ISO onto another DVD exactly the same thing as copying all the files from one DVD to another? What about if instead of copying to another DVD, I copied to a USB flash drive (i.e. DVD > USB), would it still be the same thing as DVD > ISO > USB?



If they are the same, then why does Microsoft have a specific tool for copying the Windows 7 ISO onto a USB flash drive? Couldn't I use any tool that extracts an ISO and copy the resulting files onto a USB flash drive? Or if I had the original DVD, couldn't I copy the files from the DVD directly to the USB flash drive without bothering with Microsoft's utility at all?


Answer



The major advantage of an ISO is that burning it as an image preserves the bootloader, where extracting and burning the contents does not. The bootloader needs to go on a specific part of the CD/DVD/USB drive for it to be bootable. Just burning the contents does not do this.



The other advantage is that you can make a checksum of the entire ISO instead of each file it contains. That can be used to make sure that the download happened without error.


Windows 7 - Windows Update failing - Error code 80071A91


I have a Windows 7 Home Premium 64-Bit installation where Windows Update has stopped working for no apparent reason.


6 new important updates are listed as available. No matter whether I try to install all of them or just a subset, it always goes like so:



  1. Updates are being downloaded.

  2. One update after the other is reported as being installed. ("Update x of n is being installed ...")

  3. After the last update has been "installed", the Windows Update icon turns red and it is stated that none of the updates were installed. (I.e. if I tried to install 6 updates, it says "6 updates failed to install.". An error code of 80071A91 is reported.


When googling for this error code, I found advice to delete files in %windir%\system32\config\txr and %windir%\system32\SMI\Store\Machine. Unfortunately, this didn't help.


What can I do? Any log file I can check?


Answer



How-to reset the File System Resource Manager if you receive error 0x80071A91



  1. Click Start click All Programs click Accessories, right-click Command Prompt, and select Run as administrator.

  2. In the Command Prompt window you will need to type the following: fsutil resource setautoreset true C:\ and press ENTER


  3. Note: You will need to replace the C:\ with the drive letter that Windows 7 is installed on.


  4. Restart your computer, and then attempt to install the failed update(s).


As always you can try the Microsoft FixIt Tool.


xls - Dutch Excel displaying dates in different formats even though they are in the same format in the file - is there a way to ensure consistency?

We create files with dates in them in the form dd/mmm/yyyy.
These spreadsheet files are in html format with extension .xls (Further info: created via HttpContext.Current.Response.ContentType = "application/vnd.ms-excel";)


When I load one of these files into Excel 2007 on my Win7 machine the dates all appear as dd-mmm-yy (e.g. "28-Jun-2010") - and this is the same behaviour as when we load the files into older Excel programs also localised English.


When this same file is loaded into Excel 2002 NL on XP that is localised Dutch (and that I do not have access to) some dates appear as dd-mmm-yy but other dates appear as dd/Mmm/yyyy.


This seems to be down to the month element of the date:


Months with "Oct", "Mar" or "May" in them appear as dd/Mmm/yyyy (e.g. "30/Mar/2010")
other months appear as dd-mmm-yy (e.g. "28-jun-10")


When I look at the cell format info the cells I get "custom"/"dd-mmm-yy" for cells that appear as dd-mmm-yy and "General"/"no specific number format" for those that show as dd/Mmm/yyyy.


Why those particular months? I assume down to localisation?
Is there a way to get all the dates displayed consistently without having to manually alter the tables?


Is there a setting in Excel NL to do this?


Update:
Just checked - May, March, & October are the three months where the short three-letter form of the month does not match in both English and Dutch (the other months do.) Therefore this is why these dates are not being picked up as dates.


Is there a way to enable Excel to pick these up as dates - even though the short form does not match the English?

Trying to delete a directory stored on a Windows server, mounted on a Mac

I am trying to delete a directory stored on a Windows 2008 R2 server, mounted on a Mac as network home (10.8.5). The directory was created by Safari and stores temporary internet files. I need to be able to delete this folder on logout to support cache redirection.


The Terminal on Mac shows the directory as empty:


36W-FacRm-02:History lwickham$ cd /home/lwickham/Library/Caches/Metadata/Safari/History
36W-FacRm-02:History lwickham$ ls -al
total 0
drwx------ 1 lwickham CGPS\Domain Users 264 Nov 8 09:24 .
drwx------ 1 lwickham CGPS\Domain Users 264 Nov 8 09:28 ..

However, on the Windows server it has a single 0kb file that doesn't start with a "." but yet is invisible to the Mac.


E:\FacultyHome2\lwickham\Library\Caches\Metadata\Safari\History>dir
Volume in drive E is FacultyUsers2
Volume Serial Number is 8C17-4EF3
Directory of E:\FacultyHome2\lwickham\Library\Caches\Metadata\Safari\History
11/08/2013 09:24 AM
.
11/08/2013 09:24 AM
..
11/07/2013 04:28 PM 0 http?%2F%2Fwww.google.com%2Furl?sa=t&rct=
j&q=&esrc=s&source=web&cd=6&ved=0CFsQFjAF&url=http%253A%252F%252Fwww.usbanklocat
ions.com%252Fhsbc-bank-usa-96th-street-branch.html&ei=5vR7UtmXEPjfsATe0YCIBA&usg
=AFQjCNF9ypKbpYbXRng00FY3W8Y6cF1Tiw&bvm=bv.56146854,d.
1 File(s) 0 bytes
2 Dir(s) 514,231,967,744 bytes free

All my attempts to delete the dir from the Mac have failed:


36W-FacRm-02:History lwickham$ rm -fr /home/lwickham/Library/Caches/Metadata/Safari/History/*
36W-FacRm-02:History lwickham$ rm -frd /home/lwickham/Library/Caches/
rm: /home/lwickham/Library/Caches//Metadata/Safari/History: Directory not empty
rm: /home/lwickham/Library/Caches//Metadata/Safari: Directory not empty
rm: /home/lwickham/Library/Caches//Metadata: Directory not empty
rm: /home/lwickham/Library/Caches/: Directory not empty

Some new files have been created since I last looked. They appear to start with "http/" and show up in both the Mac and Windows side. However, the file that starts with "http?" continues to only be visible on Windows. Notice the total of 6 files on mac and 7 on Windows


Directory of E:\FacultyHome2\lwickham\Library\Caches\Metadata\Safari\History
11/11/2013 10:47 AM
.
11/11/2013 10:47 AM
..
11/11/2013 10:47 AM 202 https?%2F%2Fwww.google.com%2Fsearch?clien
t=safari&rls=en&q=disable+spotlight+launchd&ie=UTF-8&oe=UTF-8.webhistory
11/11/2013 10:46 AM 244 https?%2F%2Fwww.google.com%2Fsearch?clien
t=safari&rls=en&q=how+do+I+do+a+quit+claim+deed+in+new+york+city&ie=UTF-8&oe=UTF
-8.webhistory
11/11/2013 10:47 AM 2,004 http?%2F%2Fwww.cgps.org%2F.webhistory
11/11/2013 10:47 AM 324 http?%2F%2Fwww.google.com%2Furl?sa=t&rct=
j&q=&esrc=s&source=web&cd=1&ved=0CCsQFjAA&url=http%253A%252F%252Fosxdaily.com%25
2F2011%252F12%252F10%252Fdisable-or-enable-spotlight-in-mac-os-x-lion%252F&ei=H_
yAUpqqM6SxsAT9w4BY&usg=AFQjCNEUPAuccRHkNM7yl0alnETvA2-
11/08/2013 10:48 AM 0 http?%2F%2Fwww.google.com%2Furl?sa=t&rct=
j&q=&esrc=s&source=web&cd=19&ved=0CJIBEBYwCDgK&url=http%253A%252F%252Fforums.mac
rumors.com%252Fshowthread.php%253Ft%253D664445&ei=mwd9UqTDIsagsQTG-oCoBQ&usg=AFQ
jCNHW7DdAq8pwA9JNvBcruMj-IbV2rA&bvm=bv.56146854,d.cWc.
11/11/2013 10:46 AM 339 http?%2F%2Fwww.google.com%2Furl?sa=t&rct=
j&q=&esrc=s&source=web&cd=2&ved=0CFYQFjAB&url=http%253A%252F%252Fwww.nytimes.com
%252F2003%252F06%252F01%252Frealestate%252Fq-a-quit-claim-deed-and-title-insuran
ce.html&ei=zvuAUvOlG8n_4APR6IC4Cg&usg=AFQjCNGLiAdM7qgs
11/07/2013 04:28 PM 0 http?%2F%2Fwww.google.com%2Furl?sa=t&rct=
j&q=&esrc=s&source=web&cd=6&ved=0CFsQFjAF&url=http%253A%252F%252Fwww.usbanklocat
ions.com%252Fhsbc-bank-usa-96th-street-branch.html&ei=5vR7UtmXEPjfsATe0YCIBA&usg
=AFQjCNF9ypKbpYbXRng00FY3W8Y6cF1Tiw&bvm=bv.56146854,d.
7 File(s) 3,113 bytes
2 Dir(s) 516,569,677,824 bytes free
4WN-408-Teacher:~ lwickham$ ls -labi /home/lwickham/Library/Caches/Metadata/Safari/History
total 48
100050239 drwx------ 1 lwickham CGPS\Domain Users 264 Nov 11 10:47 .
100049965 drwx------ 1 lwickham CGPS\Domain Users 264 Nov 11 10:49 ..
100391816 -rwx------ 1 lwickham CGPS\Domain Users 2004 Nov 11 10:47 http:%2F%2Fwww.cgps.org%2F.webhistory
100392984 -rwx------ 1 lwickham CGPS\Domain Users 324 Nov 11 10:47 http:%2F%2Fwww.google.com%2Furl?sa=t&rct=j&q=&esrc=s&source=web&cd=1&ved=0CCsQFjAA&url=http%253A%252F%252Fosxdaily.com%252F2011%252F12%252F10%252Fdisable-or-enable-spotlight-in-mac-os-x-lion%252F&ei=H_yAUpqqM6SxsAT9w4BY&usg=AFQjCNEUPAuccRHkNM7yl0alnETvA2-
100392041 -rwx------ 1 lwickham CGPS\Domain Users 339 Nov 11 10:46 http:%2F%2Fwww.google.com%2Furl?sa=t&rct=j&q=&esrc=s&source=web&cd=2&ved=0CFYQFjAB&url=http%253A%252F%252Fwww.nytimes.com%252F2003%252F06%252F01%252Frealestate%252Fq-a-quit-claim-deed-and-title-insurance.html&ei=zvuAUvOlG8n_4APR6IC4Cg&usg=AFQjCNGLiAdM7qgs
100392041 -rwx------ 1 lwickham CGPS\Domain Users 339 Nov 11 10:46 http:%2F%2Fwww.google.com%2Furl?sa=t&rct=j&q=&esrc=s&source=web&cd=2&ved=0CFYQFjAB&url=http%253A%252F%252Fwww.nytimes.com%252F2003%252F06%252F01%252Frealestate%252Fq-a-quit-claim-deed-and-title-insurance.html&ei=zvuAUvOlG8n_4APR6IC4Cg&usg=AFQjCNGLiAdM7qgs
100392982 -rwx------ 1 lwickham CGPS\Domain Users 202 Nov 11 10:47 https:%2F%2Fwww.google.com%2Fsearch?client=safari&rls=en&q=disable+spotlight+launchd&ie=UTF-8&oe=UTF-8.webhistory
100391867 -rwx------ 1 lwickham CGPS\Domain Users 244 Nov 11 10:46 https:%2F%2Fwww.google.com%2Fsearch?client=safari&rls=en&q=how+do+I+do+a+quit+claim+deed+in+new+york+city&ie=UTF-8&oe=UTF-8.webhistory

windows 7 - How to change logical partition into primary one?


Currently I have both Windows XP and Windows 7 installed as dual-boot.
I've been wanting to remove my XP installation for a long time (was waiting to buy an external HDD to backup the data) to get some more space in my Windows 7 partition, since I'm running out of it.


Here are the partitions I have in my drive:


/sda1 - Primary - Windows XP - 150GB
/sda2 - Extended
--/sda5 - Logical - Data - 99GB
--/sda6 - Logical - Windows 7 - 50GB

They are shown like they are physically ordered in the HDD (from the left to the right, i.e sda1 comes first, then sda2, etc).


I backed up all of my data, and used GParted (from an Ubuntu LiveUSB) to try and:



  • Delete the whole partition that has Windows XP

  • Make my Windows 7 partition a primary one, so my system can boot from it

  • Extend the Windows 7 partition (that has 50GB) with the 150GB unallocated space left by the deleted Windows XP partition, so my
    Windows 7 partition ends up with 200GB


However, I tried using GParted and couldn't figure out how to do it. I'm not really sure how to change the sda6 partition into a Primary one, and put it in such a way so it can be extended with the space left from sda1 (after deletion).
I'm fine with leaving sda5 as a logical partition.
As far as I've tried, the only thing I can do after deleting the sda1 partition is extend sda2, which is not exactly what I want.


Thanks


EDIT: I also have the Windows 7 installation disk, so if the MBR table gets modified I can repair it from it.


Answer



You can use fixparts, a useful utility that exists in Linux, Windows, Mac OS and FreeBSD. You can download from this Web page. You can also find extensive documentation here.


Since you already have an Ubuntu live stick, I suggest you boot from that, choosing Try Ubuntu without installing. I cannot remember whether fixparts is already on the live; in any case, open a terminal and issue


   man fixparts

If you get a reply fine, otherwise you can install it by means of


   sudo apt-get install gdisk

(thanks to @RodSmith for pointing this out).


Now I will assume your boot stick is /dev/sdb, while your fixed disk is /dev/sda. If it is not so, please change what follows accordingly.


Mount briefly your HDD:


      sudo mount /dev/sda5 /mnt

Save the current partition table in a safe place:


   sfdisk -d /dev/sda > /mnt/parts.txt

Please remember that files on the USB stick are temporary: they are lost as soon as you turn the pc off. So you will have to save the file above on a different drive than the stick; and this is why I suggested to mount the partition above. If you need to re-load the partition table above, the command is:


  sfdisk -f /dev/sda < /mnt/parts.txt

Now unmount the partition above,


   sudo umount /mnt

and start fixparts:


   fixparts /dev/sda

And now p will print the partition table, h will print available commands, r turns a logical partition into primary partition, w writes changes to the disk.


The Tutorial referenced above explains under which conditions you can turn a primary partition into a logical one, and viceversa, but even more revealing is the follwoing table that fixparts will present you:


                                                     Can Be   Can Be
Number Boot Start Sector End Sector Status Logical Primary Code
1 * 62 1171799 logical Y Y 0x07
2 1171800 1562399 primary Y 0x83
3 1562462 3124799 primary Y 0x0C
5 3124862 3980213 primary Y 0xAF

which presents very clearly which partition can change status logical/primary.


When done, write changes (w) to disk, reboot without the USB stick.


Edit:


Make sure your /etc/apt/sources.list contains all of the following lines:


  deb http://us.archive.ubuntu.com/ubuntu/ saucy main restricted
deb http://us.archive.ubuntu.com/ubuntu/ saucy-updates main restricted
deb http://us.archive.ubuntu.com/ubuntu/ saucy universe
deb http://us.archive.ubuntu.com/ubuntu/ saucy-updates universe
deb http://us.archive.ubuntu.com/ubuntu/ saucy multiverse
deb http://us.archive.ubuntu.com/ubuntu/ saucy-updates multiverse
deb http://us.archive.ubuntu.com/ubuntu/ saucy-backports main restricted universe multiverse
deb http://security.ubuntu.com/ubuntu/ saucy-security main restricted
deb http://security.ubuntu.com/ubuntu/ saucy-security universe
deb http://security.ubuntu.com/ubuntu/ saucy-security multiverse
deb http://archive.canonical.com/ubuntu/ saucy partner
deb http://extras.ubuntu.com/ubuntu/ saucy main

This is for Ubuntu Saucy Salamander (13.10), adapt to the version you are running (precise?).


Wednesday, August 29, 2018

windows 7 - Attempting to Install MSU hotfixes results in "Searching for updates on this computer..." to last forever


I am attempting to install two hotfixes manually from Microsoft - one addresses the svchost.exe extreme memory usage problem, and the other addresses the slow Windows Update problem.


This system is a freshly installed Windows 7, and I have the two MSU updates saved locally to my desktop, but it is never actually finding such updates, and therefore never actually installs the two fixes.


Is there a way to force Windows Update Standalone Installer to just install the single update and not look for all the updates?


Answer



The message is misleading. It searches if the update can be installed or if the update is no longer needed (superseded).


Line #, DPC/ISR, Process, Stack Tag, Stack, Count, TimeStamp, % Weight
10, , , , wuaueng.dll!CUpdatesToPruneList::PopulateSupersedenceInfo, 31521, , 43,72
11, , , , wuaueng.dll!CUpdatesToPruneList::AddSupersedenceInfoIfNeeded, 31521, , 43,72

WUSA.exe, which is used to install MSU updates, is just a wrapper to Windows Update. After Windows Update installed an update it hangs again in a loop to check if updates apply or not and those checks are useless after an install and this loop blocks you from installing other MSU updates.


To speedup the Installation, stop the WindowsUpdate service via GUI (services.msc) or via elevated (running as admin) command line (net stop wuauserv). Now the loop is stopped and updates install faster.


Install the first MSU update, stop WindowsUpdate service again and install the 2nd MSU file.


I also created a script with enums all MSU files in the same folder as the CMD and installs them and stop WU service on it's own everytime to speedup setup.


Unknown symbol in an Excel spreadsheet cell


I use an Excel spreadsheet that I inherited as part of my job, and it has a feature that I'm curious about.


One of the data cells has a small right angle shape in the bottom-right corner, and I don't know what the symbol is meant to denote.


Here's a screenshot:


Some cells from an Excel spreadsheet


The symbol in question is in the rightmost column, second row from the bottom.


Answer



That looks like the mark of a "table" in Excel. If you click on that cell, does a "Table Tools" tab appear in Excel's ribbon? If so, it means that Excel is auto-formatting the area as a table.


You can turn this off by clicking "Convert to Range" in the Table Tools > Design tab that appeared, but this will eliminate any pretty formatting that Excel has set up (eg, no more row banding on new rows).


Tuesday, August 28, 2018

file recovery - overwrote ~/bin folder


Somehow I accidentally overwrote my ~/bin.


I typed the command: $ cp /home/dsg/Downloads/sbt-launch-0.7.4.jar ~/bin


I was trying to copy the file into my bin folder but instead overwrote the folder.


Now:


$ cd ~/bin
bash: cd: /home/dsg/bin: Not a directory

And:


$ diff /home/dsg/Downloads/sbt-launch-0.7.4.jar ~/bin

Shows no differences.


What do I do?


Answer



When you copy a file using the command you used:


$ cp /home/dsg/Downloads/sbt-launch-0.7.4.jar ~/bin

different things happen depending on what the target is.


1) ~/bin is a directory


The file will be copied into the ~/bin directory keeping the original name of the file.


2) ~/bin is a regular file


The file ~/bin will be overwritten by the source file.


3) ~/bin does not exist


The source file will be copied to the destination name creating a new file.


By default the ~/bin directory doesn't exist, so unless you created a directory at some time in the past called ~/bin then option 3 will be what happened. If there was a ~/bin in existance, then for the cp command to overwrite it it must have been a regular file and not a directory.


You should delete the ~/bin file and create a directory with:


$ rm ~/bin
$ mkdir ~/bin

Then you can copy the jar file into it with the same command you used before.


(Thanks to @grawity and @garyjohn on whose comments to the question this answer was based upon.)


linux - How to synchronize the home folder between multiple computers?

I have three computers at home, and would like to have the /home/ folder tree synchronized between the three.
Any files/folders (except those hidden) that are modified/added/removed in one of the three computers is updated in the other two.



Is rsync enough to do this? and how?

Set password for root on virtualbox ubuntu


I loaded ubuntu into virtualbox. It all works well but it occurred to me that I was not asked (or did not setup) a root password. I want to use root on occasion, but I cannot seem to find out how to do this. I've tried to access the sudoers file as well as run visudo but have no authority without root!


Any ideas how to get or setup root password?


I do have a root user in /etc/passwd.
The two accounts I have do not have authority to even manage groups, because it asks for root password and I don't know it!


Answer



Ubuntu uses sudo by default. If you preface your command with "sudo" it prompts for your user password and then runs it as root. To get a root session use:


sudo -i

To enable the root account, open a terminal and run the following to set a root password:


sudo passwd root

For more information see:



https://help.ubuntu.com/community/RootSudo



Unable to disable auto brightness adjustment on ASUS laptop with Windows 10




I've tried everything posted in the accepted answer for this question and none of the proposed solutions work for me, the screen keeps going dark when I'm on a dark window which is very annoying because I use dark windows for most programs I work with.



Does anyone have any other working solutions for this problem?


Answer



There may be a registry solution for this if the power settings GUI didn't help:





  1. Press Win+r

  2. Type regedit and press Enter


  3. Navigate to HKEY_LOCAL_MACHINE\Software\Intel\Display\igfxcui\profiles\media\Brighten Movie and change ProcAmpBrightness to 0

  4. Navigate to HKEY_LOCAL_MACHINE\Software\Intel\Display\igfxcui\profiles\media\Darken Movie and change ProcAmpBrightness to 0




Reference: This solution on superuser


hard drive - HDD turning off despite power settings

I recently bought an SSD and installed Windows 7 Ultimate on it. Now I am using it and despite setting the power options to "Never" turn off hard disks one of my old HDDs is turning off when not used.


I have made sure I accessed the advanced settings of the power plan that I have chosen to be the active one.


This hasn't happened before.


Environmental changes:

- New SSD added.

- Windows installed on new SSD.

- The primary Windows installation used has been changed to the one on the SSD.

Monday, August 27, 2018

windows 7 - Toshiba laptop NB300 dual screen problems

I have a Toshiba NB300 laptop with Windows 7 and it has one monitor port on the side.


I've have tried plugging in another monitor but it wont let me dual screen (ie 2 independent displays).


I can only do one screen or the orther, or duplicate screen.


Do I need to do something special to get dual screen? Is it just a limitation of my laptop?

macos - Any way to make Mac understand Windows file paths

My organisation use Windows almost exclusively, but I use a OSX for my work. Their intranet and many applications links to files on the org's Samba shares directly (e.g. "W:\Folder\File.ext")


Long shot, but is there a way I can force OSX to access the relative path on a mounted SMB volume? (e.g. "W:\Folder\File.ext" > "/Volumes/W/Folder/File.ext")

windows vista - DirectX games crash computer after ~6 minutes


For a little over a week now I have been having an issue where some games rendered using DirectX have been crashing after a small period of time. Usually the result is similar to an immediate system shutdown but with the lights still on and fans still blowing.


GuildWars 2 and Space Engineers are the two primary games the crash occurs in. Since finding out the crash occurs in more than one game I have thoroughly checked for heat issues leading up to the time of the crash using both hardware monitors and my own hand to see if it is overheating and I can safely conclude it is not.


Suspecting the PSU, I have used a multimeter to detect the voltage being supplied to the video card 6-pin power, as well as a molex connector on a different rail. The 6-pin video card power connectors showed 12.4v. The 5v power on the molex connector showed exactly 5v. I do not appear to have a dying power supply.


I have downloaded some benchmark tools to see how reproducible the crash is. Furmark 1.13.0, Unigine Heaven 4.0, and Unigine Valley 1.0 are the benchmark tools I have used for this. I have ran Furmark for over 30 minutes with GPU load sustained at 99%-100% the entire time and wasn't able to produce a crash.


Next I moved on to Unigine Heaven benchmark with resolution at 1920x1080, quality at Ultra, and DirectX11 as the renderer. The test lasted the expected ~6 minutes before crashing. If I set the quality to high instead this benchmark doesn't appear to crash after ~15 minutes regardless of renderer. Unigine Valley benchmark I couldn't get to crash on high or ultra settings, at 1920x1080 resolution, and DX9, DX11, or OpenGL renderer.


I have also attempted to load up much older games to see if I could find any more patterns. I was successfully able to play Unreal Tournament (original) and Unreal Tournament 2004 for over 30 minutes each with no issues. I also launched Halo PC and was able to play that for over an hour, again with no issues.


Suspecting a faulty DirectX install I attempted look at DirectX Diagnostic tool to see if it was reporting any issues, but there were none reported. I attempted to install DirectX but it reported that I already have the newest version. I attempted to alter the DirectX version registry key on my system to trick it into installing anyway, but it still insisted I had the newest version. I have also already installed the newest graphics driver for my video card. I used the cleaning utility from AMD, and rolling back what remains until I saw a Microsoft provided driver in device manager to ensure a clean install.


Most recently I have also attempted to reduce the graphics settings to low in GuildWars 2 and Space Engineers hoping the crash could be worked around until a more permanent solution could be found. However doing so made zero impact on the crash behavior.


Where do I go from here?



  • Processor: AMD Phenom II x4 965

  • RAM: 16GB

  • Video Card: Gigabyte AMD Radeon HD 7970 3GB

  • Video Driver: 13.251.0.0 dated 12/6/2013

  • Power Supply: Raidmax Quantum RX-700 700w ATX12V V2.2

  • OS: Windows Vista 64-bit with SP2


Answer



As a part of troubleshooting I tried to put a different video card into my computer to see if the behavior would change. The video card did not use 6-8 pin external power and when I tried to start up my computer it wouldn't post. Knowing it was a good video card a friend provided a power supply tester to check the motherboard power. When used the testing device flickered.


So I ended up buying a new power supply and the issue is resolved. Unusual though that no issue was detected on the 12v rail supplying power to the video card, but power from the slot was faulty.


storage - How is eMMC 'permanent write-protection' implemented?

According to this document, it appears that eMMC devices can be put into a 'permanent write-protection' mode, either for the entire device or a limited area, by sending certain commands programmatically to the device. Apparently, once that is done, that portion of the device is read-only and the operation cannot be reversed.



My questions are:




  • How is this feature implemented?

  • Surely, if some bits in a register can be set by a command, then it should also be possible to unset them?

  • Is it really not possible to 'undo' this 'permanent write-protect' of an eMMC device?

sync - Windows NTP Client Not Syncing with my ESXi NTP Server


I have an ESXi 5.1 server configured as a NTP server and a local Windows Server 2008 R2 PC that aren't syncing. I've read that whenever an ESXi server is run as a client, it also acts as a server, so I enabled it as an NTP client and simply added no servers to the server list, and then I enabled port 123 incoming/outgoing by adding firewall settings from the ESXi Shell.


I'm almost positive that it's not a firewall issue. I've completely disabled the firewall on my local PC. Running "w32tm /monitor /computers:-IP of server-" gives me the time of the server, and running the NTPQuery software gives me a response back on port 123 with the server's time.


I have tried:



  • Date/Time settings (right-click on notification area-->Adjust
    date/time-->Internet Time-->set as IP of server) -- syncing fails (An error occurred while Windows was synchronizing with -IP of server-)

  • Group Policy Editor (Computer Configuration\Administrative
    Templates\System\Windows Time Service, currently disabled though because I've heard this causes problems) --
    syncing fails

  • Registry Editor
    (HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\W32Time\settings) -- syncing fails

  • Command Prompt, using:


.


w32tm /config /manualpeerlist:-IP of server- /syncfromflags:MANUAL /reliable:yes /update
net stop w32time && net start w32time
w32tm /resync /rediscover

This updates the registry correctly, but outputs "The computer did not resync because no time data was available." And whenever I use the command "w32tm /query /source" the source is always "Local CMOS clock."


Here is the output of w32tm /query /configuration


[Configuration]
EventLogFlags: 2 (Local)
AnnounceFlags: 5 (Local)
TimeJumpAuditOffset: 28800 (Local)
MinPollInterval: 10 (Local)
MaxPollInterval: 15 (Local)
MaxNegPhaseCorrection: 3600 (Local)
MaxPosPhaseCorrection: 3600 (Local)
MaxAllowedPhaseOffset: 1 (Local)
FrequencyCorrectRate: 4 (Local)
PollAdjustFactor: 5 (Local)
LargePhaseOffset: 50000000 (Local)
SpikeWatchPeriod: 900 (Local)
LocalClockDispersion: 10 (Local)
HoldPeriod: 5 (Local)
PhaseCorrectRate: 1 (Local)
UpdateInterval: 360000 (Local)
[TimeProviders]
NtpClient (Local)
DllName: C:\windows\system32\w32time.dll (Loca
Enabled: 1 (Local)
InputProvider: 1 (Local)
AllowNonstandardModeCombinations: 1 (Local)
ResolvePeerBackoffMinutes: 15 (Local)
ResolvePeerBackoffMaxTimes: 7 (Local)
CompatibilityFlags: 2147483648 (Local)
EventLogFlags: 1 (Local)
LargeSampleSkew: 3 (Local)
SpecialPollInterval: 900 (Local)
Type: NTP (Local)
NtpServer: -IP of server-,0x1 (Local)
NtpServer (Local)
DllName: C:\windows\system32\w32time.dll (Loca
Enabled: 1 (Local)
InputProvider: 0 (Local)
AllowNonstandardModeCombinations: 1 (Local)

Any ideas? Thanks in advance.


Answer



I found the answer. I had to set my upstream server as my own clock with IP address 127.127.1.0 to make my server's clock synchronized.


The reply from the ESXi server shows that the leap indicator is 3 and the server stratum is 0. This means that the ESXi NTP server is running unsynchronized and is unable to provide a valid reference time to clients. According to RFC 4330, Simple NTP (SNTP) clients should not use the time in an NTP reply packet if the returned stratum is 0 (and the leap indicator is 3).


Sunday, August 26, 2018

SSD frezzes in Windows 10 with 100% active time 0 read 0 write 0 responses time

My new Kingston SSD is freezing a lot on Windows 10. 
I have used more than app to check the SSD and all give me that the SSD is 100% healthy and everything is OK, but I check the Task Manager when the lap freezes it shows that the disk is 100% active 0 read 0 write 0 responses time


What I have tried so far:



  • Disabling the Page file for C:.

  • Running System File Checker /SFC with administrative privileges.

  • Disabling several services: Windows Search and Superfetch and prefetch

  • Checked SMART status of SSD using Kingston SSD Toolbox.

  • Updated Windows using Windows Update.

  • reinstalling Windows

  • secure erase the SSD

  • contact Kingston for help

  • checking TRIM is enabled

  • check the AHCI driver

  • updating all drivers

  • scan for virus and malware


Any new ideas?

Saturday, August 25, 2018

linux - basename command is outputting an 'enter' character along with the file name

I'am reading a text file line by line using while loop whose contents are directories and file names. I read the file names using basename command. I want to check if that file exists in a directory. But the below written code does'nt work. When i echo the basename command, it is outputting an 'enter' character along with the file name. How do i remove the 'enter character' ?



while read line;do
file=`basename "$line"`

dir=`dirname "$line"`
if [ -f "/data/config/${file}" ]; then
echo "${file} is present"
fi
done < /data/textfile.txt*


content of textfile.txt is given below



config/local/common/environment.properties

config/local/common/jmsservices.xml
config/local/common/ejbservices.xml

windows 7 - Extreme Kernel Paged Pool Memory Use (Win 7 64-bit)

I'm currently running Win 7 Pro 64-bit on a file server system with 12 hard drives. The drives are connected through 2x IBM M1015 controller cards (flashed to LSI 9211-8i IT mode firmware). I'm using the system as a media file server, and running FlexRAID to manage a snapshot-RAID array. Files are very large Blu-ray backups, MKV files, typically 25-35 GB in size.




When FlexRAID performs a data integrity check (called "Validate"), it reads from all data disks simultaneously and calculates each file's checksum. When I run this task, my Paged Pool memory use quickly rises until the virtual memory allocated is gone, at which point Windows expands the VM pool. This continues until the task finally completes, but during this time my system becomes very slow and unstable.



Process Explorer shows no process that is causing the leak. FlexRAID is using only 79K of memory. Using Poolmon, I've discovered that the MmSt tag is the culprit -- but this is Window's own memory manager. For an unknown reason, Windows is mapping the MKV files into virtual memory, causing the high usage. I'm not sure how to stop this.



I've tried the suggestions shown in KB312362 (written for MS Server 2003), but it didn't work. I've turned off MS Security Essentials and the Superfetch service, but also no improvement.



Is there a way for me to dig deeper into this, to see what the root cause could be?

keyboard - Right shift key not working with " key

I am facing an unusual problem with my laptop's keyboard.


Please read carefully, as this might sound a little confusing.


My ' (single quote) key seems to be working just fine; my right Shift key is also (mostly) working.
But when I try to use use the right Shift key along with ' key to produce a " (double quote), it doesn't work.


To get a ", I have to press left Shift+'.


All the keys seem to be working just fine except the combination of these two. I don't understand why.




EDIT 1: When I press right Shift+' key, nothing appears on the screen. Again nothing happens when I press right Shift+' twice. Nothing appears on the screen later on.


I am using Windows 7.


This problem didn't occur earlier. One fine morning, my keyboard had stopped working. Just stopped working, I don't know why. So I shut it down. Two hours later, it started working again on its own. The problem has started since then.


EDIT 2: Okay, now another key combination is also not working, i.e. the same problem is occurring with the left Shift and the + key.


So my



  1. right Shift along with '

  2. left Shift along with +


are not working. Can't seem to understand why.

Friday, August 24, 2018

hard drive - Making SSD & HDD work together like a hybrid



I have a 90GB SSD but 90GB soon gets filled up. My users folder alone is 26GB. To get round this I use Symlinks (read the How-To Geek article for more).




Is there any way to make a separate SSD and HDD work like a hybrid so that frequently accessed files are moved to the SSD automatically? This would be a nice addition to Windows 8 but I'm not holding out my hopes.



I guess ReadyBoost is a bit like this but its more designed for USB sticks I think. I did try installing Windows 7 with the SSD as a readyboost but didn't really notice any much improvement over just using the HDD.


Answer



Given that hybrid hard drives like the Momentus® XT never really took off (there was only one manufacturer, so tier 1 OEMs did not want to use them, plus the drives only cached reads anyway), it looks like there are limited options for SSD hard drive caching, an add in SATA card or a software solution.





If you need more capacity but don't want to go full SSD, an SSHD might be an option.




More recent drives like the Seagate 3rd generation solid state hybrid drive (SSHD) look more promising than the original offerings, but there are trade-offs. They can allegedly cache some writes, but at the moment they still have very little flash (8GB MLC, with a small portion of the NAND set aside for use in SLC mode, similar to SanDisk’s nCache) and they are only 5400rpm drives.



These days more manufacturers are selling hybrid drives (after rebranding them as SSHD, which sounds deceptively close to SSD) but they are still only 5400rpm laptop SATA drives, no more than 4TB in size, and they still only have 8GB of flash.





Unfortunately, none of the options have anywhere near the performance of an SSD. At best you get performance closer to HD than SSD and at worst you get performance which is even lower than the HD on it's own!



On the plus side, if you are upgrading an old SSD then using that old SSD to cache your large storage drive could be a worthwhile option. SSD caching seems to benefit much less from newer, faster SSDs so you get most of the caching benefit from older, relatively slow SSDs.




Add-in SATA cards



One option is an add-in SATA card which can provide this functionality. I believe there are enterprise level solutions for this, but as they are well out of my price range I haven't researched them. The HighPoint RocketHybrid 1220 is much more affordable though, and there is a nice article about this on Tom's Hardware Guide.



My experience with the Add-in SATA card option.



Having seen the Add-in SATA card option in action, I have to say that I'm not impressed with the Marvell 88SE9130 based card that I bought. HyperDuo was incredibly unreliable, the software kept crashing and the performance was rarely higher than the underlying hard drive on its own, even after hours of 'optimisation'.



Even using the card as a 6Gbps SATA III port resulted in worse performance with an Adata S511 SSD than just using the on-board 3Gbps SATA II ports.




Intel Smart Response Technology (requires motherboard support)



Another option is a motherboard with support for Intel Smart Response Technology (which started with the Intel Z68 chipset). Again, THG has a nice article providing an overview of what we can expect of the SSD caching capabilities of this and newer chipsets.



My experience with the Intel SRT option.



After having had the opportunity to play with a Z68 based motherboard, I was even less impressed with Intel Smart Response Technology than I was with HyperDuo!



At the time Smart Response Technology could only cache a Windows boot drive, so you couldn't have an SSD Boot drive and then use SRT to cache another drive in your system. You had to install Windows on the hard drive, install drivers, then the Intel® Rapid Storage Technology (RST) software and then add the SSD. At this point, if you were lucky then you would be able to see a new "Accelerate" tab on the RST application and if not then you may have to start the whole process from scratch to try and get it to work.




Apparently (thanks Nicholas) more recent versions of RST are substantially better. I haven't tried this yet, but apparently you can now cache a non boot hard drive as long as you start with a completely blank SSD (no partitions). You are still limited to 60GB of cache, but once the drive is set up as a cache, the remainder of the drive can be configured as a normal partition. Sadly you are still limited to caching a single drive or raid array.



Alternative software caching options



The last option is a non-Intel software caching solution, like Dataplex, which was bundled with the OCZ Synapse SSD. Unfortunately, this solution (like Intels SRT) only supported caching a single boot drive, so the only benefit was that it doesn't require a Z68 motherboard.



Unfortunately, I have yet to see a review from a site whose methodology I trust, so I can't tell how this option compares with SRT or the add-in card option.






Fire and forget solutions are all well and good, but sometimes it's just easier to manage these things yourself. Use your SSD and hard drive as separate drives, put stuff that you don't need fast access to on the HD and stuff that do on your SSD. Move things between them as and when you need to.



Tools like NTFS symbolic links, SSD Boost Manager and Folder2Junction could all help. See my answer to Trying to make SSD boot drive with Windows 7 and old drive is not accessible for more details.


windows - How can I tell if my batch file is running?


I have a batch script which is run from an AT command, and may get run more than once. When it starts, I need it to detect if it already running, and if so, exit (the second one) immediately.



  1. It must be robust, and handle if the scripts exits unexpectedly (i.e. so I can't set a flag on entry and clear it on exit)

  2. It must run in a Remote Desktop session

  3. I'm stuck on XP with Powershell v2, but don't mind writing a little exe if I can't do it in batch/powershell or vbs

  4. The script must run minimised, so I start it with Start "NAME" /MIN %COMSPEC% /C "MyScript.bat"

  5. Other cmd windows may be open so I need to check the running script

  6. The batch script runs as SYSTEM user, but I can't use any WMI


I was using PowerShell Get-Process to look at MainWindowTitle, but this didn't work when remote connecting to the computer as the script may be running, but not displayed in this remote connection instance. I this case, the cmd process is seen by Get-Process, but the MainWindowTitle is blank.


I've tried Get-Process and looked at the expanded StartInfo.EnvironmentVariables property, but can't see how to create an env var so that it appears in the property.


I thought about using /WAIT in the start command, then the AT will remain open until it finishes, but the script containing the AT is not minimised


Any ideas?


Answer



I believe a lock file is the simplest reliable solution. The trick is to make sure your running batch process maintains an exclusive write lock on the file until it terminates. The beauty of this system is that Windows will release the lock no matter what reason the batch terminates.


Once you have a lock file, you need a way to detect if the file is currently locked. I describe how to do this at How to check in command-line if a given file or directory is locked (used by any process)?


I've used this primitive, yet effective, technique to accomplish some fairly sophisticated tasks with Windows batch:


You are not clear where the batch file resides - on the remote machine, or the local machine, or if you might be running the script on multiple machines simultaneously, but only one active process per machine.


If the batch script is on the remote machine, and your process has write access to the script, then you can use the batch file itself as the lock file! You simply need to call a :subroutine while redirecting an unused file handle to the batch script using append mode. The CALL will fail if another process already has a lock. The lock will be released automatically when the script terminates (regardless of how it terminates).


myscript.bat


@echo off
:: Note - this extra call is to avoid a bug with %~f0 when the script
:: is executed with quotes around the script name.
call :getLock
exit /b
:getLock
:: The CALL will fail if another process already has a write lock on the script
call :main 9>>"%~f0"
exit /b
:main
:: Body of your script goes here. Only one process can ever get here
:: at a time. The lock will be released upon return from this routine,
:: or when the script terminates for any reason
exit /b

If your script is on a different machine than the process, but you only have the process running on one machine at a time, then I think the above will still work.


Perhaps a better alternative is to establish a dedicated lock file on each remote machine, separate from the batch script. Then you can run the process on as many remote machines as you want.


Windows 10 tablet not fluently communicating with Bluetooth printer


  • Tablet: Asus running Windows 10

  • Printer: Zebra iMZ320

  • Mode: Bluetooth



I am successfully able to pair the printer with the tablet and get the bluetooth pin code to print initially on the printer.




After that, I am unable to move forward with actually printing to the printer. As shown below, I see "Driver is unavailable".



enter image description here



I also see that this may be a known issue as per the Zebra forums.



Just wondering if anyone was able to get around this?

windows 7 - Desktop Background changing issues

My desktop background doesn't change, it seems that the ease of access option "remove background image (if possible)" is always checked, even after I uncheck it, it resets to checked, I managed to change the background from black to white but nothing more.
I have tried regedit.exe fixes, I have tried reeboting, creating new accounts, nothing works, can someone please help?
I'm running windows 7 home basic.

How reliable are 2.5" external hard drives?


I'm seriously considering keeping all my files only on external hard drives.


My main computer is a laptop, and currently I back up the files on it to multiple external hard drives. I'm thinking of changing that, and keeping the files only on external drives. 2.5" drives in enclosures are small enough that it's not hard to carry two of them around and 320GB is cheap and more than enough for all of my files including pics and videos.


My only concern is reliability. Am I more likely to have a drive like a WD Passport or HP Simple Save fail than the drive in my laptop? Those are the two drives I've got right now, I carry them around in lightly padded cases inside a backback.


It comes down to:



  • In general, are 2.5" drives in enclosures reliable enough to count on?

  • Specifically, does carrying them around pose any significant extra risk?


Answer



The problem with external enclosures is heat. Standard internal drives expect some ventilation, while external enclosures often seal the drive in with no forced ventilation.


If you want an external drive, it would be better to get something like the WD Passport, because it is already engineered with the intention for it to be used externally. Also, these types of external drives, being targeted for external use, will probably be engineered to withstand more bumping around than a standard internal drive(stuffed in an enclosure).


Now as far as your question about whether the external drive, or your laptop's hard drive is more reliable, I don't think can really be accurately answered. The best thing to do is assume either will fail at any time, and take precautions to protect your data! The problem with hard drives and reliability is it is very difficult to quantify or measure, and manufacturers generally have no incentive to invest in significant improvements to reliability. They can offer better capacity, RPM, and latency, in an effort to increase sales. However, increasing reliability through design and QA will cost them extra money and increase drive costs, and it is not something quantifiable that they can use to market and increase sales. So from one drive to the next, it's really hard to know what to expect.


hard drive - Can you build SSHD from SSD and HDD?


I have 1 SSD and 1 HDD. The SSD has 60GB of space and HDD has 1TB of space.


Is it possible to build an SSHD from it? I have herd is possible but if I search up this question it usually brings up normal SSHD.


My basic question: Is it possible to have SSD and HDD as 1 partition?


Answer



Yes and yes.


Almost all modern RAID controllers offer SSD caching functionality - starting from even basic consumer ones.


Intel Smart Response Technology is one option. If your motherboard has an Intel RAID controller from the 7x generation or above you probably have it built in. The biggest limitation is that you can only use up to 64GB of SSD cache with Intel SRT - but that's not an issue for you with a 60GB SSD.


https://en.wikipedia.org/wiki/Smart_Response_Technology


Third-party Marvell cards support more cache and operate in "hardware" with no size limitations. The following 4-port for example, allows 3 SSDs + 1 HDD:


http://www.amazon.co.uk/Syba-Marvell-HyperDuo-Support-Brackets/dp/B00AZ9T264


There are plenty more as well, these are just examples. Highpoint and LSI/Avago cards support it too, but they're more enterprise-orientated products. None of these of these actually require you to use RAID, they're just called RAID controllers because they share the core technology.


Thursday, August 23, 2018

vba - Excel 2013 global automatic macros

I am trying to log the opening and closing of excel workbooks to replace the Journaling capability in office.


I have created and tested VBA auto_open and auto_close macros in excel, which log these events to a file. I have then copied them to PERSONAL.xlsb. They run successfully when PERSONAL.xlsb is opened or closed. They have no effect when opening or closing any other workbook.


Am I missing something simple, or is this approach doomed to failure?

windows 7 - What happens if I create a process that already exists in the task manager?


I am developing an application in C # with the assembly name of one of the windows processes like svchost.exe, taskmgr.exe, winlogon.exe, etc. And I would like to know if this could cause some conflict with windows. My application is basically to prank a friend and I would like the user to not close it from the task manager. For this reason I want to put the name as one of the windows processes.


Any idea if this can cause problems? Any other suggestion of how to hide my application in windows?


Answer



You can have as many processes with the same name as you have resources to run them, each process will have it's own unique PID (Process ID) however which I don't believe you have any control over.


hard drive - how to recover a big NTFS partition that's missing the first 4kb?

I have two external USB3 HDD drives (2.5", both from Toshiba) that have a bad sector. One drive is sized 500GB, the other is 1TB. Interestingly, both show exactly the same problem:


The partition table is okay, but the drives are not able to read the very first 4kb of the single NTFS partition.


I was able to recover the rest of the drive using ddrescue, but - as said - the PBR is not recoverable.


the ddrescue map file looks like this for both drives:


# Rescue Logfile. Created by GNU ddrescue version 1.16
# Command line: ddrescue -s 1G /dev/sdg TEMP.img TEMP.img.map
# current_pos current_status
0x00100C00 +
# pos size status
0x00000000 0x00100000 +
0x00100000 0x00001000 -
0x00101000 ... +

For reference, the partition table of the smaller drive:


# fdisk -l /dev/sdc
Disk /dev/sdc: 500.1 GB, 500107859968 bytes
255 heads, 63 sectors/track, 60801 cylinders, total 976773164 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x460692ac
Device Boot Start End Blocks Id System
/dev/sdc1 2048 976769023 488383488 7 HPFS/NTFS/exFAT

AFAIK any NTFS partition should have a copy of the PBR somewhere, but I'm not able to read (mount) the partition neither with Linux, nor with Windows 7. They claim that the partition is not formatted.


Also tried with "Testdisk", but it is not able to restore the PBR as it can't find the root directory.


I'm experienced with parititioning (MSDOS, GPT) and linux file systems, but not that much with NTFS. Any way to recover that data?


The disks contain mainly photo files (Canon RAW, .CR2 format) and Adobe Lightroom catalogs.


Apparently the 500GB disk is actually formatted in FAT32, even if the partition table claims something else. I guess Windows doesn't really care the partition type and rather looks at the partition contents. When configuring Testdisk to expect a FAT32 LBA partition, then it is able to find the root directory and some subdirs (I think that proves that it's a FAT32 partition). However, Testdisk fails to find the vast majority of the files - no clue why.


As for the 1TB disk: Testdisk does not find any files neither in FAT32 nor in NTFS mode. I'm currently running RecuperaBit in hope that it is able to succeed.

battery - Can I charge my laptop with this charger

I forgot my charger at home but really need to get my pc running. I have a charger from a friend of my my pc has an output of 19V / 7.1 A and the friends has 19V/ 4.3 A. I know that the charger might overheat but what if I only charge when my pc is turned of will it still draw as many electricity when it is turned off? And I have a bit of a problem finding the polarity of my pc I found the one on the charger though


Edit: Found another one 19,5 V and 6,7 A should that one work

windows 10 - WIN10 Environment path variables not recognized when opening terminal from background context

I installed Java RE and Git, for example, and made sure their binaries were added to Environment Path Variables under both User and System variables. When I launch a command prompt from the taskbar, these variables work properly (i.e. commands "java" and "git" are recognized.


I also added "open command window here" to background context by editing the registry. But when I open a command prompt using this method, my environment path variables aren't recognized.


How can I make the command prompt recognize my environment variables when opened this way?

keyboard - Is there a way to re-map Insert to End on Windows?

Is there some way to use the registry hack in this post
Windows INSERT key anti-functionality accidentally triggers; how to stop it permanently?


to make the Insert key do the same as End? My Lenovo X240 keyboard has a compact keyboard with Fn keys mapped to things like changing brightness and volume by default, so I want to put FnLock on, but in that mode, the End key unwisely becomes Insert so I end up over-typing by mistake after trying to move to the End of the line.


But if I could change Insert to just still be interpreted as End, that would completely solve the problem.


TIA

visual studio - rc.exe from windows sdk missing

While doing some cleaning and reinstalling on my machine, I obviously cleaned one too many, and now I'm missing a rc.exe that's supposed to go either in my Visual Studio directory (not sure which one) or in my Microsoft SDKs directory.



The problem is that I don't want to reinstall the whole OS again, and that rc.exe is part of some SDK freely downloadable from Microsoft (apparently 6.0a version). I can't find it nevertheless.




Anyone knows what rc.exe is part of, and what I need to download (and from where) to get it back ?

Wednesday, August 22, 2018

How to drag buttons around on Windows XP taskbar


There is one feature of Windows 7 that I am envious of, in my Windows XP environment - the ability to drag buttons of running programs around on the taskbar; Windows XP keeps the buttons on the taskbar in the order they were started.


Does anyone have any recommended plugins or other solutions for simulating this in Windows XP?


Answer



Taskix should do the trick for you.


Also see the review on Lifehacker where they mention TaskBarShuffle as another option.


data recovery - How to delete information from a hard drive, when the hard drive is too damaged to use?


I recently bought a hard drive, and after only a couple weeks it broke completely, to the point where I can't even log in to my computer. I want to mail it back to get a refund, but the problem is, there's some sensitive data on it. And just because I can't use it to log in doesn't mean the data couldn't be recovered. Maybe I'm being paranoid, but I don't like the idea of mailing out such valuable data to an unknown destination.


Since I can't even use it to log in, I can't delete this data the normal way. But I also don't want to shatter it to pieces, which will negate the refund.


Is there a way I can wipe the drive or reduce it to a completely non-recoverable state without logging on to a computer with it? I was contemplating just dropping it in water, or maybe using magnets.


Answer



Even though I couldn't log in, I was able to reach the root shell. From there, I ran the Ubuntu shred command which replaced every bit of data with a random bit.


windows - Problem with opening pen drive

I've a Pen Drive. And I'm not able to format it..
when I'm going for formatting it shows that its formatting but even after half an hour its still formatting...


The PD is not opening. and AntiVirus is showing that no files is present in the PD...


What to do??
Any suggestion ??

Cannot Unlock ATA Security Locked Hard Drive Locked During Secure Erase


As stated in the title, I’ve got an ATA security-locked hard drive that I cannot seem to unlock. The locking happened after I started an ATA security-enhanced erase from Ubuntu’s Disks utility. The power went out in the middle of the process and upon the next boot, I could not do anything with the drive other than view its SMART status. I’ve chased a number of leads and tried some solutions that have worked for others in a similar predicament, but haven’t found any success. (I don’t know the exact nature of the problem, so I’m posting here rather than AskUbuntu.)


Output of SeaChest_Erase -d PD1 -i (the Seagate-supplied software for manipulating its hard drives):
Output of SeaChest_Erase -d PD1 -i


Solutions that other people have tried:


From the way the others solved their lock-out problem, I assume I will have to get/do any of 5 things:



  • The master password for a Seagate ST12000VN0007 (or just my particular drive)

  • The user password set by the Ubuntu Disk utility during the secure erase

  • The user password I might have accidentally set while fiddling with Victoria or hdparm

  • A specific hardware adapter in combination with one of the above

  • Wait 24 hours with the drive being active to see if the erasure completes


But I find it unlikely that I set the password myself since all unlocking and password setting actions resulted in failure messages. Parted Magic uses “password” as the password. Synology uses “synology” as the lock password. Does Ubuntu’s Disks utility use some known default password in the background to lock the drive? Would the drive automatically resume erasing to completion if left alone?


Answer



Both these links were helpful to me in solving the issue:


https://forums.linuxmint.com/viewtopic.php?t=271260


https://askubuntu.com/questions/1120971/gnome-disks-utility-locked-hdd


This was the command I used:


sudo hdparm --security-disable xxxx /dev/sd?

Simply replace the question mark with the letter which designates your locked drive.


"lsblk" should tell you which one it is.


Tuesday, August 21, 2018

windows - Autohotkey disable Fn+Win key



Here's the script to disable windows start menu, but allow modifiers, it works as intended:



LWin & vk07::return
LWin::return



I want to disable Fn+Win key, because it's opening windows start menu.


Answer



The answer depends on your keyboard and computer.



If you suspect that the combination Win+Fn generates a special
key, you may find out what this key is by using the procedure described in the
AutoHotKey article
Special Keys.




Another method for tracking what that key-combination is doing, is by right-click on
a running AutoHotKey script in the tray-bar and choosing "Windows Spy".


windows 7 - Laptop Running Slower Without Battery Attached

I have a Thinkpad T520 and I'm monitoring my CPU using CPU-Z.


For some reason, when I detach the battery, the CPU only run till 800MHz. Whereas when I run using battery power, it goes up to 2.3GHz. I notice the difference in speed when I take the battery out. This is the reason why I investigated in the first place.


Any ideas on what's going on?


Specs:
Windows 7
Thinkpad T520
6GB DDR3
Core i5-2410M

Monday, August 20, 2018

hard drive - Windows boots normally only after entering BIOS, else I get "reboot and select proper boot device"

I'd like to ask for your help with the following issue:



I updated Windows 10 to the Anniversary version around a week ago and shortly after that I updated the UEFI/BIOS of my motherboard (the latest BIOS was already released last year). So I cannot really tell when the problem started exactly, but probably not from the Windows update itself, but after the Bios update.



The problem I have is, that whenever I start my computer it tells me "reboot and select proper boot device or Insert Boot Media in selected Boot device and press a key". Then I press the physical restart button and after powering up again I go into the BIOS, don't change anything, just "save and exit" and then it boots normally. So there can't be any problem with cables or with defect hardware, since everything works fine after I entered the BIOS and rebooted.



I checked the important boot settings (at least the ones I know of) in the BIOS after updating it. The SSD is recognized as an SSD, the HDD is recognized as HDD. AHCI is enabled and the SSD is selected as the primary (and only) boot device.



I have the following system: Intel Xeon E3-1231v3, ASRock Fatal1ty H97 Killer (BIOS version P2.50), Crucial M4 SSD (boot), WD 1TB internal, WD 2TB external; Windows 10 Anniversary




Thanks!

linux - Wodim can't open SCSI driver in Debian Jessie?

I'm attempting to write an ISO image to a CD on Debian Jessie. I have the CD in the drive, and it appears that all of the symbolic links are pointing where they should be, and the kernel recognized my CD-RW drive. (Which is connected via IDE by the way)




I installed Wodim from the official Debian repository. With either wodim --devices or wodim -scanbus I receive...



wodim: No such file or directory. 
Cannot open SCSI driver!
For possible targets try 'wodim --devices' or 'wodim -scanbus'.
For possible transport specifiers try 'wodim dev=help'.
For IDE/ATAPI devices configuration, see the file README.ATAPI.setup from
the wodim documentation.



Although I don't think it should make a difference, I'm doing this via remote SSH.



The error says specifically that I need to read README.ATAPI.setup. I would be more than happy to do that if I had any idea where that was. I did a Google search for that file, but only found questions on various forums about issues similar to mine. After finding this question I ran some test commands to see if I had the same problem.



lsmod | grep sr_mod yields...



sr_mod                 21568  0 
cdrom 46828 1 sr_mod
scsi_mod 164132 4 sg,libata,sd_mod,sr_mod



lsmod | grep sg yields...



sg                     25573  0 
scsi_mod 164132 4 sg,libata,sd_mod,sr_mod


ls -l /dev/sr0 yields...




brw-rw---- 1 root cdrom 11, 0 Mar 12 17:20 /dev/sr0


That article mentioned that /dev/cdrom should link to /dev/sr0. Results of ls -l /dev/cdrom are...



lrwxrwxrwx 1 root root 3 Mar 12 17:20 /dev/cdrom -> sr0


Running any of these commands as root with sudo, or with a root shell do not affect the outcomes of any of these commands. Furthermore telling Wodim what device to use with wodim dev=/dev/sr0 --scanbus yields the same results as not declaring the shell variable.




What's the issue?

crash - Windows 7 PC crashes / stops upon reboot

I have an Hewlett Packard (fairly basic) Windows 7 PC, that crashed (no blue screen, the screen simply went black with no response from any peripherals) and then once the machine is powered off and back on again it crashes or stops upon a reboot (black screen again).



The crash is simply just a freeze on a black screen, no errors, nothing obvious, it simply just sits there doing nothing whilst powered on.




If we button off the machine it will load Hewlett Packard's version of the recovery prompt, allowing us to run "System Restore" or "System Recovery". So far I have run "System Restore" about 3 times from different dates (progressively getting earlier), which will recover the system to any of the set dates successfully.



Once back into the system I have full use as normal of the machine in Windows 7, but upon scouring the Windows Event Log the only error we can see around the time of the crash is:



The system has rebooted without cleanly shutting down first. This error could be caused if the system stopped responding, crashed, or lost power unexpectedly.

Log Name: System
Source: Kernel-Power
Event ID: 41
Level: Critical

User: System
OpCode: Info
Logged: 11/04/2013 08:45:21
Task Category: (63)
Keywords: (2)
Computer: Home-PC


It seems that this error is hard to trouble shoot due to the vague nature of what could have caused the computer to fail in such a way. The is no BugcheckCode (it is "0").




What I'm concerned about is that I've run System Restore a few times, the computer has got back into a functioning state, but invariable it will crash again, requiring another System Restore. If I decide to run a full factory recovery on the machine, I'm wondering what the major differences are with this over a System Restore option. I realise the disk will be formatted and recovered from image, however if the machine still ends up crashing after a System Restore, is there any point in going through this process?



Could a failing hard disk be the cause? Or if it was, would we see some more specific errors in the Event Log? Can anyone recommend any software that might be able to scan the machines hardware to check if this issue might be hardware related? Note: The Event Log shows NO other errors prior to the Critical Event ID 41 - i.e. nothing obvious to say "Hey, I'm struggling a bit here with something and might give up any second now..."



Appreciate any advice.

Getting "out of memory" errors when around 65% used in Windows 10

Since upgrading to Windows 10, I've noticed I get out-of-memory warnings (leading to out-of-memory app crashes if I don't address it) when my actual memory usage is only around 60% according to Task Manager. It wasn't an issue at first, but after the major update they did about a month ago, it seems to be happening more frequently.


I did occasionally run out of memory on Windows 7, but only when I was actually hitting 95+ percent usage, which was quite rare.


image
I've attached a screenshot of task manager immediately before a crash, and it's typical of what I normally see - around 60-65% usage being flagged as "out of memory" territory. Where's my other one-third gone?


Current setup is Windows 10, with 4x4GB sticks of Corsair memory for 16GB total. Any advice is appreciated.

windows 7 - Removable disk, hybrid GPT/MBR


I'm trying to set up a USB HD with GPT so that partition 1 is accessible under all versions of Windows.


Sounds easy, right? (In particular, I'm not trying to boot Windows. I just want to plug in a disk and have it see the contents.)


Well, if you just write a normal GPT, everything works fine under Windows 7. But of course, Windows XP doesn't know anything about GPT, and just sees the protective MBR.


This was what I was expecting. So I copied the sector numbers of partition 1 into the MBR. Sure enough, Windows XP now sees that partition just fine.


The problem is... Windows 7 now behaves very strangely. It now only sees the entries in the MBR (which I don't really mind), and it doesn't auto-mount the partition (which is unacceptable).


Weirder still, if I manually assign a drive letter to the partition, it's readable and everything. But when I unplug the disk, the drive letter is still there! And it's now impossible to remove it, because it no longer appears in Disk Management.


Does anybody know what magic voodoo I need to do to make the disk "just work" in all versions of Windows from XP onwards? (I haven't actually tested with Vista yet, but I imagine it probably behaves similarly to Win7.)


(One obvious possibility is to just remove GPT. But I really don't want to do that...)


I have already tested and confirmed that the presence or absence of a type EE partition in the MBR appears to make no difference to Windows.


Answer



Use MBR. As you've discovered, Windows XP and earlier don't understand GPT. The method you've used to try to get around this limitation is essentially to re-create an ugly and dangerous hack known as a hybrid MBR, although I suspect you're doing it in a somewhat different way that's causing problems for Windows 7. (Ordinarily, Windows Vista through 8.1 see the MBR side of a "conventional" hybrid MBR.) I urge you to read the linked-to page, which describes hybrid MBRs, including their drawbacks, in some detail.


Note that because Windows Vista and later treat hybrid MBR disks as conventional MBR disks, there's no advantage to using them in a Windows-only environment. They are limiting and dangerous, though, so you'll end up with all of the drawbacks and none of the benefits of a hybrid MBR.


The only other solution I'm aware of is to use a GPT driver for pre-Vista versions of Windows. Such things exist for Windows XP, although I don't have any URLs offhand. I don't know if such a driver exists for Windows Me or earlier. Of course, such a driver would have to be pre-installed on any computer with which you want to use it, which might or might not be a deal-breaker for you.


Overall, you're best off using MBR in your situation. If you need to uniquely identify a partition, try using the volume label for that.


Sunday, August 19, 2018

windows - Batch File to Set Default Programs Without Administrator Rights


UPDATE 7/15/2016: A couple days ago, all the Group Policies pertaining to our OU stopped applying - meaning that there are no more restrictions. I now have full Command Line and Registry access which means I can use assoc and ftype after all. But I still get access is denied - is there some way to change the scope of the command? Although the GPOs stopped applying, I am still not an administrator. Can I use ftype/assoc without admin rights?


*Unfortunately, the GPO for Chrome mandating itself as the default browser is STILL there. But I still need to somehow ensure IE is the default, and then set .html, .css, .js etc - with Notepad++.


Our organization has the Chrome policy enabled for setting Chrome as the default browser. This setting is mandatory, and cannot be disabled like many of the other policies we have that are "Suggested". I use both Chrome and Internet Explorer, but for different purposes. I use Chrome for logging into websites and such and I use Internet Explorer for a lot of development and for opening local files and shortcuts to Internet Sites (.url files)


I have a batch script that runs at logon across our domain to automatically perform a variety tasks, including opening Chrome to a specific webpage. Whenever this happens, Chrome is obviously set to the default browser because of Group Policy settings.


I do a fair amount of web development, and I use Notepad++ for these purposes. I want all my html and css files, etc... to open in that program by default. In edition, I want Internet Explorer to be the default browser, so if I open a shortcut, it opens in IE, and once I close the browser, the history is deleted (the checkbox for Delete Browsing History on Exit in IE is checked.) If it opens in Chrome, it opens in a regular Chrome window and I ONLY use Incognito mode.


With IE, it isn't as necessary to use InPrivate browsing because history and cookies are automatically cleared once I close the browser. It isn't that I'm opening questionable links - I just want to be able to open links quickly and not have them in my history at all. Otherwise I need to clear it manually every time so I don't see the url of random pages I have visited in the address bar. In addition, IE shows the favicon of the website as the icon for the file, whereas I get a small Chrome logo for every url with Chrome as the default browser, which is pretty useless.


Right now, every time I logon, I have to manually select an .html file, go to Open With>Notepad++, and check Always use this program for this file type, etc... Before that, I have to open IE and click Yes when it says "Set IE as default browser?" If I do it second, then .html files automatically open in Internet Explorer, which is not what I want.


I have tried various batch files at this point to automatically set Internet Explorer as the default browser after Chrome opens, and then set Notepad++ as the default. I have found very few solutions, and the ones I have found have not worked. What I want to know is is this possible? And if so, how should I do this? Right now, the only solution is just stop using Chrome and never use it again, which is feasible but not necessarily preferable. I live in a Microsoft ecosystem, but Chrome isn't a terrible browser by any means,


Please keep the following in mind:



  1. Registry Editing is disabled. Any actions that involve/invoke the registry at all will fail.

  2. Batch files are allowed to run, but cmd is not. Powershell and Command.com are permitted (or rather, not blocked).

  3. This should be automated somehow (I add a line into a batch file and it will run seamlessly without pop-ups confirming something)

  4. I don't have administrative rights on any PCs, so it needs to work with a standard user account (and many of those standard user rights are also denied to us). In addition, the majority of the control panel and many system settings are not editable by domain non-administrators (pretty much our OU).


I would also like a standalone solution that I could afix to the shortcut. Part of my logon script replaces the regular Google Chrome shortcut on my desktop with an incognito shortcut, but opening Chrome again will obviously change it to the default browser. So it would be helpful if I could add another line to the Chrome shortcut so that it automatically executes the batch file.


Our domain uses Windows 7 Professional, if that helps, but I have heard they are piloting Windows 10 for next year so a solution that works for Windows 7+ would be great!


Thanks for all of your help in advance - I am looking for any solution that will work, even if it is tedious,


UPDATES:



  • I can't use ftype (I get: Access is denied)

  • Access to rsop.msc is denied (same for gpedit.msc, secpol, etc...)

  • Clarification: I can't use the reg functionality within cmd/batch files, etc... I will get ERROR: Registry editing has been disabled by your administrator

  • Thanks to w32sh for pointing out this resource - but what I want is to be able to just double-click the .url file and it will open in the browser I set (Internet Explorer.) These steps all require you to right-click and go to Open or Open With. I might add that right-clicking is disabled, and it's a hassle to go to the Menu Bar every time. In addition, I can't do Steps 3 or 4 from this link at all because they involve the Registry, and I can't do Method 2 because I can't open shell:sendto and even if I could, that's not quite helpful to me. And Method 1 is what I'm already do every time manually every single time I logon.

  • It could also be a powershell script or VBScript or another type of script as long as it can run without administrative rights.


Here are some pictures that illustrate that process:
enter image description here


enter image description here


enter image description here


Clarification: I realize that the default browsers are stored within the registry. But I can manually go to Open With>open with program>always use this program for files of this type, etc... and that will change the default browser - so there are ways to do it without using the Registry. But I am looking for a non GUI option that can be automated every time I logon.


-----REG FILE I TRIED-----


Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Software\Classes\.CSS]
@="Notepad++"
[HKEY_CURRENT_USER\Software\Classes\.HTM]
@="Notepad++"
[HKEY_CURRENT_USER\Software\Classes\.HTML]
@="Notepad++"
[HKEY_CURRENT_USER\Software\Classes\Notepad++\shell\open\command]
@="T:\Notepad plus plus\Notepad plus plus.exe \"%1\""
[-HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.css]
[-HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.htm]
[-HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.html]

Answer



Here is a REG file that sets IE as the default browser (except for HTM and HTML file types), and then associates HTM HTML and CSS files with Notepad++


Note: This registry edit won't work if you're using Windows 10.. as Windows 10 imposes strict rules pertaining file type associations - with the hashing algorithm in place to detect any tampering with User Choice key.


Windows Registry Editor Version 5.00
; Set IE as default & associate CSS / HTM / HTML with Notepad Plus
; Made for Windows 7
[HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.mht\UserChoice]
"Progid"="IE.AssocFile.MHT"
[HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.mhtml\UserChoice]
"Progid"="IE.AssocFile.MHT"
[HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.url\UserChoice]
"Progid"="IE.AssocFile.URL"
[HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\Shell\Associations\UrlAssociations\http\UserChoice]
"Progid"="IE.HTTP"
[HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\Shell\Associations\UrlAssociations\https\UserChoice]
"Progid"="IE.HTTPS"
[HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\Shell\Associations\UrlAssociations\ftp\UserChoice]
"Progid"="IE.FTP"
;Associate CSS / HTM / HTML with Notepad Plus
[HKEY_CURRENT_USER\Software\Classes\.CSS]
@="Notepad++"
[HKEY_CURRENT_USER\Software\Classes\.HTM]
@="Notepad++"
[HKEY_CURRENT_USER\Software\Classes\.HTML]
@="Notepad++"
[HKEY_CURRENT_USER\Software\Classes\Notepad++\shell\open\command]
@="d:\\Tools\\NPP\\notepad++.exe \"%1\""
[-HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.css]
[-HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.htm]
[-HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.html]

hard drive - Leaving bad sectors in unformatted partition?

Laptop was acting really weird, and copy and seek times were really slow, so I decided to scan the hard drive surface. I have a couple hundr...