Monday, December 31, 2018

How to stop Windows explorer showing columns 'Date Taken' and 'Rating' etc on folders containing an image


I'm using Windows Vista at work (Business edition). Normally if I open Explorer in details view I see the columns Name, Date modified, Type and Size. Sometimes i'll open a folder that contains an image and the columns will instead be Name, Date taken, Tags, Size and Rating.


I find this really annoying. Can I stop Windows doing this?


Answer



After customizing a single folder to your liking simply do this:
Windows Explorer => Organize => Folder and search options (alternatively Tools => Folder options) => View Tab => Under the Folder views click "Apply to Folder" button.


Assuming you do that for pictures, it will use this customization for all other folders that uses folder type of pictures. You can do the same for document, video, music folders as well.


windows - Batch convert *.avi files using ffmpeg



I am trying to convert 20+ .avi files in a batch using ffmpeg.



I've got the following




@echo off.

for file in *.avi
do
ffmpeg -i "$file" -s 640x480 -vcodec msmpeg4v2 "'basename "$file" .avi'.mpg';
done


in my .bat file but it does not work. How can I make it work under Windows OS. Oh, and yes all the files are in the same folder.




The error message I get:




File was unexpected at this time



Answer



Your batch file is not in the correct format for a Windows bat script. Instead your script looks like it was intended for Linux. You will need to change the script to use a for loop that is supported by the Windows Shell.



Below is an example of how to accomplish this task by using a windows for loop. Just put the below line in your batch file and move the script to the same directory as the avi files, then run it.




for %%A IN (*.avi) DO ffmpeg -i "%%A" "%%A.mpg"

Sunday, December 30, 2018

windows 7 - How can I stop my laptop from automatic waking up?

My laptop wakes up automatically exactly 12 hours after it was put into a sleep mode. It has this behavior from the beginning, it is very annoying, especially then the lid is closed and it wakes up unattended and overheats. It has Windows 7 Home Basic, runs from an outlet. Windows Event Log shows "Power-Troubleshooter" events, but specifies the cause of the wake up as "Unknown". In the Command prompt "powercfg -lastwake" does not provide any information either. Wake up timers are disabled. Wireless LAN is disabled, LAN card is not allowed to wake the computer. Neither scheduled task is allowed to wake up the laptop. Laptop is Dell Inspiron N5010.


How can I stop this behavior?


Thank you.

windows 7 - explorer.exe hogging CPU, slow folder browsing


My computer is snappy when I log in from a fresh reboot. Within a short while, it becomes almost unusably slow depending on what I want to do.


In particular, any Windows-y actions are slow while third party applications are fine.


My machine has pretty good specs and abundant memory (Windows 7 Ent. SP1, Core i7 Q820, 16 GB of RAM).


Symptoms include:



  • explorer.exe is almost always pegging one of my CPUs (although, since I have 8, it shows 12% CPU usage in Task Manager). It's important to note that you won't see system-wide 100% CPU usage (unless you have only one processor).


  • svchost.exe might show hundreds of MB consumed, and occasionally also hogs a CPU


  • Using explorer to browse between folders takes 2 to 5 seconds or more per folder change. I tried setting the content type as suggested by Google results for "slow folder browsing in Windows 7", but this did not impact performance


  • Starting Internet Explorer can take 10+ seconds. Initially, the window opens but the menu bar remains undrawn for an additional long period. I have tried disabling all add-ons, of which there were none.


  • Slow speeds regardless of anti-virus. Computer is clean (take this on faith), and anti-virus has been uninstalled.


  • Clicking an item in the start menu does not respond instantly. You click an item and think nothing is happening because the start menu just sits there as if you hadn't done anything. Then, 5 to 10 seconds later, the program might open.


  • Right clicking anything takes too long. I have tried using ShExview to disable most context menu items, but this didn't significantly impact right-click performance.


  • When particularly bad, Windows explorer windows will simply stop responding for tens of seconds or minutes at a time. No abnormal CPU usage except for explorer chugging along hogging a core.



What could be causing these symptoms and what can I do to fix it?


Answer



Run the services control panel (Start => type services.msc and hit enter).


Scroll down to Superfetch. If you find that it is marked "Started", it may be the culprit.


Superfetch is supposed to monitor how you use the computer and cache or otherwise find ways to speed everything up for you.


In my case, stopping the Superfetch service and right clicking on it, choosing Properties, and setting Startup type to Disabled instantly resolved all performance issues.


external hard drive - TrueCrypt partition or not?


I'm getting a new external HDD and am considering using TrueCrypt to secure it, as I work on many commercial projects and like to have the peace of mind when I travel.


It's a 2TB HDD and I have two options.



  1. Create a TrueCrypt volume that nearly fills the drive.

  2. Encrypt the entire drive partition.


What are the pros/cons of each? Keep in mind that this is more than a backup drive, it will be used as an extension of existing HD space on my laptop.


Is one method more resilient to corruption than the other? Especially partition encryption, is it likely that the partition could be altered by a computer that didn't have TrueCrypt and didn't "understand" it (if it was inadvertently connected to a different computer)?


How resilient is it to a system crash while writing? NTFS, being a journaling system has fairly good integrity by itself, but how does TrueCrypt's encryption factor in?


Data safety is more important than raw security, but encryption is a must.


Answer



If "Data safety is more important", then I would create multiple TC volumes on top of the 2 TB NTFS file system and then only mount what you need when you need it. If one of these files somehow gets corrupted, then you have minimized the damage compared to encrypting the whole drive or creating one large TC file. Plus, it will be easier to make backups.


I have used this method for years for remote backups with both large & small TC volume sizes. I have never experienced any form of file system corruption when using TC.


Saturday, December 29, 2018

macos - How to configure 1080p HDTV as a monitor

I've read several posts that almost answer my question, but not quite. I have a Samsung LN32C530 1080p HDTV I'd like to use as a monitor. I was reasonably successful getting the prior 720p model to work ok using SwitchResX, but I think I just got lucky with the parameters (1360x768@60Hz).


I tried the expected (1920x1080@60Hz) values and "nearby" ones, with no luck. Older 720p params actually work, but I get the same small real estate as the older model TV. Trying values near 1080p always displays an image that doesn't match the screen size and is very jagged which makes me think interpolation is making things worse.


Also, SwitchResX has a bunch of parameters other than H x W ("porch" etc), and I don't know how they all work together.


Any help?

mac - Left arrow key not responding

Machine: iMac 27" late 2012
Running: MacOS Sierra 10.12.2


My iMac does not register a left arrow press in any program. However, the key works when I'm using modifier keys (Command + left arrow) or when I'm using a different account (leading me to believe that this is a software issue).


Things I've tried so far:



  • Logging out

  • Restarting

  • Resetting NVRAM

  • Removing com.apple.HIToolbx.plist (etc.) files

  • Running defaults delete -g

  • Viewing input on keyboard viewer (Command + left arrow registers, but left arrow alone does not)


Obviously I could set up another account but surely there's another way to fix this.


Any ideas?

Why does the ping command in my batch file execute in a loop and navigates to the beginning?

I created a .BAT file in Windows 10 that has the following lines:


set /p ipadress="Please select your favourite IP-adress."
echo %ipadress%
ping %ipadress% -n 10

However, when I navigate on this batch file to ping, I can see the ping command repeatedly being executed in a loop. I even tried to rename the ping.BAT to ping.CMD but the result is the same.


It works until the second line. After repeating the selected IP address, it ends in a loop and jumps to the beginning of my batch file.


output


I want to avoid writing ping command through the command prompt, which is why I created the batch file. I don't know why the ping command is being continuously called when the same statement is put in a batch file.


Do you have any ideas?

debian - How to set environment variables in /etc/environment?

I'm using Debian Jessie. I want to set some environment variables that will persist across reboots and work in non-shell environments.



I've set the following in /etc/environment:



SECRET_KEY=xxx


But then if I do the following, it produces nothing:



printenv SECRET_KEY



How do I set this environment variable and activate it?

Windows 7 seeing perpetual "Shutdown to update"

For about a week I've been seeing the yellow shield with an exclamation point on my shutdown button. I shutdown but no updates are applied and shortly afterward the yellow shield appears again. I see no recent update failures and the only thing I can think it is, that I keep saying "not yet" to the Windows 10 automatic install/update.


Does anyone know? Has MS gone this far and is now nagging me to "finish" the windows 10 update by showing me the "pending update" on my shutdown button?


I've had updates fail in the past and have always been able to correct them, but this one is like a "failure" that's not really complaining about anything, but yet the "pending update" remains.


Thanks


Mike

Friday, December 28, 2018

rename - Automatic lowercase renaming -Windows

I'm looking for a way to bulk rename some files, letting me decide some specific words which will always go in the case I select. Specifically, I want to be able to tell the program I want all articles, conjugations and prepositions lowercase if they are not at the beginning of the filename.


For example, if in the folder, among the other files, there's the movie "The Assassination Of Jesse James By The Coward Robert Ford", it will be renamed to "The Assassination of Jesse James by the Coward Robert Ford"

windows 7 - Create NTFS partition for files for dual boot Win 7 (3 primary partitions) & Debian


My problem is that I want to partition my disk so there is no conflict between debian & win 7 AND that they can both access my files.
I have a 1 TB hard disk. I installed Windows first, it created automatically 3 partitions :



  • SYSTEM, about 100 MB

  • A disk Image for recovery purposes, 15 GB

  • The main C: partition with the rest


I then reduced the size of C: to 100 GB and started the installation of Debian (I'm not a pro user). I reached the partitioning part and now I have a problem : It writes that the 3 partitions created by Windows are primary partitions, but I searched the internet & tried : there can be only 4 primary partitions... and Windows can't read "logical partitions" (LVM).


I wanted to add 3 partitions in the free space :



  • One for the linux root, 20 GB

  • One for the swap (18 GB)

  • And all the rest (more than 800 GB) for the shared NTFS partition


Now I'm wondering how to achieve this. Is it possible to merge some partitions without troubles ? I just want to be able to write or read in a directory, no matter which OS I use.


The best I had looked like this :



  • Primary, 105 MB, NTFS (SYSTEM created by Windows)

  • Primary, 107.4 GB, NTFS ( resized C: partition )

  • Logical, 20 GB, EXT4, mount for /

  • Logical, 18 GB, swap

  • Logical, 850 GB, EXT4 (Shared space, but logical & EXT4)

  • Primary, 15 GB, NTFS (Recovery Image)


Thanks for all help.


Answer



Finally I was able to remove the System partition and merge it to the windows ( C: ) partition during a clean installation. The system primary partition do not have to be appart from the Windows partition, be it's set like this by default.


To achieve it, there should be a partition already created before the windows install. (If there's no partition, the installator creates one for System, one for Windows ; if there is already a partition, both go on that partition).
I can't link to a particular article, but I searched for "remove System partition" and it can be helpfull.


The next part was simple because i had one new primary slot : everything was primary (except the logical swap & debian)


batch - Windows CMD - How to rename all files in all subfolders to parent folder name


Alright scripters,


Im still trying to wrap my head around the FOR command. What Id like to do is rename all files in all subfolders to the folder name they reside in, retaining their extensions. Id imagine it could be done with something like:


   For /R %X in (*.*) do REN %X 

Maybe Im wrong. Whats the correct way to do this? And it must be a script. Im not asking about Bulk Rename Utility or File Renamer Deluxe, etc.


Thanks for your time!


Answer



You can only accomplish your stated goal if each folder never has more than one file of any given type. That is not a reasonable expectation unless there are unusual circumstances.


But it is possible to insert the name of the parent folder in front of every file - something like
"fileName.ext" --> "parentFolderName_fileName.ext"


The FOR /R command can iterate the folder paths of all folders within a root tree.


The DIR /B /A-D "folderPath" command can list all files within a folder. But you don't want to rename files that aready begin with the parent folder name, so that can be piped to FINDSTR to exclude the already renamed files.


The results of the piped command can be iterated with FOR /F. The EOL and DELIMS options are used to make sure that the full name of every file is preserved.


The %%~nxD returns just the folder name and extension of the parent folder.


Putting it all together, the following long one liner can be used directly on the command line. It will process the tree rooted at the current directory.


for /r %D in (.) do @for /f "eol=: delims=" %F in ('dir /b /a-d "%D" 2^>nul^|findstr /vbic:"%~nxD_"') do ren "%D\%F" "%~nxD_%F"

The command can be put in a script, and then the root folder to process can be passed in as an argument. If no argument is given, then the script processes starting at the current directory. If an argument is given, then that value is used as the root folder.


@for /r %1 %%D in (.) do @for /f "eol=: delims=" %%F in (
'dir /b /a-d "%%D" 2^>nul^|findstr /vbic:"%%~nxD_"'
) do ren "%%D\%%F" "%%~nxD_%%F"

The code is simpler if you use my JREN.BAT regular expression renaming utility. It is pure script (hybrid batch/JScript) that runs natively on any Windows machine from XP onward. No 3rd party exe files are needed.


Full documentation is embedded within the utility - accessed via jren /?, or jren /?? if you want paged output.


The following simple command will process the tree rooted at the current directory:


for /r %F in (.) do @call jren "^" "%~nxF_" /p "%F" /fx "%~nxF_*"

The first two JREN arguments are the find/replace strings - The search matches the beginning of the file name, and the replace simply insert the parent folder name (with a trailing underscore). The /P "%F" option specifies the root folder. And the /FX "%~nxF_* option excludes files that already begin with the name of the parent folder, followed by an underscore.


The command can be put in a batch script that accepts an optional root folder as an argument (process current directory if no value given):


@echo off
for /r %1 %%F in (.) do call jren "^" "%%~nxF_" /p "%%F" /fx "%%~nxF_*"

Thursday, December 27, 2018

Windows 8 security user account permissions


I'm using Windows 8 Pro.
When I try to save an attachment from Outlook 2010 into a specific Program Files folder I get the following message:



"C:\Program Files (x86)... You don't have permission to save in this
location. Contact the administrator to obtain permission.


Would you like to save in the folder instead?"



I upgraded my Win7 pc to Win8. The first time I used Windows 8 I signed in via my email address (4 or 5?). But then I added it to our domain and signed in with my domain account (3).


Now when I look at the "Control Panel > User Accounts > User Accounts" I see the following things:


(1) HomeGroupUser$ |  | HomeUsers
(2) UpdateusUser | | HomeUsers
(3) | | HomeUsers; Administrators
(4) | MicrosoftAccount | HomeUsers; Administrators
(5) | MicrosoftAccount | Administrators

the "my domain user (globe icon)" (3) is the account that I use currently and It has been added to the "HomeUsers; Administrators" groups, but still that message tells me i'm not an administrator.


I also linked my MicrosoftAccount (4 or 5?) with my current domain user account (3)


Any suggestions on how to make myself an administrator on the pc so that I don't have these annoying UAC messages and that I can write in my own program files (and other folders)?
I thought I was an administrator now, because my domain account (3) is in the groups "HomeUsers; Administrators" but that doesn't seem to be 100% ok.


Thanks in advance (sorry if this explanation is a bit messy).


Answer



You are still an administrator - The exact same thing happens in Windows Vista and Windows 7... Unless you launch Outlook as an administrator, you will not have the ability to save to or write to protected paths.


security - Linux File Permissions & Access Control Query

Let's say I am user bob in group users. There's this file:




-rw----r--  1 root users     4 May  8 22:34 testfile


First question:
Why can't bob read the file as it's readable by others? Is it simply that if you are denied by group, then you are auto-blacklisted for others? I always assumed that the final 3 bits too precedence over user/group permission bits, guess I was wrong...



Second question:
How is this implemented? I suppose it's linked to the first query, but how does this work in relation to Access Control, is it related to how ACLs work / are queried? Just trying to understand how these 9 permission bits are actually implemented/used in Linux.



Thanks alot.

windows xp - Old computer runs out of memory even when idle

I'm trying to speed up an old computer running XP, and it seems the problem is mainly that it's constantly losing RAM/virtual memory until it runs out. If no programs are running (System Idle Process is the only thing taking up CPU time), the computer just runs out of memory more slowly. Why could this be happening?



Note: What I'm seeing is when I pull up task manager, the commit charge is constantly increasing at a rate of at least 30K/sec, way faster if the computer is doing something. It does this until the commit charge reading is around 440000K/866000K, at which point it stops going up and the computer becomes basically unresponsive.

How does Windows know recognize an SSD as an SSD and not a HDD?

I have an SSD mounted in an external enclosure and it was installed as a Windows to Go workstation. The external enclosure has a VL716 chipset and the connection to the PC is done via an USB Type-C cable from the enclosure to USB 3.0 type A.



Windows however shows the following picture (disregard the Iomega drive, that has an HDD inside):



The SSD is incorrectly identified (C and D), the Iomega drive is an external HDD.




So it's not recognizing the drive as an SSD, the correct picture would be like this:



The SSD is correctly identified (C and D), Iomega is an external HDD.



That was when the SSD was mounted directly to a SATA port of the machine. Wondering if it had something to do with the enclosure I changed it to another USB 3.0 one that uses a different chipset, this time is a JMicron one; but to no avail.



Interestingly, TRIM commands do make it to the disk with both enclosures when issued via PowerShell for example:



Optimize-Volume -DriveLetter D -ReTrim -Verbose



But since Windows doesn't identify it as an SSD I fear it'll try to defragment the drive instead of just issuing a TRIM. I could disable the weekly or daily optimization of Windows and set up an scheduled task to issue TRIM manually but I would rather know what Windows does or how it recognizes SSDs, maybe there's a bug that needs to be reported or I'm missing a step but the Windows to Go installation was performed officially (i.e. not using third party tools) and directly into the SSD, it wasn't cloned.



I apologize for the long read, but I wanted to give you as much details as possible, and if something is missing just let me know to amend the question.

security - How to securely return a BitLocker Device Encryption SSD?

I have a ThinkPad E580 laptop with a defective (1) NVMe SSD drive, so Lenovo sent me a replacement unit; I have to swap it and send back the faulty one. I want to wipe it before, to make sure nobody can recover my personal data, but I don't know how.



The disk is encrypted with BitLocker (2) (at least the main partition, there are also two system/recovery partitions which aren't). I think that the decryption key is not stored in the disk but in the TPM, which is a chipset in the motherboard. Since I'm only sending back the SSD, it should be secure? Except... there is also the recovery key, to be used in case the TPM is cleared. I didn't set up BitLocker, it was already installed and set up on the computer when I bought it. So, I guess Lenovo had access to said recovery key when they installed Windows 10, right? They probably didn't write it down, but still, maybe just sending the drive is not a good idea after all.



How can I wipe or reencrypt the SSD or whatever, so the data is unrecoverable? Please notice that I need to send it back to them, so I can't just smash it with a hammer or burn it.



I asked Lenovo (3) if they had a SSD secure erase utility and they said they don't. Google disagrees, but maybe that's a deprecated tool, or it's problematic in some way? Or maybe the customer service guy was just lazy.




I should mention that I currently have a second SSD drive installed in the same computer, BitLocker encrypted too, and I don't want to lose the data in there (I have backups, but restoring them is a loooong process). I wouldn't mind disabling BitLocker on it though... it only protects me from somebody stealing my SSD without taking also the rest of the laptop (which would grant them the TPM and the ability to decrypt it), right?



Edit:



(1): The drive is (suspected to be) defective, because sometimes the laptop will have a blue screen of death, then reboot itself and won't be able to recognize the disk (which means, no Windows for me). Once I turn off and on again the laptop, it will work again normally. So yes, it may have some defect, but it's usable and completely readable.



(2): Apparently, what I have is BitLocker Device Encryption, which isn't the same as plain BitLocker (the more I try to understand, the more confused I get!). Windows just says BitLocker cyphered, though. But since my recovery keys were automatically uploaded to my OneDrive account, I guess it's "Device Encryption".



The laptop has TPM 2.0, and I guess the drive decryption key must be stored there, because I don't have to enter a pin, or password, or USB key, or anything, to boot up. Only my Windows credentials (fingerprint, pin or password), but by that time the computer has obviously been able to decrypt the drives.




(3): Lenovo assembled and sold the laptop, but that's just coincidental; I was looking for a Lenovo secure erasure tool because they are also the SSD manufacturer in this case. And I read on many tutorial pages and blog posts, that the old hard drive way of just writing the whole disk with random 0s and 1s a few times, wont work for SSDs, and instead one should try a tool specifically designed by the manufacturer, which will just tell the disk "OK, from now on, consider yourself empty".

Wednesday, December 26, 2018

Low memory message on Windows 7 SP1

I have a big problem with a computer that is getting a Low memory message. The specifications of this computer are:



  • Windows 7 SP1

  • 32-bit Operating System

  • 4 GB RAM


The computer is getting the following message every 4 or 5 days:


Your computer is low on memory
To restore enough memory for programs to work correctly, save your files and then close or restart all open programs.


After this message appears the computer starts to run very slow and we need to restart it. The problem is that the computer it’s in a production environment and has to monitories the activity of a PLC constantly.
The actions that we did trying to fix this memory problem but without success are:



  • Stop all the applications that use a high volume of memory (SQL Server, Wonderware InTouch HMI SCADA, Reporting Services, VMWare)

  • Reinstall the operative system and all the software.

  • Scan for a virus issue without success.


Checking the event viewer we found the following suspects messages:



  • Application log


Warning: PerfDisk; Unable to read performance data for the Disk performance counters.



  • System log


Warning: Windows successfully diagnosed a low virtual memory condition. The following programs consumed the most virtual memory: view.exe (4560) consumed 37871616 bytes, DASSIDirect.exe (2904) consumed 21807104 bytes, and perfmon.exe (5868) consumed 18018304 bytes.


Error: The Vstor2 P2V30 Virtual Storage Driver service failed to start due to the following error: The system cannot find the path specified.


Checking the memory used in Resource Monitor window we found that the Commit charge increases constantly till arrives to 100% aprox. And the Memory Modified increase the same way. The Memory in Use stays at the values 1GB aprox.


This Commit charge increase is normal? It doesn’t have to decrease when internal processes are finished

linux - Ubuntu error "Gave up waiting for root device" on 9.10 Netbook Remix


So I installed Ubuntu Netbook Remix 9.10 onto my Asus EeePC 1008HA netbook.


It worked perfectly and was pretty quick. Restarting, suspending and hibernating worked just fine but the very first time I shut it down, I can no longer boot back into Ubuntu.


I created 3 partitions.
/
/home
swap


All using the default filesystem (I'm still new but, I believe, it was EXT4?).


Anyway, now I only get this error stating "Gave up waiting for root device" when I attempt to boot.


I've tried typing in "exit" at the initramfs prompt as suggestions but it never works.


So I booted off of the USB stick I used to install and I took a look at my partitions. My boot partition now says "unknown" instead of the filesystem I used. So I used fsck on it which seemed to do something (it asked about future dates which it fixed). Then I attempted to use e2fsck but I always get the error "Invalid non-numeric argument to -P ("/dev/sda1")".


What can I do to attempt to resolve this? It's such a shame because everything worked perfectly and I had no problems with multiple restarts, hibernates and suspends but the first time I shut it down this starts happening. I didn't even hold the power button.


Answer



I think it's quite similar to this (Deleted a partition, now getting 'Gave up waiting for suspend/resume device' message during boot).


I gave the answer below as it worked for me.


In my case, the boot message looked like this. The swap partition was deleted.


Gave up waiting for suspend/resume device
/dev/sda4 ... ...
[***] A start job is running for dev-disk-by\...\...\...\.device
...
...
...

First, look at the content of your fstab file,

cat /etc/fstab

will return this kind of output


# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
#
# / was on /dev/sda4 during installation
UUID=8c1977eb-ac90-426b-bc9b-a7fb2ec8d760 / ext4 errors=remount-ro 0 1
# swap was on /dev/sda3 during installation
UUID=00fd67-123DE-4b98-aa17-2d4025aed54 none swap sw 0 0
/dev/sr0 /media/cdrom0 udf,iso9660 user,noauto 0 0

Then you notice , "swap was on /dev/sdax during installation".


Recreate the deleted partition (fdisk or Gparted for instance), then
use this command to find the new uuid of the partition.


ls -l /dev/disk/by-uuid/

This outputs:


total 0
lrwxrwxrwx 1 root root 10 févr. 19 07:18 00151dcd-2bf5-4b98-aa17-8f40ef4cfd86 -> ../../sda4
lrwxrwxrwx 1 root root 10 févr. 19 07:18 6C5A1AC45A1A8B4A -> ../../sda2
lrwxrwxrwx 1 root root 10 févr. 19 07:18 8c1977eb-ac90-426b-bc9b-a7fb2ec8d760 -> ../../sda3
lrwxrwxrwx 1 root root 10 févr. 19 07:18 C064106664106188 -> ../../sda1

Update your fstab with the correct uuid that were displayed by the last command by copy/pasting the adequate uuid of the swap in the fstab file.
Then reboot, It should correct the problem.


Cannot Install Updates Windows 8.1 Error 80070490

When I attempt to install updates I recieve the error code 80070490.
I ran the command SFC /SCANNOW, which returned "Found corrupt files, but was unable to fix some of them.."
I also ran Dism /Online /cleanup-image /restorehealth, however that stopped at 40% and returned an error.
I would appreciate help with this situation, thanks.

Tuesday, December 25, 2018

worksheet function - Excel VBA: Creating Hyperlinks Type Mismatch

I have created a function to create cross-reference hyperlinks in a workbook between worksheets. For some reason I am getting Error 13: Type mismatch error when it tries to create the hyperlink.



Here is the function for creating the hyperlinks:





Public Function SearchAndLink(txtTicketNum As String, shtFromSheet As Worksheet, rngFromCell As Range, txtFromText As String, shtToSheet As Worksheet, txtToText As String, numFromOff As Integer, numToOff As Integer) As Boolean

Dim rngToCell As Range

Set rngToCell = shtToSheet.Cells.Find(What:=txtTicketNum)

If Not rngToCell Is Nothing Then
Sheets(shtFromSheet).Hyperlinks.Add anchor:=rngFromCell.Offset(0, numFromOff), Address:="", SubAddress:= _
"'" & Sheets(shtToSheet).Name & "'!" & rngToCell.Address, TextToDisplay:=txtFromText


Sheets(shtToSheet).Hyperlinks.Add anchor:=rngToCell.Offset(0, numToOff), Address:="", SubAddress:= _
"'" & Sheets(shtFromSheet).Name & "'!" & rngFromCell.Address, TextToDisplay:=txtToText

rngToCell.EntireRow.Interior.ColorIndex = -4142
rngToCell.EntireRow.Font.Name = "Calibri"
rngToCell.EntireRow.Font.Size = 11

SearchAndLink = True
Else
SearchAndLink = False

End If

End Function


And here is where I create the variables and call the function:




Public Sub CrossReference()
Dim strRORA As String

Dim rngslider As Range
Dim boolFound As Boolean

'Set variables to check RO's versus open tickets
Set rngslider = Sheets("Resource Orders").Range("A4")

Do While rngslider "" 'continue while the name column has data

' set variables to check open tickets
strRORA = UCase(rngslider.Offset(0, 10).Value)


boolFound = SearchAndLink(strRORA, Sheets("Resource Orders"), rngslider, strRORA, Sheets("Open Tickets"), "RO", 10, 78)


I have tried entering the sheet and range manually to find the error, but I always get a type mismatch error. Am I using the variables in the function incorrectly? Any help would be most appreciated.

usb - Driver not recognized with Windows Guest VirtualBox and Ipod Nano

I'm having a driver problem with my ipod nano. I'm trying to connect my nano to my windows guest vbox with a linux host. Although the system is recognizing the nano, it says that there is a driver problem. I tried allowing the system to troubleshoot the driver and it didn't work. How do I get the Windows VBox guest to recognize the iPod?


Here's what the log said when I tried to troubleshoot it:



PrintDevices and Printers Publisher details


Issues found
USB Mass Storage Device has a driver problemUSB Mass Storage Device has a driver problem
There is a problem with the driver for USB Mass Storage Device. The driver needs to be reinstalled. Not fixed
Reinstall device driver Completed


Problem with PnP devicesProblem with PnP devices
There are problems with some PnP devices. Windows will take additional steps to further troubleshoot these devices. Detected Detected
Potential issues that were checked
Windows Update configured to never install driversWindows Update configured to never install drivers
Driver updates aren't automatically installed when detected by Windows Update. Issue not present


Issues found Detection details


6 USB Mass Storage Device has a driver problem Not fixed Not Fixed


There is a problem with the driver for USB Mass Storage Device. The driver needs to be reinstalled.
InformationalDevice information
Name: USB Mass Storage Device
ID: USB\VID_05AC&PID_1301\000A27001C62DFDA
Error code: 10


Reinstall device driver Completed


There is a problem with the driver for USB Mass Storage Device. Reinstalling the driver might fix this problem.


Problem with PnP devices Detected Detected


There are problems with some PnP devices. Windows will take additional steps to further troubleshoot these devices.


Potential issues that were checked Detection details


Windows Update configured to never install drivers Issue not present


Driver updates aren't automatically installed when detected by Windows Update.


Detection details Expand


Collection information
Computer Name: A***-WINDOWS
Windows Version: 6.1
Architecture: amd64
Time: Thursday, February 06, 2014 12:18:04 AM


64 bit - Per bytes RAM memory acess



I have just a simple question. Today memory DDR chips are 64 bits wide, and the CPU data bus is also 64 bits wide. But memory is stil organised in single bytes. So, what I want to ask is, when CPU selects some memory adress, it should be one byte, right? Becouse the lowest memory portion you can access is 1 byte. But, if you get 1 byte per 1 adress, why is memory bus 8 bytes wide?


Answer



We refer to our computer architectures as byte-addressable -- meaning, memory is addressed as bytes. That helps us pull 8-bits of data at a time. But, that is not always the norm, and other widths are used.



In fact even as you use a Intel based byte-address computer, the memory you use is usually accessed with a different width (64 bit as in your example).



This helps in addressing larger amount of data with lesser address space.




My answer actually completes here, however, I ramble further to talk about how memory accesses are done which might help think about the abstractions implemented (and maybe also motivate you to read up some more on memories).






If you have seen a DDR-RAM stick, you would recall seeing several chips on a green PCB. These are striped together for a parallel access. That makes your RAM accesses faster.



In front of the RAM module is a Memory Controller. This is designed to access data in a wider bit-width (32, 64, 128 bits -- depending on the design).



When you access a byte from this memory space, the memory controller actually gets a complete "memory word"; here, a word is actually the width of this access from the memory controller.




Which means if its 128 bit width, you always fetch 16 bytes from addresses which are multiples of 16.



So, now what happens when you want a byte at address 18 (= 16+2)?
Well, you get 16 bytes from address 16 and throw away 15 of them!



More interestingly, what happens when you want to write a byte at address 19?
You fetch 16 bytes from address 16, change the 3'rd (19th address) byte, and then write back all these 16 bytes (fun huh?).



All this is quite an effort. The memory controller is designed to manage this and infact works on multiple requests in parallel.



We are not even talking about 'dual-channel' yet :-)







Here is a reference from Wikipedia on DDR SDRAM organization




PC3200 is DDR SDRAM designed to operate at 200 MHz using DDR-400 chips
with a bandwidth of 3,200 MB/s. As the memory is double pumped,
this means that the effective clock rate of PC3200 memory is 400 MHz.



1 GB PC3200 non-ECC modules are usually made with sixteen 512 Mbit chips,
8 down each side (512 Mbits × 16 chips) / (8 bits (per byte)) = 1,024 MB.
The individual chips making up a 1 GB memory module are usually
organized with 64 Mbits and a data width of 8 bits for each chip,
commonly expressed as 64M×8.




Memory manufactured in this way is low density RAM and will usually be
compatible with any motherboard specifying PC3200 DDR-400 memory.




From the Memory Controller page




Bus width is the number of parallel lines available to communicate with the memory cell.
Memory controllers' bus widths range from 8-bit in earlier systems, to 512-bit in more complicated systems and video cards (typically implemented as four 64-bit simultaneous memory controllers operating in parallel, though some are designed to operate in "gang mode" where two 64-bit memory controllers can be used to access a 128-bit memory device).



How to find which program took up a hotkey combination in ubuntu (16.04)?

I am using Ubuntu 16.04.


Currently I need to use a hotkey (Ctrl + ;) in one of my program (IntelliJ Idea). But I found that it is taken by another program which I could not identify which is it.


This hijacking program 's behaviour is to display a list of clipboard history near the cursor. But there is no information shown about the program name. This is a very brief list.


Is there a way to show which process is hijacking / intercepting a hotkey combination in Ubuntu? I did research and found some software called Hotkey Explorer but it only have windows version.


(Additional Information)


I recall that a few month ago I installed several clipboard managers. I ended with Glipper but may still have other software remain installed. There was quite a bunch software I tried so I could not recall the name of the clipboard manager.

Monday, December 24, 2018

How to install git on Mac without xcode?



On Mac. I have installed 'brew' using terminal, now I tried to install 'git' with the command: 'brew install git'. But terminal says "Now install Xcode: http://developer.Apple.com/technologies/xcode.HTML"



So I go to this page, but I found that I have to pay (at least) 99$/year to get 'xcode'.



Is there a free version of xcode to download from Apple site?
If not, is there a way to install 'git' without 'xcode'?


Answer



Xcode 3.2.6 is free. It works on OS X Snow Leopard(10.6) or later. You have to be a registered Apple Developer to download it. It is also free to register.






Xcode 4.1 is also free. But it works only OS X Lion(10.7). You can download Xcode 4.1 from Mac App Store.





If you are using OS X Lion, you can use Xcode 4.1 or Xcode 3.2.6 for free.


Sunday, December 23, 2018

What is typical power consumption of 2.5" Laptop external Hard Drive connected to USB socket?


What is approximate power and current consumption of 2.5" Laptop external Hard Drive 7200RPM SATA (300Gb), connected to laptop USB port as external hard drive? I heard that using regular HDD connected to laptop's USB socket as external drive isn't very good for motherboard, due to extra load on motherboard as HDD requires much more power to drive, comparing with SSD drives or USB flash drives.


Edit: just find some info about power consumption:


enter image description here


Answer



Your solution here is to measure the power. I can see two ways to achieve that.



  1. Make up a USB breakout cable that you can use with your digital multi-meter to measure the voltage and current supplied from the USB port to the external drive.

  2. Purchase one of the inexpensive USB test meters that displays voltage and current for you. One example of these meters can be seen here on Amazon.


enter image description here


Once you have voltage in Volts and current in Amps just multiply the two numbers together to get power in Watts.


booting windows 8 from external hard drive




How I can create bootable external hard drive?



or:

How To Create A USB Bootable Installer Drive For Windows 8



(some websites said that you must format your HDD with FAT32 but as you know 1TB cannot be formatted using FAT32)



Create bootable External Hard drive



but i cant format my external Hard FAT32 for doing this and i dont want to use USB cool disks(flash disks) either




is there any other options to do this?



thank u all.


Answer



Apparently it's tricky to install Windows on a USB Hard Drive
Here is an article from 2008 on it
http://www.techspot.com/community/topics/how-to-install-and-boot-windows-on-an-external-usb-hard-drive.116114/



But you can get around that by using an image.
http://www.tomshardware.co.uk/forum/73631-35-install-windows-external-drive



I'd add, that you can use Macrium Reflect, to create and restore images, it is freeware,




Hello there. I have a simple solution for you if you are familiar with backup & recovery by acronis true image. Then step as bellow:
1. Install windows XP to your internal HDD
2. Make backup your windows XP by acronis true image
3. Create 1 primary partition in your external HDD
4. Recovery windows xp backup file which is already created in step 2 to primary partition in your external HDD.
5. Restart your laptop and press F12 key to get in menu boot select . Then select boot from external HDD


There may be a newer method , using diskpart and a VHD, which is mentioned at your link
http://dioisme.blogspot.com/2012/11/create-bootable-external-hdd-to-install.html




You can format it as FAT32, and you can always convert it to NTFS later. (I did that with XP).



Windows 7 has a convert command to do that (XP had too apparently)
http://windows.microsoft.com/en-gb/windows7/convert-a-hard-disk-or-partition-to-ntfs-format


windows xp - My computer hangs on booting. How do I figure out what is going wrong?


My work laptop (which I have admin access on) freezes fairly frequently upon boot. I get to the point where I am logged in (type my Windows user name and password) and looking at the blue background...and...it just hangs.


I have tried looking at the event viewer, but there are so many errors and warnings, I'm not even sure I'm looking at the right thing. Any suggestions for figuring out what is going wrong?


(With all this said, there is a ton of crap installed on this PC due to corporate policies, etc. It may very well be an update to an application. If I can confirm that it is a specific application, that would be huge.)


Answer



This often occurs due to a network/domain issue. Are you logging in to a domain? If so, try logging in to the local machine as the local administrator. If everything boots up quickly, then the problem lies on the network and we can go from there.


A better explanation is that XP isn't very smart with networking. When you log in to your domain, XP tries to make all of those connections to your domain while it is logging in, and waits a very long time before timing out to let you continue to log in.


Saturday, December 22, 2018

windows - Understanding 'Access Denied' so that permissions can be reverted - icacls and takeown



  • Before taking ownership of files and folders I would like to understand how to view the current permissions so that they may be reverted.

  • I am reciving an 'Access Denied' message to view or save permissions with elevated command prompt for location: C:\ProgramData\Microsoft\Windows\SystemData in Windows 10 enviroment.

  • It looks like that I may need to take ownership first, then can view the permissions, and use something like icacls 'reset' command to fix it afterwards.


If I try to view permissions:


C:\Windows\system32>icacls "C:\ProgramData\Microsoft\Windows\SystemData"
C:\ProgramData\Microsoft\Windows\SystemData: Access is denied.
Successfully processed 0 files; Failed processing 1 files

If I try to save an ACL file:


C:\Windows\system32>icacls C:\ProgramData\Microsoft\Windows\SystemData /save "C:\SystemData.acl" /t
C:\ProgramData\Microsoft\Windows\SystemData: Access is denied.
Successfully processed 0 files; Failed processing 1 files

In the answer to 'Understanding how to use Icals & Takeown' the owner of the folder was NT SERVICE\TrustedInstaller which may infact may be a standard in Windows 10, though I am only guessing.


Should I just use takeown, and icals, find out the permissions and then use the reset command.


takeown /f C:\ProgramData\Microsoft\Windows\SystemData /r
icacls C:\ProgramData\Microsoft\Windows\SystemData /grant "%USERDOMAIN%\%USERNAME%":(F) /t
Make Changes
icacls C:\ProgramData\Microsoft\Windows\SystemData /setowner "NT SERVICE\TrustedInstaller" /t
icacls C:\ProgramData\Microsoft\Windows\SystemData /reset /t

Likewise with the ACL, one would need to take ownership before creating, or is there a work around?


Reading:


Answer



How to view permissions of Accessed Denied Folder in Windows 10



I guessed that system would be one user that would have access to this
folder, so following after that thought I found a solution for running
command prompt as system.



See - SO How do you run CMD.exe under the Local System Account?




  1. Download PStools from SysInternals, Microsoft.

  2. Run CMD as admin, navigate to folder of psexec.exe & psexec64.exe and run the following:



psexec -i -s cmd.exe


or if you want 64 bit...



psexec64 -i -s cmd.exe



  1. Now a command prompt window has opened as system.


  2. Now we can view the permissions of the folder...




icacls C:\ProgramData\Microsoft\Windows\SystemData
C:\ProgramData\Microsoft\Windows\SystemData
NT SERVICE\TrustedInstaller:(F)
NT AUTHORITY\SYSTEM:(F)



  1. Also an ACL can now be saved and resoted as described here



icacls C:\ProgramData\Microsoft\Windows\SystemData /save "C:\SystemData.acl" /t
icacls C:\ProgramData\Microsoft\Windows /restore "C:\SystemData.acl"



  1. In standard admin Command Prompt, not system, have yet to workout how to restore ownership like this after using takeown. Currently using the above System Command Prompt or ACL solution permissions can be restored. However have discovered that one can just run a batch script through task scheduler as System, then one does not need to change permissions.



Reading:


Rename photos during download from camera - on Linux?


On Windows, I'm using this feature (right-hand text) of the excellent cam2pc software to download images&videos from my camera and rename them in the same step. I haven't found any software for Linux that does the same, or does it as good. Suggestions please?


Details and requirements:



  1. I am using Picasa for everything after the download and I want to keep using it.

  2. I want a better download functionality than what Picasa offers.

  3. I know that some tools can do batch renaming after the download, but that's limited to those inside one folder. I want to specify the renaming scheme before the download, in a one-step process.

  4. Must run on PCLinux 2009.2 (Mandriva variant with KDE).

  5. Should autodetect that the camera has been plugged into the pc.

  6. Must download JPG and AVI files.

  7. Must support a user-customizable pattern for the downloaded files, like
    path/year/year-month-day hour-min TOPIC serial#.lowercase-extension
    e.g. photos/2009/20091218 1214 Skiing with friends 001.jpg
    (In cam2pc, that would look like %Y%m%d %h%u %P %{num:3}.%{ext})


By the way, I'm new to Linux and not a programmer, so I am hoping that solutions already exist that aren't too technical, or well documented.


Answer



A custom solution requires a little programming -- I need to write a shell script:



  1. Use the find command to see if the newly mounted USB drive contains media files;
    if no media files are found, then abort the script.
    find "/media/disk/dcim" -iname "img*.*" -type f


  2. Use the read command to prompt for a topic. (Equals %P in the question.)


  3. Find the timestamp of the oldest media file.
    ls -GgtR --full-time --time-style +"%Y%m%d %H%M" *.png | tail -1 | cut -c21-34



    • Hints:
      -GgtR = hide group and owner, sort by time, list Recursively.
      tail = keep only the last 1 line of the output.
      cut = keep only the characters 21-34.


  4. Use mkdir to create a new folder based on that date and topic.


  5. Use the find command with the -execdir option to find all media files,
    then move (mv) each hit to the new folder,
    then use jhead to rename each hit according to each file's timestamp.


  6. Optional: Use the umount command to unmount the USB drive.


  7. Set up Linux to execute this script when an USB drive is mounted. The detection of the USB drive (or camera) varies depending on the Linux variant; refer to OS-specific documentation. Or just run the script manually...



I'll need to spend invest some hours in learning bash commands, and also in learning how Linux mounts drives.


Friday, December 21, 2018

microsoft excel - Upgraded to Windows 10 - Macros Broken

Problem:



I finally upgraded to Windows 10 and a few macros in Excel 2010 that I use frequently no longer work. They crash instantly when I run them and all I receive is an "automation error". They do not reference any outside programs/files; just lots of copy/pasting and sorting within a couple sheets. The macros seem to run on other people's computers (on Windows 10) just like they used to.




Stuff I've done:




  • obligatory reboot

  • Repair excel

  • reinstall excel

  • fiddle with macro permissions

  • use copies of the workbook that work on other computers

  • The weird stuff: If I create a new macro enable workbook and copy-paste in my old macros + workbook contents and try to run the macros, they work. As soon as I exit and reopen, the macros stop working. This holds true for really simple test macros I've tried making. A macro which copies a letter from one cell to another crashes after the workbook its saved in has been closed then reopened.




I feel like I'm forgetting a few things I've tested, but this should cover most of it.

Windows 10 says my device is up to date, but it doesn't have this month's security update



This scenario is a bit different than the one described here. I'm running the latest feature update of windows, Windows 10 1709. In December, I had to manually install the Fall Creators Update in-place.



Starting in January 2018, the device falsely reported it was up to date several days after a security KB was rolled out. I had to resort to manually installing and downloading the January 2018 security update.



Now the February 2018 security update is out, and this machine again claims it is up to date but is not.



I've tried everything here (save clean install) to no avail. I've run Get-WindowsUpdateLog in powershell, and for some reason the update service really is not seeing any relevant security updates. (I've grabbed the ID of the relevant February 2018 update, KB4074588 with ID 29A306E7-C732-4FF8-A939-B1CD9FEEF0D6.1, and that update is nowhere to be found in the log.)




Any thoughts or suggestions before I just proceed with a new windows install?


Answer



One of the main issues with the January updates are that they require an updated anti-virus to update a specific registry value. Once that is done, then Windows will start seeing updates again.



If you do not have an anti-virus that will do this, or you have Windows Defender disabled, you can manually add the registry value.



Microsoft has released this advisory.



You can check if this is the case pretty easily.





  1. Click on start

  2. Type in regedit and hit enter
    Browse to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\QualityCompat

  3. If cadca5fe-87d3-4b96-b7fb-a231484277cc exists and is set to 0x00000000 you should be getting the updates.



If not, you can create the entry if you wish.



Registry Entry



How to boot from new hard drive

My desktop computer is 11 years old, running Windows XP. The hard disk was crashing periodically, so I decided to buy and install a new hard drive. The computer design uses the Parallel ATA (=IDE) interface, which apparently is hard to find these days, but I managed to order a Western Digital 250 GB PATA hard drive.


I opened up the computer and installed the new hard drive into an empty slot, and connected it to the cable as Primary Slave. (I did not remove the old hard drive as I will want to copy the data from it to the new hard drive.) I then installed Xubuntu 12.04 LTS (since Windows XP is approaching end-of-life) onto a partition of the new hard drive, using an install CD.


The BIOS recognizes the existence of my new drive in the Primary Slave position. However, I am having trouble configuring the BIOS to boot from the new drive.


EDIT:


When I enter the Phoenix Award BIOS CMOS Setup Utility -> Advanced BIOS Features and choose "First Boot Device", the available choices include HDD-0, HDD-1, HDD-2, and HDD-3 (as well as others that seem to be irrelevant, as far as I can tell). HDD-0 goes to the original (old) hard drive. Selecting HDD-2 or HDD-3 leads to an immediate "SYSTEM BOOT FAILURE, INSERT SYSTEM DISK AND PRESS ENTER" when trying to boot. Interestingly, if I set "First Boot Device" to HDD-1 and try to boot, I still get "SYSTEM BOOT ERROR..." as above, but it takes an extra 65 seconds before that error message is displayed.


So my question is: How do I configure the BIOS to boot from my newly installed hard drive? More specifically, it appears that when setting the "First Boot Device" to HDD-1 it may be trying to boot from my new drive for 65 seconds, but the result is unsuccessful. How do I fix this?

usb - Ubuntu 11.04 "The destination is read-only" - thumbdrive - GNOME error?

I have Ubuntu 12.04.
My problem is, I can't get write access to any USB device, like thumbdrive, SD card or digital camera using GNOME 3.4.1.


Both FAT32 and NTFS filesystems won't work.


From terminal I can create files without any problems...


But when I do this same from GNOME file explorer: "The destination is read-only":


Error
Link to full-size image


syslog:



Jul 1 21:52:48 alan-OEM kernel: [19186.444270] usb 1-5.1: reset high-speed USB device number 12 using ehci_hcd
Jul 1 21:52:48 alan-OEM kernel: [19186.539012] scsi10 : usb-storage 1-5.1:1.0
Jul 1 21:52:49 alan-OEM kernel: [19187.543752] scsi 10:0:0:0: Direct-Access Generic STORAGE DEVICE 9407 PQ: 0 ANSI: 0
Jul 1 21:52:49 alan-OEM kernel: [19187.546942] sd 10:0:0:0: Attached scsi generic sg4 type 0
Jul 1 21:52:50 alan-OEM kernel: [19187.769766] sd 10:0:0:0: [sdd] 15523840 512-byte logical blocks: (7.94 GB/7.40 GiB)
Jul 1 21:52:50 alan-OEM kernel: [19187.770881] sd 10:0:0:0: [sdd] Write Protect is off
Jul 1 21:52:50 alan-OEM kernel: [19187.770885] sd 10:0:0:0: [sdd] Mode Sense: 03 00 00 00
Jul 1 21:52:50 alan-OEM kernel: [19187.771900] sd 10:0:0:0: [sdd] No Caching mode page present
Jul 1 21:52:50 alan-OEM kernel: [19187.771905] sd 10:0:0:0: [sdd] Assuming drive cache: write through
Jul 1 21:52:50 alan-OEM kernel: [19187.776387] sd 10:0:0:0: [sdd] No Caching mode page present
Jul 1 21:52:50 alan-OEM kernel: [19187.776392] sd 10:0:0:0: [sdd] Assuming drive cache: write through
Jul 1 21:52:50 alan-OEM kernel: [19187.779555] sdd: sdd1
Jul 1 21:52:50 alan-OEM kernel: [19187.784891] sd 10:0:0:0: [sdd] No Caching mode page present
Jul 1 21:52:50 alan-OEM kernel: [19187.784896] sd 10:0:0:0: [sdd] Assuming drive cache: write through
Jul 1 21:52:50 alan-OEM kernel: [19187.784900] sd 10:0:0:0: [sdd] Attached SCSI removable disk

/etc/mtab:



/dev/sdd1 /media/CC2A-FA36 vfat rw,nosuid,nodev,uid=1000,gid=1000,shortname=mixed,dmask=0077,utf8=1,showexec,flush,uhelper=udisks 0 0
root@alan-OEM:/etc#

And /media:



root@alan-OEM:/media# ls -l
total 12
drwx------ 26 alan alan 8192 sty 1 1970 CC2A-FA36

("alan" is my account.)
It looks like like I have read-write-execute.


So from terminal:



alan@alan-OEM:/media/CC2A-FA36$ mkdir zzz
alan@alan-OEM:/media/CC2A-FA36$ mkdir zzzz
drwx------ 2 alan alan 4096 lip 1 22:49 zzz
drwx------ 2 alan alan 4096 lip 1 22:49 zzzz

Work great... but from GNOME I can't....
It's making me crazy...

port - What is this 15 pins connector?



Old game controller



I do not think it's a serial port as there's too much pins. It's used to plug a very old controller. Will I be able to find any adapter to USB?


Answer




Will I be able to find any adapter to USB?





Yes




I do not think it's a serial port as there's too much pins. It's used to plug a very old controller.




It's a game port connector




The game port, originally introduced on the Game Control Adapter, is a

device port that was found on IBM PC compatible and other computer
systems throughout the 1980s and 1990s. It was the traditional
connector for joystick input, and occasionally MIDI devices, until
replaced by USB in the 21st century.



enter image description here




Source: Game Port


web crawler - Scan and map website and log all links that have "particular-string" in them




Is there a tool that would scan a website and log all links that have a particular string in them?



I see Teleport Pro, but it seems like it does make a copy of the site, but I only need links.


Answer



You'll need some kind of offline browser in order to automatically traverse all of the links on the site. I haven't used Teleport Pro but HTTrack is a free offline browser that's pretty powerful. They provide an example of how you can traverse a site looking for a particular keyword.


ntfs - Deleting large amount of files in Windows is slow




I have a Windows XP box with an NTFS disk and deleting large amounts of files is extremely slow. If I select a folder that contains a large number of files in a tree of folders and delete (using shift-del to save the recycle bin) it takes time that seems to be directly proportional to the number of files within the folder before it even pops up the confirmation box. It then takes an even longer time to delete each file in the folder.



Is there a way to delete a folder in Windows and not having the time taken proportional to the number of files within it?


Answer




Is there a way to delete a folder in
Windows and not having the time taken
proportional to the number of files
within it?





I don't think so, but some methods are clearly much quicker than others.



The worst way is to send to Recycle Bin: you still need to delete them. Next worst is shift+delete with Windows Explorer: it wastes loads of time checking the contents before starting deleting anything.



Next best is to use rmdir /s/q foldername from the command line. del /f/s/q foldername is good too, but it leaves behind the directory structure.



The best I've found is a two line batch file with a first pass to delete files and outputs to nul to avoid the overhead of writing to screen for every singe file. A second pass then cleans up the remaining directory structure:



del /f/s/q foldername > nul

rmdir /s/q foldername


This is nearly three times faster than a single rmdir, based on time tests with a Windows XP encrypted disk, deleting ~30GB/1,000,000 files/15,000 folders: rmdir takes ~2.5 hours, del+rmdir takes ~53 minutes. More info here.



This is a regular task for me, so I usually move the stuff I need to delete to C:\stufftodelete and have those del+rmdir commands in a deletestuff.bat batch file. This is scheduled to run at night, but sometimes I need to run it during the day so the quicker the better.


windows 7 - Kill a process which says "Access denied"

I have a process that I can't kill with either Task Manager or Process Explorer - I get the error "Access denied". The process isn't a Windows executable.



How can I kill it? Is there some tool I could use to override this protection?



I'm using Windows 7, 64-bit edition.

Thursday, December 20, 2018

notifications - How to disable popup messages in Windows 8?


Windows 8 keeps popping up irritating messages at all odd times at the top of the screen:


Win8 Popups


These seem to be like some sort of new balloon tips. How do I get rid of these permanently?


Answer



Those are called toaster notifications. Go to the Charms menu (Win+C) and click on Settings. There you will see a notifications icon. Clicking on it will disable all such notifications. If you want to disable notifications for specific applications only, then click on "More PC settings" which will bring you to the Metro Control Panel. There, under the Notifications bar, you can choose what notifications you want to show/hide.


If you want to turn off balloon tip notifications you need to change some DWORD values in the registry. Navigate to HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced and set/create following keys to 0:


ShowInfoTip
FolderContentsInfoTip
StartButtonBalloonTip
EnableBalloonTips

Wednesday, December 19, 2018

What is the cause and disadvantages of high memory usage as time passes on Windows 8.1?

My laptop is used in long time intervals without restarting. The OS tends to use extensive memory (~8GB) as time passes. Below are screenshots of two different states with exactly the same programs are running.


Long Time


enter code here




Right After Boot


enter image description here




It seems that caching causes this situation. I have two questions:



  1. Is this amount of memory usage a bad thing and therefore something to fix?

  2. Why cached amount increases as time passes?


Edit


Here's the Poolmon output as I appear to be using 6GB of RAM in another long session. Anything suspicious here?


enter image description here
enter image description here

hard drive - Windows 10 won't install on GPT partition, WD 6TB

I have a new WD 6TB drive, I boot from Windows10 USB, It originally partitioned the drive as MBR, Windows installed, however I could only use 2TB of the 6TB drive and it would not let me create more 2TB partitions. I then Googled the problem and people are saying the partition it as GPT. I then used diskpart and converted to GPT. However, now when I attempt to install Windows I get an error unable to install to GPT formatted drive.
I can't find UEFI in my BIOS, did they have it in 2014? I have Asus M5A78L-M USB3, I already checked and I already have the newest version.

power supply - Can't seem to get chassis fans running


I've got a ASUS ROG Maximus V Extreme and I'm trying to connect my fans to the chassis fan pins to get them running according to the motherboard. I know for sure that my fans work, as when I test them with my Molex connector, they all happily power on.


Here's two of my chassis fans connectors (there are 3-4):


enter image description here


enter image description here


Here's the connector that came with either my motherboard or the PSU, can't remember :)


enter image description here


I've never seen one of these strange cables before. All I know is that if I plug in the 4-pin mobo connector to either of these fan plugs, fans don't come on and don't show up in the BIOS. (Motherboard has a crazy awesome UEFI BIOS and shows you if it sees the fans.) If I try plugging the 4-pin connection into the mobo and the other side into the PSU, I can't POST. If I plug the PSU connector in without the mobo connector, fans come on.


What could I be doing wrong here? Is it a problem with the cable I'm using? Is there something I may have missed in the build?


Answer



You are referring to a floppy power connector. It does not connect to the motherboard. The connection on the motherboard is where you connect the cable from the fan.


If you don't have a floppy drive, leave this disconnected.


Floppy connector is the lower left connector in this image.
enter image description here
enter image description here


Tuesday, December 18, 2018

windows 7 - How to start a program and close it right after it's launched with BAT/CMD file?


There are two program A and B. What I want to do is:
1,Launch program A;
2,Close program A;
3,Launch program B;
4,Close program B;


How can I write the bat file?


My previous work;


A.exe
TSKILL A
B.exe
TSKILL B

However,when I launch the program A. It keeps running and the rest of the bat files doesn't run at all.


Thanks for your help in advance.


Answer



Using START /WAIT A.exe will start A.exe and wait for it to terminate before the script continues to execute the next line.


However, if you would like to automatically kill A.exe after a set time limit, use this:



@ECHO OFF
START /I A.exe
TIMEOUT 10 & REM Waits 10 seconds before executing the next command
TASKKILL /F /IM A.exe
START /I B.exe
TIMEOUT 10 & REM TIMEOUT only works on Windows 7 and later
TASKKILL /F /IM B.exe
PAUSE

worksheet function - Excel Text to Date format

I wish to convert the text string, (which in imported into excel as a 'General' formatted field) 12/31/2017 into date format displaying it as; dd/mm/yyyy, however all attempts have failed so far, incl. the text to columns option, reformatting it as a date field using English (UK) as the Locale.


I have also tried to parse the text using a formula based on the: DATE, LEFT, MID, and RIGHT Functions; to no avail. The problem appears to be the inclusion of the / in the text string and the fact that I wish to swap around the format from mm/dd/yyyy to dd/mm/yyyy. Anyone out there experienced this issue?

Excel default date when dd/mm entered

In Excel when i enter a date into a blank cell (General format) as, say 7/15, the cell changes it's format to "Custom: m-ddd". How can i make doing this default to the standard default date "*3/14/12"?
Note: my region "Short date" format is the standard U.S. "M/d/yy".

windows 7 - Win 10 & Win 7, separate drives, uefi; Booting from USB


I'm a novice user. I've struggled with topics like eufi,gpt,grub etc.


I want to remove/add drives into my box without things getting screwed up when the drive with WinBootLoader has been removed or is now drive 2.


Drive 1 = Windows 10 3TB. uefi/gpt about 6 partitions (currently not booting)
Drive 2 = Windows 7 3TB. uefi/gpt about 5 partitions
Drive 3 = Linux (Future Planned) 60 GB.


I want to chainload, from a usb drive, to any hard drive's OS. I also want to be able to use the contents of the other drives. Write to first block of the USB drive, rather than have a bootloader write to first block of a HDD, and screw stuff up.


Perhaps my research is out of date, but it seems this is difficult. Especially because I want to boot to Windows (not linux) from the USB, and also because the 3tb drives are UEFI (due to their size).


At the end of the day I want to remove all but 1 drive, and remove the USB, make the appropriate changes in BIOS, and have it boot. How can I do this?


If it's doable, I hope can rescue a failing drive that is mbr - Is that doable under the same scheme? Pretty certain the USB has to be uefi.


Answer



The simplest way to achieve your goal is likely to be placing a boot manager on the USB flash drive and configuring it to boot either Windows installation. My own rEFInd can do this pretty easily, since it scans all readable volumes and builds a boot menu on a per-boot basis. In fact, there's a USB flash drive image available on the rEFInd downloads page that should do the job without modifications. Other boot managers can also be configured to do this, although most rely on static configuration files that you'll need to maintain manually.


Another approach is to install Windows 7 on drive #1, copy its Windows boot loader file (EFI/Microsoft/Boot/bootmgfw.efi) to the fallback filename (EFI/BOOT/bootx64.efi), unplug the drive, install Windows 10 on drive #2, and then copy its boot loader file to the fallback filename. (These file operations are done on the EFI System Partition (ESP).) When you add Linux to the mix, though, things get more complex; you'd need to either use rEFInd or move GRUB to the fallback filename and ensure the GRUB configuration file has entries for both Windows installations. This approach would not involve the USB drive (unless you put the ESP or the Linux /boot partition on the USB drive.) Keeping this working will require extra attention, since most distributions update their GRUB configuration files whenever the kernel or GRUB is updated, and if a disk is unplugged when this happens, any OSes installed on it will be omitted from the updated GRUB menu.


Stepping back a bit, the old trick of unplugging disks to ensure that OS A can't damage OS B (installed on a different disk) is more difficult under EFI than under BIOS, since EFIs store boot paths in NVRAM, and may delete a boot path when they detect that it's no longer valid. Thus, drive-swapping creates new problems that don't exist under BIOS. The rEFInd-on-USB approach bypasses this problem by using a replacement boot manager (I focused on rEFInd, although others can work) that scans for boot loaders at every boot rather than relying on built-in NVRAM entries. In this scenario, rEFInd is installed to the fallback filename on the USB drive, which is the normal way to boot a removable medium. My second approach bypasses the problem by using the fallback filename on regular hard disks -- but as I noted, GRUB has an analogous problem, so care must be taken with package updates. The point of this paragraph is that you might want to reconsider your approach. Isolating OSes from each other by physically plugging and unplugging cables has its benefits, but it also creates problems, especially under EFI.


hard drive - My laptop is extremely slow and HDD is always 100% engaged in Task Manager

I have been searching for a solution for a while and read many discussions on the issue, including two threads on SuperUser:


Laptop's disk usage is always 100% and freezes after few seconds


Windows 8.1 Update 1 Disk Usage 100%


However, none is conclusive. My Task Manager always shows 100% for Disk. I have recently re-installed Windows 10 and have not installed so many applications yet. My HDD is half empty. The laptop is a HP Pavilion DV6 with 12 GB of RAM and 7-8 years old. I am not sure whether my HDD needs to be replaced. As I said, I have read many discussions and followed everything that had something to do with viruses, anti-viruses, hibernation, etc, and none worked for me. How can I decide whether the HDD is the reason?


My Task Manager

command line - Record webcam automated with unknown duration

I need to record (not stream) from my webcam, convert it to H.264 and store it in a mp4-container. With VLC media player I can do this manually with the Open Capture Device menu where I just have to press "convert" and set destination file and video codec.


But I need to do this automated, e.g. with command line or as batch - so that I can start recording from another program - and I don't know how to do that. Second problem is that I don't know the duration beforehand so I need also a possibility to stop recording (maybe a start and stop command ?).


EDIT: I'm using Windows 7.

Monday, December 17, 2018

usb flash drive - How to format write protected sandisk pendrive


How to format SanDisk Curzer Edge 8GB pen drive when it is half bootable. Because of some laptop's charger issue i could not complete process. Now i want to format it but could not success. I have tried many solution which are available on net but not get success in any of them?
Image


Answer



Try following:



  1. Open "Computer Management"

  2. "Storage" -> "Disk Management"

  3. Make sure to find the correct device on the bottom panel

  4. Right click on the partition rectange -> "Delete Volume"

  5. Right click on the appeared grey area -> "Create Volume"


edit: If that doesn't work, you might need to use DISKPART utility to recreate filesystem and main partition, like in this question:



Start a command prompt, and start the DISKPART console. List all of
your disks by typing LIST DISK, then select the proper disk with
SELECT DISK # (where # is the SD card). You can then type CLEAN to
clear the partition table on the card, effectively blanking it. MAKE
SURE YOU SELECTED THE PROPER DISK BEFORE RUNNING THE CLEAN COMMAND!


To create a primary partition to reuse the space on the card, type
CREATE PARTITION PRIMARY. This will then reallocate the previously
"cleaned" space.


To format, type FORMAT FS=FAT32 QUICK...



(Ignore the SD card being mentioned)


edit 2: If that doesn't work try suggestion from this link:



1) list disk
2) select disk #
3) list volume
4) select volume #
5) detail disk
6) detail volume
7) attr disk clear readonly
8) attr volume clear readonly
9) detail disk
10) detail volume



edit 3: This answer to a similar question suggests that the drive may be faulty:



I understand that you are getting write protection error while
accessing your Cruzer flash drive. The flash drive has detected a
potential fault and has become write protected to prevent data loss.
There is no method to fix this. You will need to backup your data and
replace the flash drive. ...



installation - Windows 8 OEM Reinstalling

I know this question is a repetition but I didn't find any solution of my problem from any of the previous questions. Recently I formatted my Laptop HDD and now I want to re install windows 8 I've a Windows 8 OEM license but the problem is I don't have a disc , I downloaded en_windows_8_x64_dvd_915440 from msdn , but when I boot the windows it shows the error that the current version is not suitable with my serial key, so where I can find an OEM Windows 8 and also I've a retail windows 8 disc so if I install that windows 8 in my pc and is there any way to activate it using my OEM key

windows 7 - "Temporarily" disable group policy?



I'm trying to get some software installed on my company laptop (Business Intelligence SSDT for Visual Studio). As a developer, I have administrator rights, and have never run into an issue installing software before. The software has been approved by my company.



SSDI needs to install Microsoft SQL Server Data Tools, which fails during setup due to "Rule 'Setup account privileges' failed." I've traced this issue back to a group policy setting for "Debug programs":




  • Local Computer Policy > Computer Configuration > Windows Settings >
    Security Settings > Local Policies > User Rights Assignment




In the list of policies, the "Debug programs" security settings does not have "Administrators" listed. And although I am part of the administrators group, I am unable to add groups to this policy.



Is there some way I can "temporarily" disable or remove these group settings, install the software I need, then re-enable everything afterwards? Or better yet - add the administrator group to the policy?



I've seen several options, but I don't want to proceed with half-baked ideas that could affect my laptop's access to the company network.



For example, could I:





  1. Right-click into my Local Computer Policy > Properties, and select the option to "Disable Computer Configuration settings"?

  2. Edit the registry to remove group policy settings?

  3. Create a non-domain user (a true "local admin" user?) that has no GPO restrictions, disconnect from any network, and install the software from there?



Are there risks to the above options that I would not be able to reverse myself? Or are there other better options?







Side note: My first step troubleshooting this was to contact my system admin, who informed me that I should have "full control" over all my local policies, including the "Debug programs". According to him, there should be no permission / group policy restrictions for administrators.



His thought is that the issue is coming from some sort of permission (or as he put it, "sysadmin" access) to our SQL servers, and he would have to reach out to the server team and get back to me in a few days. I have permission to "explore" my own solutions in the mean time.


Answer



As opposed to working around group policy, you might be able to add yourself or the Administrators group directly to the "Debug Privilege" right.



There's a command-line utility called NTRIGHTS which can do this:



Ntrights.exe -u Administrators +r SeDebugPrivilege



NTRights is part of the W2K3 resource kit, but it still works on more recent windows versions. See Windows 7 equivalent for ntrights.exe and http://ss64.com/nt/ntrights.html (I don't have a direct link on where to download it, but with some google sleuthing, or getting your hands on the W2K3 resource kit install, you'd have it).


installation - IIS 7 fails to install on Windows 7, despite attempts at Windows Fix It tool, removal/reinstallation of .NET 3.5, etc


I'm not exactly the first person to run into issues getting IIS 7 to install on a Windows 7 machine, but so far, nothing has really managed to fix the problem. When I try to install IIS 7, I get this message:



An error has occurred. Not all of the features were successfully changed.



This also occurs if I try to do a full installation, instead of a basic installation, of .NET Framework 3.5.


I've tried several other things to fix the IIS 7 issue:



  • Uninstalling .NET 3.5, rebooting, reinstalling .NET 3.5 (basic installation), then installing IIS 7.


  • Uninstalling .NET 3.5, rebooting, not reinstalling it, but just going ahead and installing IIS 7.


  • Running the Windows Fix It tool. (It detected there was something wrong with installing IIS 7, but it ran into its own error of some sort while trying to fix it.)


  • After the Windows Fix It tool managed to fix some other things successfully, grabbing a bunch of Windows updates, rebooting, then installing IIS 7.


  • Making sure HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\HTTP\Start is set to 3, instead of 4.


  • Etc.



From when I had the same issue on the same computer several months ago and eventually just moved on, this is logged several times at the top of iis7.log:


[06/23/2014 20:47:57] [ ***** IIS 7.0 Component Based Setup ***** ]
[06/23/2014 20:47:57] "C:\Windows\System32\inetsrv\iissetup.exe" /launch C:\Windows\System32\inetsrv\appcmd.exe reset config -section:system.applicationHost/applicationPools
[06/23/2014 20:47:57] Launching command C:\Windows\System32\inetsrv\appcmd.exe, with params C:\Windows\System32\inetsrv\appcmd.exe reset config -section:system.applicationHost/applicationPools
[06/23/2014 20:47:58] LaunchCommand Succeeded
[06/23/2014 20:47:58] Success!

After several of those, and before several more, this was logged:


[06/23/2014 20:47:59] [ ***** IIS 7.0 Component Based Setup ***** ]
[06/23/2014 20:47:59] "C:\Windows\System32\inetsrv\iissetup.exe" /install SharedLibraries
[06/23/2014 20:48:00] Successfully added IIS_IUSRS ACE to DACL at %ProgramData%\Microsoft\Windows\WER\ReportQueue.
[06/23/2014 20:48:00] Created NetFrameworkConfigurationKey key containter
[06/23/2014 20:48:00] Created NetFrameworkConfigurationKey user key
[06/23/2014 20:48:00] Set ACLs on NetFrameworkConfigurationKey
[06/23/2014 20:48:00] Created iisWasKey key container
[06/23/2014 20:48:00] Created iisWasKey user key
[06/23/2014 20:48:00] Created iisConfigurationKey key container
[06/23/2014 20:48:00] Created iisConfigurationKey user key
[06/23/2014 20:48:00] Set ACLs on iisConfigurationKey
[06/23/2014 20:48:00] iisConfigurationKey already exists
[06/23/2014 20:48:00] Created AesProvider
[06/23/2014 20:48:00] Created IISWASOnlyAesProvider
[06/23/2014 20:48:00] Install of component SharedLibraries succeeded!
[06/23/2014 20:48:00] Success!
[06/23/2014 20:48:00] [ End of IIS 7.0 Component Based Setup ]

And the logs would evolve a little bit here and there, but one thing that was repeated some from last night's attempt was this:


[02/17/2015 21:12:29] [ ***** IIS 7.0 Component Based Setup ***** ]
[02/17/2015 21:12:29] "C:\Windows\WinSxS\amd64_microsoft-windows-iis-sharedlibraries_31bf3856ad364e35_6.1.7601.17514_none_6f0f7833cb71e18d\iissetup.exe" /launch_uninstall C:\Windows\System32\inetsrv\appcmd.exe clear config -section:system.webServer/security/applicationDependencies
[02/17/2015 21:12:29] < WARNING! > Failed to detect if config redirection is enabled. result=0x80070032.Assuming config is not redirected and continuing.
[02/17/2015 21:12:29] Launching command C:\Windows\System32\inetsrv\appcmd.exe, with params C:\Windows\System32\inetsrv\appcmd.exe clear config -section:system.webServer/security/applicationDependencies
[02/17/2015 21:12:29] Ignoring acceptable LaunchCommand failure 0x80070002
[02/17/2015 21:12:29] Success!
[02/17/2015 21:12:29] [ End of IIS 7.0 Component Based Setup ]

And finally we end with a few things like this (possibly from me trying to clean some things out for a few minutes at the very end last night):


[02/17/2015 21:12:30] [ ***** IIS 7.0 Component Based Setup ***** ]
[02/17/2015 21:12:30] "C:\Windows\WinSxS\amd64_microsoft-windows-iis-sharedlibraries_31bf3856ad364e35_6.1.7601.17514_none_6f0f7833cb71e18d\iissetup.exe" /uninstall SharedLibraries
[02/17/2015 21:12:30] < WARNING! > Failed to detect if config redirection is enabled. result=0x80070032.Assuming config is not redirected and continuing.
[02/17/2015 21:12:30] Uninstall of component SharedLibraries succeeded!
[02/17/2015 21:12:30] Success!
[02/17/2015 21:12:30] [ End of IIS 7.0 Component Based Setup ]

I did check on the 0x80070002 error, but researching that just led further down the rabbit hole. What else is liable to be holding IIS (and full .NET 3.5) back from being able to install? Thanks!


EDIT


This is a link to the CBS logs, as recommened in the comments:


https://onedrive.live.com/redir?resid=5D4A777E3F287EA8!109&authkey=!ABZ6iUqUubMhaA4&ithint=file%2czip


Answer



Credit really goes to magicandre1981.


Essentially this was due to the ZeroAccess rootkit, and using ESETSirefefCleaner and RogueKiller - at least RogueKiller - was pretty much able to either eliminate it or at least get it out of the way enough to install IIS.




I don't remember all the steps very clearly. At one point, magicandre1981 suggested posting the logs out of the CBS folder, and he was able to spot a file not found exception. He suggested using sfc /scannow.


Every time I ran it though, it kept failing at somewhere around 65%. CHKDSK basically didn't help at all. Running sfc /scannow in Safe Mode, and maybe a couple of other things as well, didn't do much good either.


Later though, I tried using sfc /verifyonly, and it said stuff was corrupted. Looking in the CBS log afterward, there were four Error log lines grouped right there together, the first one saying things like (F) STATUS_FILE_IS_A_DIRECTORY and "\SystemRoot\WinSxS\amd64_security-malware-windows-defender-events_31bf3856ad36‌​4e35_6.1.7600.16385_none_118cf1dcd54a3dea\MpEvMsg.dll".


Looking it up on the Internet, it looked like apparently ZeroAccess is known to warp things around that dll so that its path will reference the directory \Windows\system32\config, not the dll. There were people talking about this at http://www.sevenforums.com/system-security/290614-sfc-warning.html, and it seemed to be helpful, but the main suggestion didn't work completely in my particular case.


I did use ESETSirefefCleaner though, and the dll problem seemed to persist. I tried several times and played with it for a little bit, but even if it helped the problem some, it didn't take it away entirely. Apparently other people though have been able to fix the dll's problem entirely with that program, so I guess it really depends on each person's situation.


A longer suggestion I saw somewhere involved running something like five or six different programs to get rid of this thing, including ESETSirefefCleaner and RogueKiller, but also Combofix. But going from other sources, apparently Combofix is pretty dangerous to use, and for other reasons as well, I just decided to run RogueKiller and see what happened. Sure enough, after using ESET and RogueKiller, sfc /verifyonly and sfc /scannow were both able to complete just fine and without detecting any problems, the dll looked normal, and IIS was able to be installed.


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...