Friday, May 31, 2019

windows - Add a directory and all subdirectories to the PATH variable with a single entry

I've got a directory in my home folder in which I place command-line software (CMD_Software). I put each piece of software in its own directory within CMD_Software in order to avoid clutter.


I would like to make a single entry in my PATH variable that will allow access to CMD_Software and all directories it contains from the command line.


I tried C:\Users\myuser\CMD_Software\* but that did nothing. That's the point at which I ran out of ideas.


Please note that I'm not trying to set a new path while in the terminal, I'm trying to set a new path in the "Environment Variables" available on the "Advanced" tab of System Properties.

autohotkey help-#inputlevel but not overwrite key combination?

[help] #inputlevel but not overwrite key combination ?


i have 2 ahk script ,both remap "k" ,but script 1 has "scrolllock & k"


script1.ahk


k::msgbox script1
scrolllock & k::click

script2.ahk


k::msgbox script2

i want this : when running both script at the same time , if i press k ,
it will execute the script2.ahk (which show "msgbox script2" ) ,


in other way, script2 overwrite script1


so i put #inputlevel2 in script2.ahk


it now looks like this


script1.ahk


k::msgbox script1
scrolllock & k::click

script2.ahk


#inputlevel2
k::msgbox script2

but now if i press "scrolllock & k" , it will not do the click (function of script1)
but it show msgbox (script2)
i guess because "k" has been overwrited by script2
and "scrolllock & k" no longer be recognized


i found a way to make scrolllock & k work, when i reload script1 ,and press scrolllock & k ,it will work


but if i reload script2 , i will have to reload script1 again to make that key combination work


In other way, my question is
Is it possible to overwrite "k" of script2 to "k" of script1 but still do function like "scrolllock & k" of script1 ?


Thanks

operating systems - Maximum virtual memory and physical memory

A Intel 64-bit x86 CPU,four-level hierarchical page table.Each for levels of page table can contain 512 entries, and the page size is 4KB. What's the maximum size for virtual memory and physical memory?


I think the maximum virtual memory should be 2^48 in that 9 bits for referencing the position of page table and there are 4 page tables. Thus 4*9+12=48(4KB offset). But I am not sure how to calculate the maximum physical memory. Or it just cannot tell from this information?

Thursday, May 30, 2019

windows 7 - Partially Charge Acer Laptop to Increase battery life


I own an Acer Aspire 5755G on Windows 7 x64 and I recently read that keeping your battery charged at 100% the whole time degrades battery life.


The problem is, I always keep it in my laptop but never really use the Battery since the laptop (or should I say notebook) is rather big and I usually use it on my desk with the power cord. Although I remove the battery when gaming, I like to have it on most of the time as a UPS in case the power goes off.


Is there any utility that will keep the battery charged until, say, 20-60%?


Answer



"I recently read that keeping your battery charged at 100% the whole time degrades battery life."


This is a myth.


It’s fine to leave your laptop plugged in at your desk when you’re using it, as the laptop won’t “overcharge” the battery — it will stop charging when it reaches capacity. However, just as you shouldn’t store your laptop’s battery at full capacity in a closet, you shouldn’t leave your laptop plugged in for months on end with the battery at full capacity. Allow your laptop’s battery to occasionally discharge somewhat before charging it back up — that will keep the electrons flowing and keep the battery from losing capacity.


Battery University says that “the worst situation is keeping a fully charged battery at elevated temperatures.” If your laptop produces a lot of heat, removing it might be a good idea. If you have a fairly cool laptop that you occasionally let discharge a reasonable amount, leaving it plugged in — even for days on end — shouldn’t be a problem. If your laptop gets extremely hot, you may want to remove the battery.


Read more at "Debunking Battery Life Myths for Mobile Phones, Tablets, and Laptops"


Can Low Memory on a Computer Cause in More CPU Usage?

From my last question, another question emerged in my mind. As mentioned there, having low memory causes the operating system to use page-file in Windows, also having low memory causes services like superfetch and... to work more. So my question is that:



Can low memory cause more CPU usage (even slightly more) due to need for memory management in low resource condition? and if the answer is yes, is it Sensible?

Windows 7 Update freezes - what to do?


Yesterday I shutdown my notebook, and Windows 7 Ultimate started to install automatic updates. After one hour, I noticed that the update was still running. I thought OK, I shall go to sleep and let it run. In the morning it was still running.


Thus, I thought it had crashed, forced a shutdown of the notebook and then restarted it. With the same effect that the notebook is "freezing" at "Install Update 1 of 5".


It does not look like it has crashed. The progress wheel is still moving. But it does not make any progress...


Would appreciate any help!


Edit:
OK, I was able to log-in into safe mode. This way I passed the install update screen. I do not want to generally disable updates, what can I do to not install the last update, which is creating troube. Or how can I find out whats the problem with the last update?


Answer



Starting in safe mode and installing the updates manually has solved the problem.


windows - Batch file to prompt UAC like Run as administrator

How can I get a batch file to prompt for UAC on Windows Vista to Windows 8 to run with Administrator rights - that is - other than right clicking on the batch file and hitting "Run as Administrator"?

hard drive - Can I modify the SMART value of Raw Read Error Rate Worst Value to be greater than 1?


I have a HP Pavilion g6 2136tx Laptop which was functioning correctly until one day Windows 7 Ultimate x64 couldn't boot up. Tried System Restore and Windows Startup Repair tool, both of which failed. Finally removed the HDD and connected it as external to another laptop. Tried many HDD Scan SW all of which could diagnose only 1 problem:


Raw Read Error Rate:
Threshold Value: 51, Current Value: 1, Worst Value: 1
All the softwares predicted imminent drive failure and that all data should be backed up.


Hard Drive Model: Samsung Spinpoint ST500LM012 500GB manufactured by Seagate, 5400RPM
The Date of manufacture is May 2012 and the drive has never failed ever. I removed all partitions and also did a deep format of the entire disk, but the error is still there.



  1. What are the options that I have except replacing the disk?

  2. Can I modify the SMART value of Raw Read Error Rate Worst Value to be greater than 1 as I saw many manufacturers allow it be greater than 1? Is it editable and if yes, how to do it?


Answer



The SMART counters measure the physical/electrical performance of the disk. They're supposed to alert you when the disk is about to experience a failure (or, in your case, already has).



  1. You ask if there anything you can do except replace the disk. No, it's a hardware failure. You could replace whatever components have failed (best case that'd mean soldering new components to the control board on the bottom of the drive), but that's not really practical.


  2. You ask if you can modify the SMART values. They're not intended to be edited, and doing so wouldn't be useful. The value is just an indicator, changing it won't make it work any better. You could in theory upload a new firmware to the drive to report a lower value (again, in theory, this is not an easy approach). Some drives also have serial (as in "serial port") interfaces, though normally soldering is required, and you might be able to manipulate the values through that interface.



Seagate purchased Samsung's hard drive business, so you can check if its still under warranty with the Seagate Warranty Validation page.


How to change the icon associated with a particular file format (and only that file format) on Windows 10?

Currently I have associated various text file formats (.md, .txt, .taskpaper) to be opened by sublime text. This results in ALL of them being assigned the SAME icon file, namely the sublime text icon.




How can I get each file format to have its own unique icon file (supplied by me)?





Change the icon associated with one of the file types using FileManType by Nirsoft. The Result: it changes the icon for ALL of the file types that sublime opens (not what I wanted)





Now I tried to get clever...





  • (1) created a shortcut of the sublime exe for each file format

  • (2) gave each shortcut its own unique icon, which the shortcut accepted

  • (3) set the program that (say) .md files opened with to its own special shortcut etc...



This time it just ignored the icons contained in the shortcuts and remained with the sublime icon



Any ideas?

Wednesday, May 29, 2019

batch file - Limit the installation patches from WSUS for Windows Update

We have multiple WSUS Servers, but for the example we will only be focused on one WSUS server.


Here is the situation :



  • I have multiple Windows Update patches to be downloaded and installed on almost 1000 machines.

  • On certain machines there are more than 250 Windows Update patches that haven't been downloaded or installed.


  • if we push (download and install) them in a row (on a single machines) we have some trouble sometimes and all the patches are uninstalled, so we need to redownload all the patches and reinstall these 30 patches by 30 patches to make sure that they are being installed correctly.



I wanted to create a .bat or .vbs script (I need to execute it on Windows XP machines too) to stop the installation process when the Windows Update is at 30 patches, because actually I'm doing this manually and I can't find what I was looking for.


Manually stop installation:


manually stop installation

Tuesday, May 28, 2019

windows - Syntax for success code of "Where" command

What is the syntax to get a success code when running the "Where" command? I need that to end a loop.



And what is the syntax to get the directory of the found file?



This command:



WHERE /r "C:\Dir\Dir2 FindMe.txt"




correctly shows the file in the command window:



C:\Dir1\Dir2\Dir3\FindMe.txt



But now what do I do?
Please be kind, I am less than a novice.



EDIT:
My question is similar to https://stackoverflow.com/questions/7562506, but in my case the file I am looking for is not in the direct path but up, over, and then down. Taking the example given, and starting at the same directory, my file could be in C:\Temp\Dir1\Dir2\Dir3**\Dir14\Dir15**\FindMe.txt. Meaning I need to go up to Dir3, there find my file with the WHERE command and stop my loop.




EDIT 2: I stripped everything off I could. Make a txt file "FindMe.txt" somewhere, put this code snipped as a .cmd someplace else and then drag another .txt file onto the .cmd file. With any luck it should stop with the directory of FindMe.txt as answer. What I need help with is the pseudo code:



@ECHO OFF

SET "cmdPath=%~dp0"
SET "cmdPath=%cmdPath:~0,-1%" ::without back slash
SET "searchPath=%cmdPath%" ::start search here

:loop

IF EXIST "%searchPath%\FindMe.txt" (
set "txtPath=%searchPath%
ECHO txtPath%searchPath%\FindMe.txt
GOTO :EOF
)
IF "%searchPath:~1%" == ":" (
ECHO FindMe.txt not found.
pause
GOTO :EOF
)

echo searchPath=%searchPath%
rem run: WHERE /r "%searchPath%" /q FindMe.txt
rem if successful (found) (
rem run: WHERE /r "%searchPath%" FindMe.txt
rem just keep the path and rename to txtPath
rem goto :eof
CALL :getPath "%searchPath%"
GOTO loop
:end


:getPath
SET "searchPath=%~dp1"
SET "searchPath=%searchPath:~0,-1%"
:end
:eof

Unable to upgrade Windows 10 edition from Home to Pro


I have a Lenovo laptop which upgraded from Windows 8.1 Home to Windows 10 Home.


I have a (legitimate) Windows 10 Pro key which I ran through the "Change Product Key" wizard.


After a reboot I get an error which states "We couldn't upgrade your edition" and asks me to try again or seek help from my system administrator (me!) or Microsoft.


There is nothing in the event logs except Info entries in the Setup log stating it failed to change the installed state to Pro Edition with a hex error code (I don't have access to the laptop right now, I will update later with the full log details)


Googling the hex error code led me to a Windows 7 KB Article regarding Windows Update failure due to locked files. The article stepped through using MSCONFIG to perform a clean boot which I did, but still got the error.


Any pointers on how to upgrade this laptop? Or will I have to get the sledgehammer out and do a clean install?


Answer



I had exactly this problem.


I solved it buy obtaining a new Windows 10 Home key from msdn and then changing the product key (also via the settings-> Activation window). After doing this I then repeating the attempt to update to Pro (with legit key) via the store.


My guess is that whatever I had as a key was not eligable for the upgrade combination i was trying via the store.


Is there a rule to join lines based on a rule notepad++

I have a notepad++ file containing tens of thousands of lines.



Each entry in my import program must have each field separated by a delimiter. When bringing the information over into notepad++ I have an issue where it detects carriage returns from excel and places them into the text which the import program won't read.




I am positive that each row has fields separated by commas, these fields have no character limit, and the only field that is a constant is the first field (date).



Each line in notepad++ needs to look like this



Date,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z,AA,AB,AC,AD,AE,AF



However, something in the copy paste over is causing these fields to insert carriage returns



I.e. Date, A,




B, C, D,



E, F,
G,
H, I, J etc.



Unfortunately there is not a line that is always affected in each case.



Is there anyway, rule, that will draw each of these up so that all lines that start with a date will be joined with the lines below it until there occurs another date?

partitioning - Copy speed to usb flash drive very slow when partitioned as NTFS

So I have a 16GB Corsair Flash Voyager USB flash drive. I am on a fairly new install of Windows 7 Ultimate, Service Pack 1.


I use the flash drive for one thing, watching things on my TV. I will copy both TV Episodes and Movies onto it.


When I use it for TV Episodes, having it formatted as a FAT32 partition is fine, as almost all shows are under 4gb's. When I copy over to it, it all works without issue, I can multi-task, doing 4 things at once, no problem.
When I use it for watching Movies, I need to have it formatted as an NTFS partition, as almost all 1080p movies are over 4gb's. This is where the problems arise.
When I first start the transfer, I get amazing speeds, way more than with it being a FAT32, but after a short while, my computer starts getting slow, things like my internet browser start to hang, navigating my documents, or any other directory for that matter, will also take forever to load. Basically my computer becomes unusable while the files are transferring.
It also seems to take a long time to actually finish copying. I haven't actually compared times, since the movies are longer, they should take longer, but it seems like it takes a lot longer (30-40 minutes for a 9GB movie, vs 5-10 for 3 or 4 x 1 to 1.5GB tv shows...)


TL:DR Any idea why I would be seeing a complete system slowdown when copying over to an NTFS partitioned flash drive, when there is no issue at all with the FAT32 partitioned drive?

windows 7 - Remove software entirely from system


What way can I remove a software entirely from my Windows OS?



Most Games and Programs leave a lot of trash after uninstall from Program Files and this really makes a problem since I often have to search for this trash and remove it personally. I never know what files a software installed into the system and where to search for them after uninstall but unfortunately some files are left there unneeded and take up space and litter the system.


3rd party software can be used if it's not too much of a problem. However, better an in-system non-3rd-party solution if such exists.

Monday, May 27, 2019

Windows 10 won't boot after moving EFI partition

On dualboot, I had two EFI partitions on two drives.
One drive with EFI partition for GNU/Linux, second drive and EFI partition for Windows.



I moved Windows boot files from second EFI partition to first one.



Then, I deleted the second EFI partition.

Windows starts booting, and ends up in BSOD.




Error: IO1 INITIALIZATION FAILED




I tried to "recover boot" from Windows installation media but it does not make it boot correctly.



What else can I do besides reinstalling?




Thanks

linux - mkfs - The device apparently does not exist; did you specify it correctly?

I used fdisk /dev/sda to create an sda6 partition. Now I want to format it using the mkfs.ext4 command. I am using CentOS 6.5 Linux distro. But when I run this command I get following error


mkfs.ext4
Could not stat /dev/sda6 --- No such file or directory
The device apparently does not exist; did you specify it correctly?

I am new to Linux and will appreciate any and all help. I have tried this with and without "sudo" and in both cases I get the same result.


[root@server1 ~]# sudo fdisk /dev/sda
WARNING: DOS-compatible mode is deprecated. It's strongly recommended to
switch off the mode (command 'c') and change display units to
sectors (command 'u').
Command (m for help): n
First cylinder (1530-3264, default 1530): 2042
Last cylinder, +cylinders or +size{K,M,G} (2042-3264, default 3264): +50MB
Command (m for help): p
Disk /dev/sda: 26.8 GB, 26843545600 bytes
255 heads, 63 sectors/track, 3263 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00002158
Device Boot Start End Blocks Id System
/dev/sda1 * 1 511 4096000 83 Linux
Partition 1 does not end on cylinder boundary.
/dev/sda2 511 1020 4096000 82 Linux swap / Solaris
Partition 2 does not end on cylinder boundary.
/dev/sda3 1020 1530 4096000 83 Linux
/dev/sda4 1530 3264 13925376 5 Extended
/dev/sda5 1531 2041 4096000 83 Linux
/dev/sda6 2042 2048 56227+ 83 Linux
Command (m for help): w
The partition table has been altered!
Calling ioctl() to re-read partition table.
WARNING: Re-reading the partition table failed with error 16: Device or resource busy.
The kernel still uses the old table. The new table will be used at
the next reboot or after you run partprobe(8) or kpartx(8)
Syncing disks.
[root@server1 ~]# mkfs.ext4 /dev/sda6
mke2fs 1.41.12 (17-May-2010)
Could not stat /dev/sda6 --- No such file or directory
The device apparently does not exist; did you specify it correctly?

After restart - >


Command (m for help): p


Disk /dev/sda: 26.8 GB, 26843545600 bytes
255 heads, 63 sectors/track, 3263 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00002158


Device Boot Start End Blocks Id System
/dev/sda1 * 1 511 4096000 83 Linux
Partition 1 does not end on cylinder boundary.
/dev/sda2 511 1020 4096000 82 Linux swap / Solaris
Partition 2 does not end on cylinder boundary.
/dev/sda3 1020 1530 4096000 83 Linux
/dev/sda4 1530 3264 13925376 5 Extended
/dev/sda5 1531 2041 4096000 83 Linux
/dev/sda6 2042 2048 56227+ 83 Linux


Command (m for help): w
The partition table has been altered!


Calling ioctl() to re-read partition table.


WARNING: Re-reading the partition table failed with error 16: Device or resource busy.
The kernel still uses the old table. The new table will be used at
the next reboot or after you run partprobe(8) or kpartx(8)
Syncing disks.


[root@server1 ~]# partx /dev/sda


[root@server1 ~]# mkfs.ext4 /dev/sda6


mke2fs 1.41.12 (17-May-2010)


/dev/sda6 is apparently in use by the system; will not make a filesystem here!


[root@server1 ~]#


IMPORTANT
i noticed that fdisk /dev/sda - n - 6 - w, partx, mkfs.ext4 /dev/sda6 worked on red hat 6.5 rhel i have but is not working for CentOS 6.5. i don't know why.
Thanks

Excel Conditional formatting over multiple rows

I have an Excel spreadsheet with 480 columns and 1451 rows. I need to find the highest value in each row. I understand how to use the conditional formatting tool to find the highest value within a range. However, I don't understand how to apply that same rule to each row. As you can imagine, it's a little impractical to create a new rule for each of the 1451 rows. Likewise, I can't state the range as the worksheet as I'm looking for one value per row. I can't highlight the column, as the highest value is likely to be in different columns in each row.




On another post, someone had suggested dragging the corner of the selection in much the same way as you would to "fill" an area, obviously, changing the fill settings to formatting only. However, when I try that, all it seems to do is delete my conditional formatting. What am I doing wrong?

mbr - How to fix a partition detected as RAW, when Chkdsk correctly reads it as NTFS?


My external HDD suddenly started reporting as "931.51 GB RAW (Primary)" in Windows disk management.


I tried using DiskInternals Partition Recovery, which indeed reported the drive being only seen as RAW, easily found a partition at sector 2048, spanning the full size of the disk, detected an NTFS system on it... and then it completely failed to find any files.


DISKPART sees the partition as RAW.


ChkDsk H:, however, DOES detect it as NTFS and checks the filesystem (finding indexing errors in file descriptor 5, which is root folder ".", so thus far I only ran it in read-only mode out of caution).


MiniTool, another recovery program, immediately noticed the disk, with a correct volume label and explorable contents, even without running a recovery pass, but the free version doesn't let me copy files.


Finally, TestDisk is able to read the disk's contents without any problems, without running a specialized recovery pass - it accesses the NTFS system as if everything was fine.


Reading the disk in hex mode, I see the MBR area is completely empty (all zeroes) except for a serial number and one, seemingly correct, partition entry:


0000000000: 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00
....
00000001A0: 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00
00000001B0: 00 00 00 00 00 00 00 00 │ 39 72 8E 13 00 00 00 20 <- serial, part.type
00000001C0: 21 00 07 FE FF FF 00 08 │ 00 00 AC 65 70 74 00 00 <- partition 1
00000001D0: 00 00 00 00 00 00 00 00 │ 00 00 00 00 00 00 00 00
00000001E0: 00 00 00 00 00 00 00 00 │ 00 00 00 00 00 00 00 00
00000001F0: 00 00 00 00 00 00 00 00 │ 00 00 00 00 00 00 55 AA <- magic
....
00000FFFF0: 00 00 00 00 00 00 00 00 │ 00 00 00 00 00 00 00 00
0000100000: EB 52 90 4E 54 46 53 20 │ 20 20 20 00 02 08 00 00 <- NTFS

The partition is of type 07, so it's NTFS, starts at sector 2048, and actually the filesystem is still there - at offset 0x100000 (2048*512 sector size) a nice NTFS system starts. So it seems all to be there.


From the looks of it, I'd expect Windows to see the disk as an NTFS partition and maybe require a filesystem check - not see it as not formatted at all.


Does that mean that the disk is readable and fine, but somehow Windows can't access it? Or did Windows cache the MBR (as I have not rebooted the machine yet)? Or maybe I don't even need an MBR, since this is not a bootable drive, merely an external USB storage unit?


What should I do to make Windows recognize the NTFS partition, if it's all there, intact and apparently healthy enough to be read without sector-by-sector recovery passes? Should I let chkdsk H: /f run and maybe try to fix it? (I haven't tried yet, as I heard chkdsk destroys data in some fringe cases)


(This is not a generic "how do I recover my data?" question, recovery wasn't that big of an issue in this case, as there was no unique data on that disk - it's more of a "what's missing, why doesn't it work, can it be fixed instead of recovered?" question. Most "RAW partition" trouble reports involve CHKDSK refusing to operate on a RAW partition; here, CHKDSK works fine, oddly enough.)


Answer



In the end, after I used TestDisk to copy all the important files off the disk, I finally risked running chkdsk /f and it didn't detect any problems, but apparently removed the "requires checking" flag set after a careless disconnection, and so afterwards the disk was perfectly fine.


I felt a bit silly afterwards, having gone all PhD on the disk, when all it needed was a routine check, but maybe the disk-salvage tools should be able to recognize the "requires checking" flag...


Sunday, May 26, 2019

windows 7 - Create a bootable UEFI USB

How do I create a bootable USB with Windows 7 SP1 64bit using OS X?


I need to setup a fresh new ASUS laptop, the only thing I have is – Macbook Pro.


What I have:



  1. Fresh new ASUS laptop with FreeDOS,

  2. An ISO image of Windows 7 SP1 64bit,

  3. An 8Gb USB flash drive,

  4. A MacBook Pro running OS X 10.9.5.


What I know so far:



  1. Creating a bootable USB drive using BootCamp is not working for me. After inserting the stick to ASUS laptop, it simply won't start the Windows setup process.

  2. There's a "UEFI" next to USB bootable option in ASUS's BIOS. This suggests I need to somehow create a UEFI-compatible bootable USB. In turn, "UEFI-compatibility" means checking 3 things which I have double-checked.


I am familiar with Terminal (being a web developer myself), so any command line tricks would be more than appreciated.


P.S. Googling isn't helping much, which is strange. This suggests I'm not googling the right keywords...

Batch script to mass rename by modify date

I'm trying to make a batch script to mass rename files by modify date and time of each file. I'm new at this and searching since this morning and nothing lead me in the good way. SHould I use xcopy, robocopy, powershell ? Is there a place for batch scripting with examples ?



I'm also wondering if It's possible to make a drag&drop script (I take files with my mouse and drop them on the script to be processed). It works when I drag&drop a single file on a .bat script but I don't know for multiple files.



Thank you for your help.




NB : I can't use mass renamer softwares because I'll use this script very often and I would like to automate the processing.

Understanding the wmic cpu/os output

I have 2 questions -




  1. I have several computers on my network. When I use "wmic cpu" some of them return single line data output and others two identical lines. Does it (necessarly) mean those computers have a single or double physical processors?


  2. When calculating memory "loadage" of a computer, which parameters should I use - "Physicalmemory" or "VirtualMemory"?


How can I use a batch shortcut to open multiple Windows Explorer folders, and a Notepad file?


I've recently built a computer with an SSD in it (my first) and am in the process of moving a select few of my Steam games to the SSD and symbolically linking them to where they're supposed to be on the main (mechanical) hard drive so that Steam doesn't throw a fit and I get maximum performance. To this end, I'm finding myself repeatedly navigating to both target folders to move the relevant files and opening a specific Notepad file to enter the relevant paths into a template I've got set up that I paste into the Windows command prompt to create the symlink. This is annoying.


I've read up a little bit on batch shortcuts, and have a basic understanding on how to use one to open programs and files. However, I'm finding a lot of confusing suggestions on how to use batch shortcuts to open specific folders in Windows Explorer, and none of them deal with opening multiple folders at once. Any assistance on writing the shortcut would be greatly appreciated. Thank you for your time.


Answer



Start.exe is your friend. :)



Starts a separate window to run a specified program or command.



Try something like this in a batch file:


@echo off
start explorer c:\
start explorer c:\Windows
start explorer "g:\Path With Spaces"
start notepad.exe g:\filename.txt

windows 7 - Computer suddently slow after a blue screen


My computer was fine until I had a Blue Screen 0x0000007A.


Right after that happen, I did a full recovery backup with the Acer tool that they give with the laptop cause I wanted to reformat for a long time. Now the drivers are all up to date and Windows 7 x64 up to date.


But since the blue screen, my computer is so slow, it takes like 30 minutes to reboot. And it keeps freezing like 20 secs randomly(not the mouse, only the program stops responding).


I thought it was the RAM, but I did run memtest86 and I had no error.
What it could be? The HDD?


The weird thing is that it takes so much time to boot and that it's not slow when when it's fully started


The laptop is an Acer Aspire 8940g.


Answer



This makes me think that your HDD may be bad. Download a tool such as SpeedFan and check the S.M.A.R.T. data.


Can't enable Windows Hello - Some settings are managed by your organization


I did a clean install of Windows 10 Anniversary Edition. Now I can't enable Windows Hello with my domain joined Surface Pro 4, logged in as an AD user. When I log in with my Msft account, I can turn Windows Hello on, though.


I tried "Some settings are managed by your organization" while not on domain? (increasing telemetry via settings app) and also this: resetting telemetry via gp.


This shows that this problem is different than the others here. This is also in fact domain joined, not like the most other questions here.


This is what the settings look like;
enter image description here


With the old version of Windows 10 the same device could enable Windows Hello while domain joined with the domain user. That's why I rule out GPO as the source of the problem. GPO even explicitly allows Biometrics for domain users. What can I do?


Windows 10 Professional, Cortana is enabled. No Insiders Edition. I have administrative access to the domain.


Answer



I found the solution. The reason is that Windows Hello is managed differently on domain joined computers, starting with the anniversary update.
To get it to work you have to follow these steps:


1) Setup a Group Policy Central Store (you should already have that)


2) Get Windows 10 Anniversary Update Group Policy Templates. You can do so by copying your files from PolicyDefinitions (in windir on a Win10 Anniversary Update machine) into the PolicyDefinitions of the central store. You might copy those files first to a file share, because of permissions your regular user should not have on the central store.


3) Setup a new GPO or add to an existing the following settings to enable Windows Hello:



  • Computer Configuration/Policies/Administrative Templates


.../Windows Components/Windows Hello For Business/ Use biometrics => Enabled


.../Windows Components/Windows Hello for Business/ Use a hardware security device => Enabled (if you want to use TPM instead of key or certificate based activation for Windows Hello). Note that in general all business computers should have TPM


.../System/Logon/ Turn on convenience PIN sign-in => Enabled (This is the key. This enables PIN sign-in which in turn will enable Hello, together with the other settings.)


.../Windows Components/Biometrics/ Allow domain users to log on using biometrics => Enabled (I think this is enabled by default, but being explicit makes GP management a lot easier.)


You will find more optional configuration possibilities in System/Logon and Windows Components/Biometrics and Windows Components/Windows Hello for Business.


You will find more background here:
https://blogs.technet.microsoft.com/ash/2016/08/13/changes-to-convenience-pin-and-thus-windows-hello-behaviour-in-windows-10-version-1607/


and here


https://technet.microsoft.com/en-us/itpro/windows/keep-secure/implement-microsoft-passport-in-your-organization


Most important excerpt:



Beginning in version 1607, Windows Hello as a convenience PIN is disabled by default on all domain-joined computers. To enable a
convenience PIN for Windows 10, version 1607, enable the Group Policy
setting Turn on convenience PIN sign-in. Use Windows Hello for
Business policy settings to manage PINs for Windows Hello for
Business.



If you want to use key or certificate based Windows Hello you can follow the guides in the links. Don't get confused though. You can still use regular TPM for normal Windows Hello.


Saturday, May 25, 2019

windows 7 - Don't have permission to delete folder

I recently installed an SSD into my computer and put a fresh install of Win 7 on it. I was going through the folders of my old HDD to try and free up some space, but it wouldn't let me delete the Windows folder. I even tried claiming ownership of it as per this webpage, but it still couldn't be deleted.

windows 10 - Why do I have to hit tab twice to Alt+Tab away from Microsoft Excel?


In other apps, when I hit Alt+Tab it switches to the previous app. Before I actually release the Alt key I can see a list of windows as well and the previous windows is selected. But in Excel 2010 (Professional Plus, if that makes any difference) hitting Alt+Tab and not releasing Alt shows Excel still selected, and in any case I have to hit Tab an extra time to switch to the previous application. (Alt+Tab+Tab) Furthermore, the iconized view showing my spreadsheet only takes up about 1/3 of the height available.


Needless to say this throws off my workflow because switching between Excel and another application is inconsistent, requiring an extra keystroke to switch away but not to switch back. Is this a bug in Excel, or is there some option that I need to change to get the default behavior? What's going on here?


Answer



In Excel 2010 and below,



  • Go to "Excel Options" → "Advanced" → "Display",

  • Uncheck "Show all windows in the Taskbar",

  • Click "OK" to close the Options window.


Now Alt+Tab should work fine again.


spioter says



[With] the [above] solution …, you will no longer be able
to Alt+Tab between Excel documents [workbooks] –
Alt+Tab will only "see" the last active Excel doc. 
Work-around: with Excel active,
Ctrl+Tab will switch between documents.



To revert this to the old behavior,
simply go back and check the option again.




This option does not exist in Excel 2013. 
teylyn says



In the 2013 version, each Excel file shows in its own window. 
This is one major change to previous versions. 
Each window has its own ribbon
and it is no longer possible to show several Excel files in the same window.



Friday, May 24, 2019

windows - Scheduled Task that does not exist is waking my PC up on a regular basis

So lately I've been having a super annoying issue with my Windows 10 install, it will wake itself up randomly, often in the middle of the night. When running 'powercfg -lastwake' in a command prompt I'm given the reason.


C:\Users\duopr>powercfg -lastwake
Wake History Count - 1
Wake History [0]
Wake Source Count - 1
Wake Source [0]
Type: Wake Timer
Owner: [SERVICE] \Device\HarddiskVolume4\Windows\System32\svchost.exe (SystemEventsBroker)
Owner Supplied Reason: Windows will execute 'NT TASK\Microsoft\Windows\UpdateOrchestrator\Universal Orchestrator Start' scheduled task that requested waking the computer.

But this doesn't help at all, as when I check my scheduled task list, this task does not exist..


C:\Windows\System32\Tasks\Microsoft\Windows\UpdateOrchestrator>dir /A
Volume in drive C has no label.
Volume Serial Number is EC61-2D6A
Directory of C:\Windows\System32\Tasks\Microsoft\Windows\UpdateOrchestrator
07/04/2019 11:39 PM
.
07/04/2019 11:39 PM
..
07/04/2019 10:51 AM 3,356 Backup Scan
07/04/2019 09:15 PM 2,664 Maintenance Install
23/03/2019 05:30 PM 2,616 Reboot
06/04/2019 11:46 PM 2,822 Reboot_AC
06/04/2019 11:46 PM 2,778 Reboot_Battery
07/04/2019 11:44 PM 5,872 Schedule Scan
23/03/2019 05:30 PM 4,354 Schedule Scan Static Task
23/03/2019 05:30 PM 3,056 UpdateModelTask
23/03/2019 05:30 PM 2,510 USO_Broker_Display
23/03/2019 05:30 PM 3,282 USO_UxBroker
10 File(s) 33,310 bytes
2 Dir(s) 25,988,657,152 bytes free

I also checked this was the case in the normal Task Scheduler GUI. It isn't there. Has anyone experienced this ghost before? If so, how do I banish it so I can stop waking up to the eye searing white of my lock screen?

cpu - Segmentation fault while installing any linux distro (or windows)

I'm need of a little help from you.


I'm having troubles while installing any distribution of Linux (or even Windows) in a computer .. I never had troubles installing an operating system in this computer (I assembled this computer while I was in college.. circa year 2004)



  • Motherboard: PC Chips m863g v. 7

  • Processor: AMD Sempron 2400+ (1.6 Ghz)

  • RAM: 1 GB

  • GPU: Nvidia GeForce FX 5500 (256 MB RAM)


Originally, to make my motherboard to detect my Processor as an AMD Sempron 2400+ I had to set the CPU frequency at 166 Mhz. It worked OK this way for several years.


Some months before, I started to have some troubles with the computer, as I had Windows on it. Since then, I have tried to install Gentoo, Debian, Ubuntu and some other Linux distros with no success.


When I try to install any Linux distribution, I get an Segmentation fault error just after the boot screen / splash screen of the installation media. .


I tried to run MemTest images and it completes successfully every time (so I discarded the RAM module as the source of the problem)


The funny thing is that, if I reduce the CPU frequency to 133 Mhz, the errors don't appear anymore, and let me install the operating system (despite the resulting installation is quite slow).


So my questions are:



  • Why would the PC throw segmentation faults on CPU Frequency @ 166 Mhz but working fine at @ 133 Mhz?

  • Is there any software tool useful for diagnose this kind of errors in hardware?

Use Windows 7 offline sync with external usb hd



Yeah, truly the whole question in the header. Is there a way to use Windows 7 offline sync (which we know from network mapped drives) with a external usb hd?




When not, are there similar built in tools or good third party tools?



My scenario: I want to buy a ultrabook with SSD which is mostly limited in space. So I'm going to put all files to a external HD and only store current projects on the local SSD. Let's say I have to change project. It would be easy just change sync folders and have the second project synced to my hd too.



With network mapped drives it's such easy. Paths do not differ if the drive is offline so in most situations you don't take notice if the folder is offline. And you only have to activate offline file for the folders you courrently need for work. So is there a similar solution for usb hard drives?


Answer



I think that you have a perfectly reasonable use-case here.



I've used offline files with XP not Win 7 but found that it was downright dangerous with lost and corrupted files and odd synch issues. So I never recommend it's use.




For my own use, I've used 3rd party tools. Mainly SyncbackSE which, though not free, is very powerful and utterly reliable. With a tool like this, you simply set up a sync between the USB drives folder and the internal drive folder. The tool monitors for changes and automatically syncs them. Syncback can also maintain multiple versions automatically so it does far more than offline files. Syncback is also able to monitor for the presence of a specific drive and run a job when it appears.



There are plenty of other similar tools that do similar jobs. The only disadvantage is that you have to set up a sync profile every time you change projects. However, it isn't a big job and you can usually clone the previous job and change the folder names.



If you are happy to do the sync manually, the other method I've used in the past is to use a distributed source control package. Namely Mercurial. Mercurial is better integrated with Windows than GIT and handles large binary files rather better. However, with this method you need to remember to commit the changes at which point, assuming that you've got things set up correctly, the changes can also be automatically synced to the external drive.



I would like to propose a possible alternative though.



You should certainly also have a proper backup tool that takes secured copies of all data files to a different location where you cannot accidentally delete them. Syncback can do this job as well though personally, I use CrashPlan with both local and cloud storage. In this case, you don't really need a copy of the project files.




So I actually recommend using something like Crashplan to take care of the secure backups and keep the project archive on the external drive with a soft link in your "My Documents" folder (or wherever convenient). Many people forget that Windows' HTFS format supports links and junctions. I use Link Shell Extension to assist setting them up. This is the setup I use on my laptop where I have a number of archive folders pushed out to the external drive and links to those folders in My Documents and other convenient places.


operating systems - Is it possible to buy Windows 8 online as a digital download?


Is it possible to buy windows 8 online as a digital download? (the full install non-upgrade version)


Similar to the way windows 8 upgrade can be bought as a digital download from windows.microsoft.com but for the full version.


Answer



"As previously announced, the lineup does not include a full package product (FPP) SKU for retail purchase. Instead, consumers will be allowed to buy the OEM product, install it on a new PC or in a virtual machine, and take advantage of the Personal Use Rights section of the OEM license. That represents a significant savings for consumers, who can pay $140 for a full license for Windows 8 Pro rather than $275 for the full retail package."


http://www.zdnet.com/prices-and-packaging-for-windows-8-go-public-7000005685/


Full version OEM here but not a digital download, I am willing to bet MS will offer the Full version OEM for download at some point, time will tell. Their big push right now is get as many people to "upgrade" as they can by offering the discounted price.


Constant CPU utilization on consumer hardware



A computer in a manufacturing environment is running software that is in a constant communication loop with a PLC. An artifact of the implimentation is ~20-30% CPU utilization 100% of the time (24/7). Will the constant CPU cycling have an impact on the longevity of this hardware?


Answer



The simplest answer is not really, computers are designed to be used over long spans of time(Example, Google's server, Amazon's servers, your router, etc), though Is the performance of a CPU affected as it ages? makes the point that there is SOME wear and tear from the age of the component. Bottom line: Unless your CPU is running very hot, it shouldn't be very limiting on the life span to keep at 30%,


windows 7 - Up/Left arrow keys + another key doesn't 'work'

I hope I'm right in thinking this is the site where you post general computer-related problems...


A problem I have when playing games (since you won't be pressing multiple keys simultaneously anytime else) is that when I press and hold Up/Left keys together with another key, that last key fails to 'work' or it hinders the arrow keys and doesn't let them work. This doesn't happen with any other arrow key combination, e.g. Up/Right or Down/Left.


The weird thing is that same thing happens when I'm using WASD instead of the arrow keys! Meaning W+A+smth else doesn't work. Perhaps this problem is for all such sets of four keys.


If someone knows what my problem is, I'd appreciate the help.
(My reflexes are fast so I can circumvent this obstacle, but it's quite annoying and totally unnecessary)

Thursday, May 23, 2019

Windows 7 turn off UAC from non-privelaged account

i have a bit of a pickle.A few years ago i disabled administrator on my old windows 7 computer and created an admin account of my own. I also set a boot password. The problem is, now i can't access any account except guest, and i also can't access boot menu to boot any conventional cracking tools.


I also can't install anything, due to me being guest.


Is there any way i can disable UAC (user account control for Win7) from this non-privelaged account.


This probably isn't the right place to be posting non-coding related tech problems, but if you could give me a hand that would be great.


Thanks,

windows 7 - New computer, good specs, OS hangs occasionally even though CPU usage is

So here's my build:



  • CPU – AMD FX-8350 4.0GHz 8-Core Processor

  • Motherboard – MSI 970A-G46 ATX AM3+ Motherboard

  • Memory – Crucial Ballistix Sport 8GB (2 x 4GB) DDR3-1600 Memory

  • Storage – Mushkin Chronos 120GB 2.5" Solid State Disk

  • Video Card – Sapphire Radeon HD 7870 GHz Edition 2GB Video Card

  • Case – NZXT Source 210 (Black) ATX Mid Tower Case

  • Power Supply – Rosewill Hive 650W 80 PLUS Bronze Certified ATX12V / EPS12V Power Supply

  • Optical Drive – Asus DRW-24B1ST/BLK/B/AS DVD/CD Writer


My OS is Windows 7 64-bit.


For some reason, the computer will hang almost every time I open a new webpage in Chrome, and sometimes it just hangs for seemingly no reason. By hang, I mean that the OS is unresponsive for a short period of time (usually 5-10 seconds) before I can click something again. I can move the mouse while this happens.


Here's a picture of the temperatures... I don't know if this is normal or not:


enter image description here

download - Can Microsoft Office products be purchased (legally) online, downloaded and installed without needing media?


I need to purchase PowerPoint 2010 and install it on another pc over vpn. So I guess the order would be:



  1. vpn to remote pc

  2. open remote browser

  3. purchase and download

  4. then install


I need help with step 3. Can it be done? Where at?


Answer



Yes, of course. You can buy them directly from Microsoft, and Dell also allows you to buy them as download versions.


http://www.microsoftstore.com/store/msstore/list/categoryID.50726400?Icid=OffCat_CMod_OfcStandAlone_Cat_50726400


Wednesday, May 22, 2019

How to run Windows 10 Settings app as administrator?

In Windows 7 I created two users: a regular user that I log in as and an administrative user that I enter the password for whenever I did anything that required elevation. This seems to work well enough in the past, the Control Panel prompted me with a UAC prompt every time I changed system-wide settings.


Now after I upgraded to Windows 10 the Settings app seems to gray out most options that are not changeable by regular users. (e.g. uninstall apps, Windows Defender real-time protection, wifi metered connection status, etc). Is there a way of running the entire Settings app as Administrator so I can use it to change the settings without going to the trouble of switching users and starting a new session as Administrator? I tried right clicking on the app icon in the start screen but it did not display the "run as Administrator" option.

What's the Best Practice reinstalling windows 7 on a dual boot with ubuntu 11.04


I've posted a question here that I have a 32bits windows 7 on a dual boot machine with ubuntu 10.04 upgraded to 11.04. From the responses I had from the questions, I decided to reinstall the windows 7 but this time a 64bits version.


I've install the grub on the first section of the HDD on which ubuntu is install, meaning the 2nd Drive.


I still want guidance before I proceed.


What would you suggest me as best way to achieve that without disturbing the boot loading.


thank you for reading this.


Answer



If you install Windows 7 on the first HDD then you're going to get the Windows 7 Bootloader, and the bootloader on the second HDD will stay intact.


I have the exact same installation as you (Win7 on one drive, and Ubuntu on the other)


What I did was download and install EasyBCD then just create an entry for Ubuntu, this will give you the Grub boot loader when you select the Ubuntu entry.


If you want Grub to boot first then I would suggest booting your Second HDD as the boot device in your BIOS then re-install grub from Ubuntu to get the Windows 7 Bootloader entered into the Grub List.


What do linux internet shortcuts look like (extension and contents)?


I don't have a linux computer currently running, and I don't remember what linux's internet shortcuts look like. I need to know, so I can create one for linux users I'm distributing content for.


What extension does linux's internet shortcut files use? What do their contents look like? Is it similar to Windows or MacOS? Do different linux distributions have different types?


Answer



They take one of two forms:



  • An HTML file using either JavaScript or a tag. This is dependent on a lot of factors to work right (not just on Linux, but on all platforms), namely the user has to have the file set up to open in a web browser, and they have to have whichever method you want to use enabled in their browser (users can and do have either or both disabled), and the browser has to honor it properly for file:/// URL's (most will for the JavaScript, but some don't honor the tag correctly for file:/// URL's).


  • A FreeDesktop.org Desktop Entry file (info on the exact format can be found on the FD.O site). This is the most reliable method on Linux, as i will work out of the box without issue on most distributions, and with minimum work on those it doesn't (namely, you just need to make sure that the user has execute permissions on the file).



A typical link thus looks something like this:


[Desktop Entry]
Name="example.com"
Type="Link"
URL="https://example.com"

The above file will show up with a name of 'example.com' in all major desktop environments and when double clicked will cause https://example.com to be opened in the user's preferred web browser.


linux - parse log file with heavy output

I'd like to monitor my vsftpd logs and pull information from the logs to process the files that have been uploaded. Up till now everything was great and worked fine:



tail -n0 -F /var/log/vsftpd.log | while read line; do

if echo "$line" | grep -q 'OK UPLOAD:'; then
#do a bunch of processing stuff - this takes some time
fi
done


I started doing some scale testing and uploaded 500 files at once. For some reason the log lines are missing or they are cut off when you upload so many things. For example a typical line looks like:



Sun Apr 7 09:08:51 2013 [pid 25409] [cam02430] OK UPLOAD: Client "206.132.183.201", "/20130407/09/20130407_090842D.avi", 531792 bytes, 426.14Kbyte/sec




But sometimes the line looks like this (if not missing entirely):



:08:51 2013 [pid 25409] [cam02430] OK UPLOAD: Client "206.132.183.201", "/20130407/09/20130407_090842D.avi", 531792 bytes, 426.14Kbyte/sec



It is cutting off the first few characters of the log. It doesn't do it for every line but most. Also many lines are just missing. I guess I have a race condition of my processing not finishing in time. How I can get around this?



EDIT
I guess I have 3 options:





  1. Don't use tail and try to use a combination of things like a cron job/grep to check the log for a new entry. I imagine this could be tricky. How do I tell what is new in that log?


  2. Monitor the file change with monit or equivalent. I don't believe this is an option. The files get stored into somewhat random directories with files names that are time stamped.


  3. logstash or equivalent. I don't think these programs fit my needs. But maybe someone knows otherwise.




Right now I'm focusing on #1 with no good leads. So any thoughts on any of this would be appreciated.

windows 7 - USB connection issues with flash drives

Currently I'm facing an issue when I'm trying to connect any USB flash drive to my PC.



  1. I can connect USB keyboard and mouse without any issue.

  2. However when I connect USB flash drive, there are 2 situations that are occuring randomly:



    • There is no USB drive mount in My Computer, when Device Manager is checked, it shows
      error code 10, but is shown in Disk Management.

    • My computer will have USB drive mounted, but when I click on it, it is empty. On right clicking the properties, the disk space shows 0. There are files on the USB.



What I have done is:



  1. Run CCleaner to repair the registry, restart and try, but still not working.


  2. Uninstall the drive in device manager, restart and try, but still not working.


  3. Tried the port that connects mouse and keyboard, but does not work.


Updated (2012-09-19)


1) the original usb drive work fine on other pc.


2) had perform microsoft fix it online, update chipset driver, but still cannot solve the issue.


3) when plug in sony usb to the same pc, it work fine


4) Found exclaimation mark indicate WPD File Systems Volumn Driver

Two SATA HDDs connected using a Black Duet HDD Docking Station via eSATA to my Laptop, second drive not appearing?


Hi I am using a BlacX Duet HDD Docking Station to connect a 1TB WD Caviar Black SATA HDD (WD10000LSRTL) and a HITACHI SATA DESKSTAR (0S00163) to my G51VX (BestBuy) laptop via the eSATA port.


When I plug in both HDDs in to the Docking Station, connect the docking station to my laptop and start Windows 7 (64-bit Ultimate), only the HDD in the first drive in the port actually shows up in My Computer and Disk Management.


If I swap the drives positions I can get them both to work, but never at the same time.


I also checked in the bios settings on the laptop, under Advanced->IDE Configuration->SATA Operation Mode, and it displays:



SATA Operation Mode: [Enhanced]


AHCI Port0 [Hard Disk]
Device: Hard Disk
Vendor: ST9320421AS
LBA Mode: Supported
S.M.A.R.T.: Supported


AHCI Port5 [Hard Disk]
Device: Hard Disk
Vendor: Hitachi HDS721010CLA332
Size: 100.00 GB
LBA Mode: Supported
S.M.A.R.T.: Supported



There should be a third drive, but I'm not certain why it is not being picked up. Additionally, before I played around with the settings in the IDE configuration, it used to display the DVD as well.


Answer



Okay figured it out.


My laptop uses a ICH9M-E/M Chipset and this does not have a "port multiplier". The BlacX Duet HDD Docking Station only supports using both drives when the motherboard/chipset in question contains a "Port Multiplier"


But it's not a total loss. I can still use both drives using USB at slower speeds, and I can also disconnect them in Windows and reconnect them using the eSATA connection by disconnecting the hardware.


Tuesday, May 21, 2019

windows 8 - Normal ISO to UEFI bootable ISO converter?

It's easy to Google Windows 8 password recovery tools. However, the PC I'm working on right now doesn't support legacy boot and can only boot from GPT partitioned USB sticks. I'm using Rufus for creating my bootable stick, but to boot in UEFI mode I have to burn a UEFI bootable ISO onto the stick. I can't find a UEFI bootable ISO around. Is there a sort of converter from normal ISO to a UEFI bootable one?

performance - Installing software on Windows 7 very slow



Since a few days, any software installation on my Windows 7 computer is very slow. This is on a Windows 7 64bit setup of just a few weeks old (new computer).




I've waited for over an hour for VirtualBox to install. Same for AVG AntiVirus and some other programs. Cancelling the installation equally takes a very long time. Effectively, I've had to kill the installation processes.



Process Explorer doesn't show any significant activity of any kind and everything else still seems to be working fine and fast. Any ideas of what might be wrong?


Answer



I had much the same issue after reinstalling Win7 64bit on my SSD C Drive, though the C drive behaved fine. Trying to install programs, copy or delete large files to/from a partition on my existing D drive (a SATA HDD) took forever (hours) or hung as you describe. This partition had the remnants of old installs such as bckups of 'My documents' together with the programs that ran from the last install of Windows (which had become very unstable). In safe mode transfers to and from this partition to an external HDD happened at normal speed however and chkdsk revealed no errors.
The only cure I could find (as a non-techie) was to delete the D partition, re-create and re-format. Now everything installs/deletes as it should.


Monday, May 20, 2019

windows vista - Clone Hard Disk Software






Can someone recommend some software (free or opensource) that will allow me to make a clone of a working hard disk that was taken from an identical system. This is for Windows Vista.


I am unable to install Vista from scratch, something to do with Vista and SATA and the BIOS is very basic. Thanks.


Answer



EASEUS Disk Copy is a potent freeware providing sector-by-sector disk/partition clone regardless of your operating system, file systems and partition scheme by creating a bootable CD. The sector-by-sector method assures you a copy 100% identical to the original. Disk Copy can be used for copy, cloning, or upgrading your original small hard drive to a new larger drive. Simply speaking, it can copy anything from the old hard drive including the deleted, lost files and inaccessible data.


alt text


Windows 7 immediately disconnects a USB drive

I am having a problem with Windows 7 x64 consistently disconnecting one specific USB mass storage drive immediately after it is connected. The drive in question is a Cowon C2 digital music player which works both in MSC (mass storage controller) or MTP (Media Transfer Protocol) modes, i.e. there are no device-specific drivers needed/available. The basic issue is the same in both MSC and MTP modes.


When I connect the player, Windows plays the "USB connect" sound and the device appears (under its correct name) in the device manager, but it never appears as a drive. The player itself displays "USB Connected" for a split-second before reporting that it has been disconnected again. Since the player, by design, reboots after it has been disconnected, Windows plays the "USB disconnect" sound before restarting the whole cycle once the player has powered back on.


I am connecting the player through an Intel X79 Chipset motherboard (Gigabyte GA-X79-UD3) to Windows 7 Pro 64-bit. The player used to work fine the first time I connected it in MSC mode, showing up as an external drive; the issue only appears when subsequently connecting it again. This can be reproduced: uninstalling the standard Windows mass storage driver (USBSTOR.SYS) from the device manager while the device is visible there, then reconnecting the device, the driver is automatically reinstalled and the device remains visible. After disconnecting and reconnecting it, the problem occurs once more. In MTP mode, driver installation fails in the first place, but that might be due to other reasons. The problem is the same: as soon as the device is connected to the computer, Windows disconnects it again.


It is not a problem with the player, since the issue does not occur on another system running the exact same operating system. It is also not a problem with the USB controller, since the issue is the same on both the Intel USB 2.0 and the Fresco Logic FL1009 USB 3.0 controller ports. I have also not had the problem with any other drive so far.


Among the things I have tried so far:



  • Disabling USB legacy mode in BIOS

  • Disabling energy-saving power down for all USB controllers in Windows' device manager

  • Removing and reinstalling USB controller drivers

  • Restoring the player to factory defaults


None of these made a difference. I would be very grateful for any hints on what else to try.


Edit: Here is another new hint; I found out that when I connect the drive before booting Windows, it is available in Windows Explorer as it should, and does not automatically disconnect. If I remove and reconnect it though, the infinite connect/disconnect-loop starts anew.

mac - Wireless NAS for media storage and browsing


I'd like to purchase a NAS to use for media storage, mostly pictures, as well as for storing IP camera video feeds and occasional time machine (mac) backups. Currently, I have an old 2 drive NAS that I use for this, but the biggest pain point is in browsing photos over AFP or SMB from my Mac - it's basically unusable - photo previews take too long to load. This is my most important use case - being able to browse/manage photos stored on my NAS from my Mac, ideally, wirelessly (my wife doesn't want to have to plug into something to browse photos).


Is this possible? I was thinking a 4 bay NAS with 1 drive dedicated for videos and the other drives for media might be good (photos I'd like in at least RAID 1 since I don't want to lose them). Any hardware options I should consider? Any storage arrangements I should consider or networking?


Answer



I suggest Synology (DS416, DS216).
They are stable and, i hope, affordable.
Use wired connection from your NAS to the Router/Switch. Your wife will still be able to connect over WLAN to the device (tru the existing AP). WLAN is always slower.



  • Try to keep your folders small (not 1000 photos in one folder).

  • DON'T do Raid 5. Raid 1 is fine on performance.


Sunday, May 19, 2019

windows 7 - Where is the used memory in Task Manager & Resource Monitor coming from?

On a Windows 7, the working set memory usage plus private memory does not add up to the total used memory in Task Manager and Windows 7 Resource Monitor.


How do you find out where the used memory is coming from?
The cached memory can't be part of it because sometimes the total cache is greater than the total in use. The commit memory plus the working set also doesn't add up to the total in use - but even that shouldn't be significant if it did, since commit is virtual.

memory - Is the Windows paging file safe in the encrypted partition?



I came across this setting called ClearPageFileAtShutdown. The setting is described here and says:





If you are truly worried about security, boot Windows off a fully-encrypted drive. Then you needn't worry about your sensitive data being unencrypted in the paging file.




Basically, it implies that the paging file, even if it resides in an encrypted partition, is not safe--the drive must be fully encrypted for it to be safe.



Is this true? How would the paging file (or any file in general) "leak" out of the encrypted partition where it resides? My understanding is that data in memory is stored on RAM and if RAM is full, it is stored in the paging file on the encrypted partition that I specified the paging file to be in--I don't see how this data can be exposed (unencrypted).



This topic is particularly important to me because I dualboot Windows and Linux and I encrypt the former with Veracrypt and the latter with dm-crypt on an SSD--the remaining space is unencrypted unallocated data (which as far as I'm concerned, is not a security issue but based on the article above, it is).




Thanks.


Answer



You are correct that if your pagefile is on an encrypted volume or drive, the pagefile will be encrypted along with everything else. Whole-volume and whole-drive encryption works at a low level in the storage stack where the entire "file" concept does not exist (just like to the drive itself), so it would be quite difficult for an exception to be made for certain files (not impossible, but I don't know why anyone would bother).



Your interpretation of the warning is incorrect. It should be read as




Then you needn't worry about your sensitive data being unencrypted in the paging file, as it would be if you didn't use whole-volume or whole-drive encryption.





(italic text added by me, of course)



What they're warning about is that even if you use the "clear pagefile at shutdown" option, if someone manages to power off your machine and make off with your drive, the pagefile contents won't have been wiped (because the normal shutdown procedures were bypassed).


Powershell Script to move and rename Files

Disclaimer: I have zero understanding of Powershell. Initially I was going to do this in Java, then decided to do a scheduled task instead, (Executing a PoSh script.)


This is what I have:


$ArmA2OA = Get-Process ArmA2OA - ErrorAction SilentlyContinue
$ChkFile = "C:\Users\Mark27\AppData\Local\ArmA 2 OA\ArmA2OA.rpt"
$FileExists = Test-Path $ChkFile
$currentDate = get-date -uformat "%Y-%m-%d@%H-%M-%S"
if(-Not($ArmA2OA)){
if($FileExists){
move-item "C:\Users\Mark27\AppData\Local\ArmA 2 OA\ArmA2OA.rpt" ("C:\Users\Mark27\Desktop\A2OA\{0:yyyyMMdd}.rpt" -f (get-date))
}
else{break}
}
else{break}

What it's supposed to be doing: If the Process A2OA.exe isn't running, check to see if a file ArmA2OA.rpt exists in the directory C:\Users\Mark27\AppData\Local\ArmA 2 OA\. If that is true, then copy and rename the file using current timestamp and send it to C:\Users\Mark27\Desktop\A2OA


If the file doesn't exist, or the process is running, abort.


I've been through a number of questions similar to this, but haven't found my solution. The directory, and file name I'm looking for will always be the same. (This script will be set to execute every 10-15 minutes.)

user accounts - robocopy ERROR 1314 (0x00000522) on Windows 7 Home Premium

I'm using a robocopy script with the switches /COPYALL and /B on my Windows 7 Home Premium PC to backup files to a NAS and I'm getting the error message:



ERROR 1314 (0x00000522) Copying NTFS Security to Destination File (file-location/name) required privilege is not held by the client.



I think it is something to do with account privileges in Windows 7 Home Premium - I read somewhere you need to add the account to the Backup Operators group - but that is for the Server OS.


How can I overcome this problem without upgrading to Windows 7 Pro?


Note: The other Win 7 computer on the network which is Pro does not have this issue.

windows 7 - Trouble with certificate checking on a closed network

I'm managing a Active Directory domain with about a hundred Windows 7 clients running IE9. The network does not have access to the Internet, but do have the ability to access a vendor web application. The web app uses HTTPS and the vendor's certificates are from Entrust. I'm trying to figure out how to add the certificates to Active Directory so that all clients will receive the certificates and stop warning or outright blocking access to the application. Nothing I have tried has worked.



  1. Accepting the certificates via the browser's red shield in the address bar hasn't worked. In fact, If I view the certificate and look at the path, it says it is valid, but still warns on some clients and blocks on others.


  2. I tried importing the certificates into the browser by going into Tools-Options-Content-Certificates, but that hasn't helped either. I can see the current certificates installed, but browser behavior is unchanged.


  3. Last but not least, I've added the certificates to the domain group policy under Computer Configuration - Policies - Windows Settings - Security Settings - Public Key Policies - Trusted Root Certification Authorities.



I'm losing my mind on this issue. I know the certs are good because I've installed them in the browsers for our Linux workstations without any issue. It is only the Windows hosts that will not seem to accept them. I'm wondering if the issue might have something to do with the PCs being unable to double check the certs over the Internet. I simply would like all of the domain PCs to accept the certs provided by the domain and leave it at that. I don't want to disable certificate checking completely, but I'm getting close.


Also, would setting up a certificate authority on the LAN help or just add unnecessary complexity?

Saturday, May 18, 2019

hardware failure - Something strange happened to my hard drive

Around 2-3 months ago I discovered my primary hard drive (Western Digital, WD-1002FEAX-00Z3A0) had 1 write error count. I kept checking everyday (I'm serious) if the value was increasing but it didn't until today.


Today I checked the value as always but to my surprise, the value is 0. I ran an extended test with Western Digital diagnostics. In test result: PASS. I also checked the SMART attributes and the values are the same.


I don’t understand. Is the hard drive going to fail sooner? If not, what happened to that write error count? I’m so confused.


I did a chkdsk right after I discovered the write error count and here is the log of the output:


CHKDSK is verifying files (stage 1 of 5)...
Cleaning up instance tags for file 0x407e5.
Cleaning up instance tags for file 0x6eab7.
470272 file records processed. File verification completed.
3819 large file records processed. 0 bad file records processed. 2 EA records processed. 44 reparse records processed. CHKDSK is verifying indexes (stage 2 of 5)...
616264 index entries processed. Index verification completed.
0 unindexed files scanned. 0 unindexed files recovered. CHKDSK is verifying security descriptors (stage 3 of 5)...
470272 file SDs/SIDs processed. Cleaning up 811 unused index entries from index $SII of file 0x9.
Cleaning up 811 unused index entries from index $SDH of file 0x9.
Cleaning up 811 unused security descriptors.
Security descriptor verification completed.
72997 data files processed. CHKDSK is verifying Usn Journal...
36816696 USN bytes processed. Usn Journal verification completed.
CHKDSK is verifying file data (stage 4 of 5)...
470256 files processed. File data verification completed.
CHKDSK is verifying free space (stage 5 of 5)...
149211051 free clusters processed. Free space verification is complete.
CHKDSK discovered free space marked as allocated in the
master file table (MFT) bitmap.
CHKDSK discovered free space marked as allocated in the volume bitmap.
Windows has made corrections to the file system.
976657407 KB total disk space.
379019696 KB in 339927 files.
189208 KB in 72998 indexes.
0 KB in bad sectors.
604295 KB in use by the system.
65536 KB occupied by the log file.
596844208 KB available on disk.
4096 bytes in each allocation unit.
244164351 total allocation units on disk.
149211052 allocation units available on disk.
Internal Info:
00 2d 07 00 08 4d 06 00 e2 29 0b 00 00 00 00 00 .-...M...)......
12 04 00 00 2c 00 00 00 00 00 00 00 00 00 00 00 ....,...........
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
Windows has finished checking your disk.
Please wait while your computer restarts.

SMART info

Excel Pivot table: Change the Number format of Column label(Date) to "dddd"


I have a pivot table with certain columns based on dates. So the column labels are in dates(image below). Excel automatically formats these dates to "dd.mmm" but I would like to just see them as weekdays ("dddd"). I've tried changing the number format of the date field in the field settings.


Pivot table


Answer



I'm not sure if I missed this feature earlier or if its a newly added feature, but it looks like we can change the Number format of the Column Labels in a pivot Table.


You can follow the following Steps (Screen-shot below):



  1. Right Click on the Field in the Columns Section

  2. Click on Value Field Settings.

  3. Click "Number Format" to open the formatting window.

  4. Go to "Date" Category to chose from an existing Category

  5. or Go to "Custom" Category to customize the format like below screen-shot.

  6. Edit the custom Format in the "Type" field and preview the sample (a)


Steps to follow to edit the Number format of a pivot table Column Label:


Steps


macos - What's the performance impact of a virtual machine NOT running?


Question


What is the performance impact on Mac OS X, 10.6 specifically, with VMware Fusion or Parallels Desktop 5 for Mac when the virtual machine is not running? Stated another way, does installing Fusion or Parallels impact boot time of Mac OS X?


Background


I've used Parallels Desktop for Mac—versions 3, 4, and 5—to access a Windows XP virtual machine once or twice a week. Given the limited amount of time that I use the virtual machine, I'm not wanting Parallels, or VMware, to impact Mac OS X's performance when the virtual machine is not running.


My suspicion with Parallels is that it does impact performance even when the virtual machine has not been activated, but I have not done enough testing to isolate the cause to confirm. I have confirmed that on startup of the Mac, there are entries in the logs related to Parallels—network adapter stuff for instance.


I reinstalled a fresh copy of Mac OS X. So far I'm happy with the boot times and performance; however, at some point I'm going to need Windows again and will have to break down and install either Parallels or VMware Fusion.


Related Research


Answer



I've never user parallels but vmware does the following even when VMs are not running:



  • Adds the virtual network interfaces on boot

  • runs a bridge daemon on at least one of the vmnet interfaces

  • Runs dhcp on the vmnet interfaces

  • Runs a nat daemon on at least one of the vmnet interfaces.


These total to about 1.5 - 2mb of ram and almost no load. So, yes, your system resources are impacted, though I doubt you'd ever notice.


What is a "socket A" heatsink?


Asked a question about replacing a CPU heatsink and it got closed. Before it was closed, got an answer saying to get a SOCKET-A heatsink. Is that all I need to know?


Here's a link to the question that was closed, which has specs on the type of system and heatsink that died(not posting it again, since it appears posting that info got the question closed)
The fan on my heat-sink is dead, how do I figure out what to replace?


Answer



A "socket A heatsink" is a heatsink that fits on socket A. That's all you need to know...


I bet you just go to a store and buy a new heatsink for that specific socket. Or if you can put a new fan on it then just disassemble the fan from the heatsink and assemble a new fan on it; fans have standardized sizes.


macos - Create a Linux (Knoppix) bootable USB (with multiple partitions) with Linux or Mac OS X



I want to create a Knoppix bootable USB flash drive. I've found instructions about how to do this, but I would like to do it fulfilling the following conditions:



The USB I am planning to use has 8 GB capacity, and Knoppix only needs 700 MB (I'll use the little CD version, not the humongous DVD one). I would like to use as little of the capacity of the USB flash drive (I was planning to use 1 GB for the Knoppix bootable disk and the rest as free space). The remaining free space would be a FAT32 partition, so I can use it as a "regular" USB drive.




I am currently using a Debian PC; I would appreciate instructions on how to do this using Linux, and (optionally) OS X.


Answer



After googling a bit more, I found a procedure here that works great. It takes a little time, but it works.



I put here this knowledge, so it is available to anyone that faces this particular issue.



Note: I managed to make this work using Debian Linux. I still have to find out how to make it work on OS X.



Step 0. (The obvious one) Download (or somehow get) the Knoppix CD (or DVD) .iso image you want to copy in your flash drive. I'm using KNOPPIX_V7.2.0CD-2013-06-16-EN.iso.




Step 1. Install syslinux:



$ sudo apt-get install syslinux


Step 2. (Clean your USB flash drive) Plug the USB flash drive to your computer. To find out how does the system "recognizes" it, type the following command:



$ fdisk -l



(you may need to switch to the root user, or use sudo). The result will be something like this:



Disk /dev/sda: 1500.3 GB
...
Disk /dev/sdb: 7803 MB
241 heads, 62 sectors/track 182401 cylinders
...


Notice that the first entry refers to the local hard drive and the second refers to the USB flash drive. Your results may be different. If you have any doubt, unplug your USB, run fdisk -l again and check which drive is gone.




Once you are sure you know which device is your USB flash drive (in my case /dev/sdb), take note of the heads and sectors/track values (in my case, 241 heads and 62 sectors / track).



Now, shred the flashdrive:



$ shred -n 0 -z /dev/sdb


This command will overwrite your USB flash drive with zeros, including the partition table (check the shred man page for more info). If you want to view the progress, add the -v switch. This will take quite a long time (30 or 45 minutes in my case), so maybe it's time to go for a snack ;) ).




Step 3. (Prepare the .iso file) Navigate to the folder where the Knoppix .iso image is, and convert it to "hybrid mode". Use the values of heads and cylinders/track you got in step 1 (if you don't remember them, use fdisk -l /dev/sdb):



$ isohybrid -o 1 -h 241 -s 62 -e 1 KNOPPIX_V7.2.0CD-2013-06-16-EN.iso


Step 4. Write the image to your USB flash drive:



$ cat KNOPPIX_V7.2.0CD-2013-06-16-EN.iso > /dev/sdb



This will take about 20 minutes (so maybe you should get a cup of coffee right now).



After this command executes, check the USB partition table:



$ fdisk -l /dev/sdb

Disk /dev/sdb: 7803 MB
241 heads, 62 sectors/track 182401 cylinders
...
Device Boot Start End Blocks Id System

/dev/sdb1 * 1 97 724686+ 17 HPFS/NTFS hidden


This tells you that the /dev/sdb1 partition is a bootable HPFS/NTFS partition. Here is where your Knoppix boot drive is.



Step 5. (Make the rest of your USB flash drive available for use). If you don't mind that the remaining space in your flash drive is wasted, then skip this. But if you (like me) are greedy about these precious extra MB, you'll need to add a second partition to your drive. So, let's edit the partition table:



$ fdisk /dev/sdb

command (m for help): p

Disk /dev/sdb: 7803 MB
241 heads, 62 sectors/track 182401 cylinders
...
Device Boot Start End Blocks Id System
/dev/sdb1 * 1 97 724686+ 17 HPFS/NTFS hidden

command (m for help): n
Partition type:
p primary
e extended

Select: p
Partition number (1-4, default 2): 2
First sector (98-1019, default 98):
Using default value 98
Last sector, +sectors or +size{K,M,G} (8032256-31266815, default 31266815):
Using default value 31266815

Command (m for help): t
Partition number (1-4): 2
Hex code (type L to list codes): c

Changed system type of partition 2 to c (W95 FAT32 (LBA))

command (m for help): w


Notice that there are now two devices: /dev/sdb1, which holds the Knoppix bootable image, and /dev/sdb2 which is free space (almost) ready to use. All that remains now is to make the file system ready:



$ mkfs.vfat /dev/sdb2



And that's it! The next time you plug this USB flash drive to your computer, you'll be able to use the free space as a regular USB flash drive, but there will be a Knoppix Live partition hidden, ready to help you. To use it, just shut down your computer, plug the flash drive to it, and turn it on. Be sure your computer can boot from USB, and wait for the system to start.



I really hope this helps.


storage - How do I swap a drive on my Synology NAS without a RAID setup?



I’ve got a Synology DS213j with a 2TB and 1TB drive. I’m connecting to the volumes on the NAS via a network connection (Ethernet/Wi-Fi). Today I bought a 4TB drive and I want to swap that one with the 1TB. Both drives have less than 100GB of free space, therefore a new drive.



However, as this is not a RAID setup so it’s not as simple as switching the drives and waiting for drive A to mirror the data to the new drive. That I know, yet I don’t know how to do this in my situation.




I don’t really have a spare 1TB drive to copy the data to from the installed 1TB drive.



So how do I replace the 1TB drive with the new 4TB drive, without losing the data stored?


Answer




However, as this is not a RAID setup so it’s not as simple as
switching the drives and waiting for drive A to mirror the data to the
new drive. That I know, yet I don’t know how to do this in my
situation.





I have used Synology setups before and mainly in a RAID config. I assume these two drives are being used as NAS volumes, correct? Either than or maybe iSCSI?



My only ideas are:




  1. Temporarily Swap the 2TB Disk Out With the 4TB Disk: The idea here would be to do the following; I assume this should work and if not it’s a low risk test I assume since you can just pop the 2TB and 1TB drive back in anyway:





    1. Pull out the 2TB drive from the Synology NAS.

    2. Then insert the new 4TB drive into that empty slot.

    3. Setup the 4TB drive for use in the Synology NAS.

    4. Once that 4TB drive is setup, copy the data from the 1TB drive to that 4TB drive.

    5. Then when that copy is done pull out the 4TB drive and reinsert the original 2TB drive

    6. Finally, pull out the 1TB drive and put the 4TB drive into that slot.


  2. Get an External USB Enclosure/Cable: The idea here would be that you would just copy data from the 1TB drive to the new 4TB drive in an external USB hard drive enclosure or connect it with USB drive adapter cable. Then after the copying is done, pop that 4TB drive into the Synology enclosure. I would recommend this NewerTech Universal Drive Adapter since it can handle drives up to 6TB and higher; many USB enclosures/cables only handle up to 2TB





But that said, my understand of Synology enclosures is they might just partition any disk it sees as “RAID” with MDADM (Linux software RAID multi-disk administration tools) even if the disk are not in explicitly in a RAID mode. So maybe the solution would be this modification of idea 2:




  1. Get an External USB Enclosure/Cable: The idea here would be:




    1. First you would take the 1TB drive and hook it up to an external USB hard drive enclosure or connect to via a USB drive adapter cable.

    2. Once that 1TB drive connected via USB, you would then see if you could mount that in your main OS such as Mac OS X.

    3. If somehow that won’t work—and the drive won’t mount or the data is not recognizd—you can see about booting from something like an Ubuntu Live CD—or even running Ubuntu VirtualBox—and then running commands as outlined here. More details from Synology’s own web page on “How can I recover data from my DiskStation using a PC?”

    4. If you can get that mounted in some way, there you go! The 1TB drive is mounted in Mac OS X or Ubuntu and then just copy the data from the 1TB drive to the newly installed 4TB drive. Of course Ubuntu would then have to be able to connect to the Synology NAS, but this should all work.




Friday, May 17, 2019

macos - Executing an ATA Secure Erase command to SSDs on OS X

Is there a way to securely erase an SSD (I'm working with Crucial M500) from OS X? I'm not interested in zeroing the drive. What I need is the ATA Secure Erase which basically erases all data on the drive in a matter of seconds. I have looked and found that it's possible in Windows, but can't seem to find away in OS X.


(This post says it's not possible, but it was from 2011, so hopefully things might have changed since then How to use ATA security on a hard disk in practice? )

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