Thursday, August 31, 2017

autocomplete - Vim completion - always suppress the newline after I select a suggestion with the Enter key



Sometimes, after I select a suggestion (from the completion pop-up that appears when pressing Ctrl-N) using the Enter key, Vim will insert a newline and the cursor will be moved to the following line. This doesn't always happen - it seems that Vim tries to be smart about it and will only move me to the next line if it thinks this is what I would like.



However, I want to disable this behavior (because it is not always smart) so that I will always have to move to the next line by myself by manually pressing the Enter key. Is this possible?


Answer



What Vim does in response to your typing the key while using insert completion depends on the state of the completion menu. The behavior of the menu is described here:




:help ins-completion-menu


and the behavior of various keys when using insert completion is described in the next section,



:help popupmenu-keys


where it explains that the behavior of the key depends on the menu state. As I understand it, typing inserts a newline except in the case where you have selected a match from the menu using cursor keys.




The best way to avoid inserting a newline when you don't want one is to terminate or make a selection using some other key such as Ctrl-Y or Ctrl-E.



See also



:help complete_CTRL-Y


and for the entire description if insert-mode completion,



:help ins-completion


hard drive - HDD shows up as "no data" on it and can't be initialized in Windows


I have a physically undamaged 2.5 inch HDD (Hitachi 5400RPM 320GB) when I connect it with an sata to usb convertor windows doesn't react on it. When I open the windows disk management software it shows up. With this messages:



  • No data


  • Not initialized



Googling gave me the results only in cases when you can create a partition but in my case it doesn't even show up as unallocated. Also I took of the PCB to clean the contact pads but nothing changed.
What could I possibly do to recover this drive? (Not the data just the functionality)


Answer



After dissembling the drive I saw that one of the platters was damaged. On the outer side (I think that important data to initialize correctly is stored there). There where several black lines that where scratches from a reading head that fell off. That again demonstrates that hard drives can't be diagnosed at home without harm for them. So to recover data I recommend don't even try to fix it yourself because you can cause data damage so that no company could recover it.


memory - How do calculate which RAM option would be faster?

I've been reading DDR and related info on wikipedia but am still not sure I know anything.



I have a Fujitsu Celsius w340 workstation with the following:





  • Memory Speed: 533 MHz

  • Memory Specification Compliance: PC2-4300

  • Dual Channel

  • Configuration Features: 2 x 512 MB



I have 2 x 512MB PC2-3200 sticks (which is what it came with) and I have a stick of 2GB PC2-6400.



Now I've replaced the two sticks with the one so that I have 2GB to run windows 7 and there's not really a problem. But in future I would like to know what I'm doing so I have to ask and can't figure it out.




Which is faster?



There doesn't seem to be any information on what "Memory Specification Compliance" is.



I also can't figure out if "Memory Speed" is the memory clock or the I/O bus clock, and I would be lying if I said I know exactly what either of those are. Is the I/O clock the FSB and is that what "Memory Speed" of the motherboard referring to?



And does the fact that my Windows7 installation is 32bit matter?



I know the PC2-6400 is theoretically twice as fast as PC2-3200 but would the 6400 be operating at it's full potential or would the advantage of Dual Channel on the two 3200 sticks outperform it?

Is is normal for Windows 8 Build 9200 to report "You're using a prerelease version of Windows 8"

When you encounter a compatibility warning, you're redirected to a help topic for more information.



On my Windows 8 Pro x64 RTM, downloaded from MSDN and installed as an in-place upgrade on Windows 7 Ultimate x64, the compatibility help shows




You're using a prerelease version of Windows 8.





when you expand the "What version of Windows as I using?" link.



enter image description here



Is this normal and expected behavior (something that Microsoft neglected to update during the release cycle) or is there something wrong with my install?



enter image description here
enter image description here

windows - How do I troubleshoot random rebooting?


For the past couple weeks, my PC has started having an issue where it randomly reboots. These reboots have happen 1-2 times a day, and have so far always been when I am away from it.


There isn't any discernible patterns I've seen from the reboot timestamps. I've thought it might be related to the power supply going bad, but it is fairly new. Also the fact that it is not rebooting under load, but rather while Idle, seems like it shouldn't be a PSU problem?


I also upgraded to Windows 10 the other day, expecting that to possibly affect/fix the issue, but it still happens regardless.


Here are the two events always generated by the reboot -


http://i.stack.imgur.com/NlWkn.png


http://i.stack.imgur.com/gURa8.png


enter image description here


Is there any way to further debug/troubleshoot what exactly is causing the reboots?


Answer



To be entirely honest, stop error 0x0000001a is not good at all, as Windows has encountered a serious Memory Management error. I would suggest to start out by booting the Memtestx86 CD to see if your RAM is bad.


worksheet function - How do to underline rows in excel based on unique data?

I'm trying to automatically underline certain rows based on unique project IDs in column 1. Please see example table attached. Each Project ID may have different number of rows associated each time and i want to separate every project with a bottom line but not every row. I have been trying to figure out the correct formula to enter under conditional formatting. Many thanks



Example table:

partitioning - How to repartition my drive for dual booting Ubuntu and Windows


I need to repartition my drive so that I can dual boot windows and Ubuntu. I have an older laptop so I need to have the kernel in a BIOS accessible partion. With my current partition layout as done by ubuntu's dual boot default setup:


Drive layout
/dev/sda1 -ntfs 128GB -boot
/dev/sda2 -extended 170GB -lba
/dev/sda5 -ntfs 167.59GB
/dev/sda6 -ext3 2.33GB
/dev/sda7 -linux-swap 172MB

I get a Grub error 18 indicating that Grub can't access the kernel.


What should I move where using GParted?


Answer



In order for your older BIOS to find your kernel, it must be within the 137GB limit, which is the first 137GBs. Your current setup has the only ext3 partition much past this. As others have noted, you are really going to be space-starved once you get to the Ubuntu install anyway. My suggestion is to shrink the size of /dev/sda1 by 15-20GB, and make a /dev/sda3 which is inbetween /dev/sda1 and /dev/sda2. This should be your new root partition for Ubuntu.


Wednesday, August 30, 2017

power supply - Can you plug-in the battery while laptop is on AC only?


I'm using my laptop at home with battery removed and only connected to the AC power. However I'm lacking the mobility as my power cord is kinda short. Is it safe from electrical point of view to plug in the battery while the laptop is connected to AC and disconnect the AC power afterwards?


What about the opposite side of the question - is it safe (or what the damage could be) if you work on battery, plug in the AC and unplug the battery?


If there are differents for different models of laptops, I'm asking about IBM Lenovo T60. Is there such thing as a 'hot-plug battery'?


Answer



Most laptops have hot-plug batteries, which allows you to go to line power for a few moments so that you can swap out your nearly-dead battery for your fully-charged spare. I see Lenovos as being no exception to this.


Unable to burn .iso using Windows Disc Image Burner (Error code: 0x80004005)

When I try to burn a disc image file using Windows Disc Image Burner the burning fails and the Status says "The disc image didn't burn sucessfully because an error occured (Error code: 0x80004005)".


I am using Windows 7, with a Dell Latitude 6250. The DVD Disc I'm trying to use is a Tayo Yuden DVD+R, and the image file was made with imgburn and is 4.11 GB in size.


I tried previously to burn a file folder to this same type of media, and although it burned, part of the disc was unreadable by windows 7. Thus, I've tried creating an .iso and burning it as an image with Windows Image Burner, so that afterwards it could be MD5 checksum verified.


If there are other details needed to answer this question please let me know and I will edit this post with them.


EDIT 11/27: These are unused media. IMGBURN completes verification sucessfully, and I've tested the disc it makes and it seems to be good (but how can I md5 checksum check it?)

usb - Broken hard drive



I have a tower PC that recently had a boot error stating that the hard drive could not be read. When the computer starts up, you can hear the hard drive spinning up normally, just as it had in the past. The computer still says that it can't be read. There are a lot of files that I need to retrieve from this hard drive even if it is permanently broken.



The hard drive is SATA so I decided to buy a SATA to USB converter and a power supply so I could view it on my iMac. I have received the converters in the mail, but when I plugged the power in, the cables got really hot really quickly and the hard drive never turned on. You can feel them heat up in just a couple seconds and smell of the plastic in just a few more. I had it plugged into the computer as well via USB. Im not sure that the wires came in the mail in the correct order because they are twisted as shown: The power end on the left and the hard drive on the right. The part on the power end that is the adapter gets very hot as well as the top black and red wires. Are the wires in the correct order or not? After looking online, I am still not sure. Also, this diagram is with the hard drive circuitry side up.




The adapter kit that I purchased from Amazon can be found here and looks like this:



Photo of adapter


Answer



You can see from multiple images like this one from Sierra-cables.com



molex to SATA power adapter



that the proper order for the connection to the drive is indeed yellow-black-red-black, or 12 VDC, ground, 5 VDC, ground.




You can also see from the order of the wires from the molex connection that there is that same red-black swap, because a standard molex connector is as shown: 12 VDC, ground, ground, 5 VDC. From the customer images on the Amazon page, the power supply has a standard Molex connector at the end, and the kit includes a standard molex to SATA power adapter, just like that one in the image.



So, there's nothing wrong with the diagram you provided, or the parts in the kit. Let me rephrase. There's nothing wrong with the parts in the kit, provided that none is damaged.



As to why you are getting the excess heat, it is most likely because the drive is damaged due to a blown component on its PCB. Feel free to test the USB converter power supply with your multimeter to determine if it's putting out the correct voltages, but I suspect that unless it's damaged, it's putting out the power it is supposed to.



At this stage of the game, you are most likely going to be put in the position of giving up hope of recovering any data, unless you want to ship the drive off to a Data Recovery Service, which isn't cheap by any stretch of the imagination.


Tuesday, August 29, 2017

How to make Windows 10 Media Creation tool finish & not disappear

When running the Windows Media Creation tool it seems to disappear and not finish. How do I get the tool to finish and complete the upgrade from windows 8.1 to windows 10 on my computer?




The steps I take are to:
Run the tool
Choose upgrade my pc
then the Downloading Windows 10 completes ( takes a bit of time )
Then it completes the Verifying Download ( relatively quick )
Then when it goes to Creating Windows 10 media it will get halfway and
Then the window disappears
I've had this happen over 5 times now. I've tried clean booting also.




How do I get the tool to complete and upgrade my pc to win 10?



Thank in advance for any info.

linux - Grub help, deleting partition without deleting grub

I have a triple boot windows 7, ubuntu 10.10, ubuntu 11.10 and i want to delete the partitiion containing 11.10 but that's where my grub is located I believe. Because it updated to grub 1.99 when I downloaded installed 11.10. How can I change this so that even after the partition is deleted I can use grub.

windows 7 - Computer screen glitched, can't boot normally


When I was using my laptop, my screen went crazy and I got BSOD.
Now I can not boot it normally but can boot in Safe Mode & Networking (haven't tried Command Prompt one).


I've tried System Restore, last known working state(?), uninstalling and reinstalling video driver but still no luck. My device manager also seems OK. There are no yellow triangles or anything.


This is a screenshot taken with Snipping Tool


And these are what I see.


BSOD


Safe Mode Loading:
enter image description here


Browsing in Safe Mode:
enter image description here


I have no idea what happened or how to fix this. Hoping that you guys can help.


I am using HP Pavilion dv6 (around 6-years old laptop), Win7 64 bit.


Answer



You have a hardware problem, probably video RAM. Try a different, known-good video adapter.


If you can't (because it's built into the laptop), then you're now in the market for trying to find a compatible motherboard from eBay or alike, or just replacing the laptop.


Windows XP and folder sizes




I'm trying to find out the easiest way to check folder sizes to see how big each are. Why is it that when you view the folder details, the size never shows up? It was always blank. I have to highlight the folder to find out the size of its contents. What is the easier way to check multiple folders at one time?

macos - How to remove protection from a table cell?

I have an old Word 2007 file, which I already worked on for a while using Word 2011. Unfortunately I ran into the issue of a locked cell, which I cannot edit nor remove. Even the Edit / Cut functionality is deactivated once this cell is part of the selection.


It contains only a pull down menu, which is rendered without pull down functionality (it's not possible to select a different value).


The document is not protected. I already tried the Tools / Protect Document then Tools / Unprotect Document without any success.


How can I remove this 'protection'?

windows 7 - "This folder is shared with other people" when deleting not shared folder



After applying some .NET Framework updates (I installed .NET Framework 4.5 and MVC 4 from stand-alone packages), I got D:\934f8a71184fd47ed258f943 folder. When I attempt to delete it Explorer says:



This folder is shared with other people
If you delete this folder, it will no longer be shared.



enter image description here



although the folder is NOT shared.



What is going on?



The contents of this folder is:



DHtmlHeader.html

DisplayIcon.ico
header.bmp
netfx_core_x64.msi
netfx_core_x86.msi
netfx_extended_x64.msi
netfx_extended_x86.msi
netfx_Full_GDR.mzz
netfx_Full_GDR_x64.msi
netfx_Full_GDR_x86.msi
netfx_Full_LDR.mzz

netfx_Full_LDR_x64.msi
netfx_Full_LDR_x86.msi
netfx_Full_x64.msi
netfx_Full_x86.msi
ParameterInfo.xml
Setup.exe
SetupEngine.dll
SetupUi.dll
SetupUi.xsd
SetupUtility.exe

SplashScreen.bmp
sqmapi.dll
Strings.xml
UiInfo.xml
watermark.bmp
Windows6.0-KB956250-v6001-x64.msu
Windows6.0-KB956250-v6001-x86.msu
Windows6.1-KB958488-v6001-x64.msu
Windows6.1-KB958488-v6001-x86.msu
Windows8-RT-KB2881468-x64.msu

Windows8-RT-KB2881468-x86.msu
1025\eula.rtf
1025\LocalizedData.xml
1025\SetupResources.dll
1028\eula.rtf
1028\LocalizedData.xml
1028\SetupResources.dll
1029\eula.rtf
1029\LocalizedData.xml
1029\SetupResources.dll

1030\eula.rtf
1030\LocalizedData.xml
1030\SetupResources.dll
1031\eula.rtf
1031\LocalizedData.xml
1031\SetupResources.dll
1032\eula.rtf
1032\LocalizedData.xml
1032\SetupResources.dll
1033\eula.rtf

1033\LocalizedData.xml
1033\SetupResources.dll
1035\eula.rtf
1035\LocalizedData.xml
1035\SetupResources.dll
1036\eula.rtf
1036\LocalizedData.xml
1036\SetupResources.dll
1037\eula.rtf
1037\LocalizedData.xml

1037\SetupResources.dll
1038\eula.rtf
1038\LocalizedData.xml
1038\SetupResources.dll
1040\eula.rtf
1040\LocalizedData.xml
1040\SetupResources.dll
1041\eula.rtf
1041\LocalizedData.xml
1041\SetupResources.dll

1042\eula.rtf
1042\LocalizedData.xml
1042\SetupResources.dll
1043\eula.rtf
1043\LocalizedData.xml
1043\SetupResources.dll
1044\eula.rtf
1044\LocalizedData.xml
1044\SetupResources.dll
1045\eula.rtf

1045\LocalizedData.xml
1045\SetupResources.dll
1046\eula.rtf
1046\LocalizedData.xml
1046\SetupResources.dll
1049\eula.rtf
1049\LocalizedData.xml
1049\SetupResources.dll
1053\eula.rtf
1053\LocalizedData.xml

1053\SetupResources.dll
1055\eula.rtf
1055\LocalizedData.xml
1055\SetupResources.dll
2052\eula.rtf
2052\LocalizedData.xml
2052\SetupResources.dll
2070\eula.rtf
2070\LocalizedData.xml
2070\SetupResources.dll

3082\eula.rtf
3082\LocalizedData.xml
3082\SetupResources.dll
Graphics\Print.ico
Graphics\Rotate1.ico
Graphics\Rotate2.ico
Graphics\Rotate3.ico
Graphics\Rotate4.ico
Graphics\Rotate5.ico
Graphics\Rotate6.ico

Graphics\Rotate7.ico
Graphics\Rotate8.ico
Graphics\Save.ico
Graphics\Setup.ico
Graphics\stop.ico
Graphics\SysReqMet.ico
Graphics\SysReqNotMet.ico
Graphics\warn.ico



My system is Windows 7 x64 SP1.


Answer



This happens because of the way the Access Control List is queried by Windows Explorer to determine if the folder is shared. because this folder you tried to delete is a child folder of a parent folder and the two folders have a different security entries, Windows will treat as a shared folder. This causes Explorer to give you the warning that you received.


Monday, August 28, 2017

audio - Windows 7 dialog event sounds are not triggered


I recently found this issue in two of my home PCs.


All sounds, including system sounds, play normally with the exception of system sounds related to dialog windows, i.e. Asterisk, Critical Stop, Defalt Beep and Exclamation.


So far, I've ruled out problems with sound drivers and / or related configurations, as one of the affected machines uses a Sound Blaster X-Fi sound card with official drivers and the other uses onboard sound. Also ruled out corruption and integrity problems with system files by running System File Checker.


I've also checked the sound cpl and everything seems okay. In the "Sounds" tab, all the sounds play when clicking on "Test", even the affected ones. In the registry, all the mentioned sounds are correctly associated with the respective events in AppEvents, for all schemes. It happens with all the sound schemes, thus it's not a problem there either. New user accounts are also affected by the problem.


That had me thinking that it was something to do with a misconfiguration on my part, however, as referred, it only happened on two of my PCs, and only recently.


Does anyone have this problem or can help me solve it / troubleshoot it? I really don't know what's going on.


Thanks


Answer



Well, I think I found out what was going on. It seems that was due to some kind of mess somewhere in the OS audio stack.


The only thing the two offending systems had in common was the simultaneous use of DirectSound, WASAPI and ASIO. ASIO was interfacing directly with the Creative drivers in one of the machines, the other one was using ASIO4ALL. After dropping ASIO everywhere, sticking with WASAPI for exclusive mode and setting the sampling rate globally (both in shared mode and exclusive) to 48kHz, the system sounds can be heard again. Although this solution is not ideal (mainly due to the constant sampling rate of 48kHz), it solved the issue.


Disable Windows 10 language popup

Is it possible to disable the popup list of input languages at the bottom right corner when having Alt+Shift pressed in Windows 10 version 1903?





I do not want to disable the Alt+Shift hotkey
(or Ctrl+Shift for that matter) or the ability to switch languages; I just want to switch off this popup that was introduced in build 1903.




I've tried turning off the language indicator
The indicator turns off, the popup stays.



To add insult to injury, the popup often appears when I'm not even going to change the input language. 
E.g., I'm editing text in a text editor, actively using Ctrl and Shift to select and move blocks of text, and the language popup keeps appearing.

internet explorer - Get "Java Update Needed" message back

I have a user who clicked the wrong thing on this Java message:


Java Update Message


He checked the checkbox and now I don't now how to get this message back.


I tried deleting the IE and Java cache and I restored the security prompts (for Java) but the message doesn't appear anymore.

How to stop Windows 7 from applying patches on shutdown




I have my Windows 7 Pro set up to "download patches, but let me choose when to install them". However, on several occasions, when I have shut down the O/S, Windows Update has proceeded with a lengthy patch application even though I issued no permission to do so.


This is a bit scary to me... in particular, it seems I cannot trust the Windows Update settings. Is this official policy somewhere at Microsoft, or am I witnessing a bug? What can be done about it?

linux - HGST hard drive SMART reporting drive failure in less than 24 hours from 1 reallocated sector

It says the worst was 1 Reallocated Sector Count and the current is 1 with 5 as the threshold. That's from smartmontools. Ubuntu's gnome-disk-manager says almost the same thing but shows the current value at 0.


No other attributes show failing status.


When I noticed this a few days ago, i reformatted a few times as ext4 with read-write test and an area did show up with maybe 30 bad blocks. However, retesting today, i find no bad blocks at all.


So anyway I'm confused.

Sunday, August 27, 2017

power management - Windows 7 Aero theme when on battery


Windows 7 has the full and basic Aero themes that can be changed inside personalization. Windows used to automatically disable Windows Aero (transparency) when I unplug my laptop from the mains.


I reset the theme, and now it doesn't do this anymore. How do I enable this again?


I've checked the advanced power options and control panel but turning back on this feature is eluding me.


Answer



This is how I got it working.



  1. Change the power profile to "Power Saver" (How to: Right click on the battery icon on the desktop > select "Power options" > Select "Power Saver")


  2. Unplug the charger and then go to "Personalize" (right click on the desktop select "Personalize ")


  3. Click windows color > switch OFF "Enable Transparency"


  4. Save changes and exit "Personalize"


  5. Plug in the charger and then go to "Personalize" (right click on the desktop select "Personalize")


  6. Click windows color > switch ON "Enable Transparency"


  7. Save changes and exit "Personalize"



I think this should solve your problem.


disk space - windows folder size more than 30 GB

I am using windows 7 with 8GB RAM for last 8 months, C drive of 75 GB currently out of space, 8GB Page file (on auto manage) and 8GB hibernate file, i checked windows folder is of more than 30 GB. is it fair amount of size and how can i clear some space.


Recyclebin is empty, C Drive protection is ON and is consuming 5.7GB only (i wanna keep it max limit is 8GB) and i have installed Visual studio 2013 and MS SQl Express 2012 and Ms Office 2010.

Windows 10 Pro Fall/Creators Update (1703 & 1709) losing local admin password or account after joining domain

We are on a Windows Server 2008 R2 domain (planning to upgrade to 2016) and have recently starting having trouble with the local admin account losing its password and, more recently, disappearing altogether. We also have a GPO policy that enforces the default admin account to have "Password never expires" and "User cannot change password" enabled.



Starting with Windows 10 Creators Update (1703), I started finding computers where the local admin account had no password. At first, this escaped my notice, thinking that I somehow neglected to give it a password, but I started noticing it more often and realized it wasn't just me spacing off on a repetitive task (besides, standard Windows setup walks you through that step, so it would take extra effort to skip it). The common thread is that these were machines that were originally setup with a fresh install of Windows 10 1703--machines that were upgraded from an earlier edition to 1703 are not having this issue. Now I am starting to set up machines with Fall Creators Update (1709) and there is a new twist: it may also delete the local admin with or without also obliterating its user folders as well.



In my third re-install of 1709 on a particular machine, I took careful notice of what was happening and when. When you first install 1709, the primary user (we set up as default local admin) account and password is fine. Upon joining to 2008 R2 domain, the password disappears and the machine will not allow you to check BOTH "user cannot change pwd" and "pwd never expires," giving a message that "This operation is disallowed as it could result in an administration account being disabled, deleted or unable to logon." Having re-entered the password and leaving "User cannot change pwd" UN-checked, everything seems fine. It appears that it's specifically the "User cannot change password" that creates the conflict. The biggest problem is that the password gets erased or the account gets annihilated without any notice whatsoever.




Has anyone seen this and have a solution? What changed in 1703/1709 that may be causing a conflict? Is it just the combination of Server 2008 R2 and Win10 1703 and later?

Saturday, August 26, 2017

windows 7 - Win7 64bit Ultimate, occasional video crashes

I have occasional video crashes.
My Video will go black but retains sound.
Sometimes I get alarm or video freezes and the occasional BSOD.
I Ran Driver Verifier to try to figure out if it's a driver conflict.
But--I'm clueless as to what I'm looking at with the log file. (Using BlueScreenView to look at dump.)
I have a Win7 64bit Ultimate
HDMI 32" tv as monitor
AMD Radeon R7 260X 2gig GDDR5.
Any help would be greatly appreciated.





070518-20280-01.dmp 7/5/2018 12:01:23 AM
SYSTEM_THREAD_EXCEPTION_NOT_HANDLED 0x1000007e ffffffff80000003 fffff80002f0d178 fffff8800407d5f8 fffff8800407ce60 fltmgr.sys fltmgr.sys+1a960
Microsoft Filesystem Filter Manager Microsoft® Windows® Operating
System Microsoft Corporation 6.1.7600.16385
(win7_rtm.090713-1255) x64 ntoskrnl.exe+ab177
C:\Windows\Minidump\070518-20280-01.dmp 4 15 7601 275,856 7/5/2018
12:03:06 AM


malware - Windows 10 Disk Usage at 100% but no corresponding process shows in task manager

Over the past month (possibly more), I have noticed that my laptop (running Windows 10) frequently becomes almost unusably slow, especially after many days of not having turned it on.


I notice that the disk usage in the task manager is at 100% for long periods of time, however this is ridiculous because even the sum of all the processes [that I can see...] could only approach about 5-10% in the generous case.


This is a development machine with 8GB RAM, i7 processor, plenty of space. There are almost no startup programs other than MS default programs (and even there I culled most of the non-essentials out of the startup list). I have also gone through and progressively disabled services such as BITS, Superfetch etc. to no observable effect.


What makes this more suspicious is the pattern in which it occurs - the issue is worst at startup after many days of the computer being physically disconnected and turned off. The startup time is around 3-5 minutes (!) after which the disk runs at 100% usage for a few minutes and then for no explicable reason, suddenly drops down to around 1-5%. All this without showing any processes near full disk usage.


After around a month of investigating this, I am beginning to suspect the involvement of malware, particularly because of the discrepancy in the task manager but also because of how the issue suddenly corrects itself. I should also note that the computer runs AVG Free edition and scans of the computer and anti-rootkit are coming up clean. That being said, I want to pursue the possibility that this could be malware connecting and updating itself, or even worse, exfiltrating data [or even worse, chewing my disk to encrypt my files while telling me everything is OK]?


Currently I do not observe an irregular amount of network traffic which would support the exfiltration theory, however it is also possible to hide this from the task manager / wireshark using a rogue driver.


I have a number of questions:



  1. Does this pattern of behavior fit any known malware / APT threats?

  2. Supposing I were to continue this into the forensics direction, what further steps could be taken to investigate and validate the drivers on the machine?

  3. What steps beyond task manager can I take in order to monitor and identify the process which is actually responsible for the 100% disk usage?

  4. Are there any legitimate / Windows reasons this might be occurring and if so, how can I narrow down and isolate the problematic components?

Screen flicker after booting Windows

The problem I'm experiencing is that when I boot Windows, when I reach the login screen, my display starts flickering/flashing. (Basically it turns entirely grey or black about once or twice per second.) It also seems to freeze my PC temporarily; while the screen is grey I cannot move the mouse cursor or otherwise interact with Windows. I'm forced to restart my PC and try again. Usually I get lucky after 3-4 restart attempts. When Windows boots into the Advanced Startup Options menu and I select "Continue" (which is Microsoft speak for "reboot"), it almost always boots without the flickering and I'm able to use my PC.


To clarify: The flickering only happens immediately after booting, at the login screen. If it doesn't occur then, it won't occur later either and I'm safe until I reboot. I can even log out and back in without any risk.


I think the problem is related to my graphics driver (AMD), because it (almost) never occurs if I uninstall all AMD software. However, the problem still exists if I install an older version of the graphics driver (one that used to work before this issue appeared), so I'm not 100% sure.



  • Flickering either occurs at the login screen or doesn't occur at all

  • Sometimes the flickering starts automatically, other times it begins when I interact with the login screen (by clicking or pressing enter)

  • Flickering almost never occurs when booting from Advanced Startup Options menu

  • Flickering hasn't occured in Safe Mode so far Flickering can occur even in Safe Mode.

  • Not sure if relevant, but often after a successful boot, some of the icons in my task bar notification area do not render

  • Flickering is limited to Windows; nonexistant on linux (just in case anyone thought it was a hardware problem)

  • In order to test if the flickering exists, I have often rebooted my PC without doing anything - boot, login, reboot, login, reboot. This usually let me boot without any problems, which made it difficult to test if a "fix" worked or not. I'm starting to think that the flickering only occurs if I've actually used the PC before rebooting - maybe I have to start a certain program for it to occur?



  • Disabled "AMD External Events Utility" service

  • Disabled "Windows Error Reporting Service" and "Problem Reports and Solutions Control Panel Support" services

  • Disabled all non-windows services

  • Reinstalled graphics driver

  • Installed older graphics driver

  • Disabled graphics card (through device manager -> right click -> disable device)

  • Reinstalled Windows (multiple times, but the issue existed every single time)

  • Turned on automatic login to bypass the login screen. PC then boots into a black screen instead.


What can I do to fix or further diagnose this problem?

microsoft word - Is it possible to create a spreadsheet from a chart Excel

Exactly as the title says, is it possible to take a chart from say, Word, and then create a spreadsheet of its data in Excel. Specifically, I am asking in regards to 2016 for both.



For a bit of context, if it helps in any way. I lost the spreadsheet with the data for a Gantt Chart and didn't have any backups. However, I had it in a word document as an imported chart, not an image.

windows - Shell script that monitors CPU usage and terminates services with high CPU utilisation


We have a Windows 2003 server where 3 services are running constantly. Sometimes these services consume over 90% CPU. Restarting these services returns normalcy. I need a script/program that will constantly monitor CPU usage and if usage is high then restart those services.


After a bit of research I found this script to monitor CPU usage from Technet.


Script to monitor CPU usage:


(get-counter -Counter "\Processor(_Total)\% Processor Time"
-SampleInterval 1 -MaxSamples 10 |
select -ExpandProperty countersamples | select -ExpandProperty
cookedvalue | Measure-Object -Average).average

This monitors the CPU usage for 10 seconds and then displays the averaged output.


Also from Stack Overflow and Server Fault I found the scripts to restart Windows services. (Which one is better?)


Now all I need is for the CPU usage script to call the service restart scripts when the condition that usage is >90% is met. Any help would be appreciated.


Answer



Just for the record..here's the answer:


$cpuutil=(get-counter -Counter "\Processor(_Total)\% Processor Time" -SampleInterval 1 -MaxSamples 5 |
select -ExpandProperty countersamples | select -ExpandProperty cookedvalue | Measure-Object -Average).average
If ($cpuutil -ge 90)
{Restart-Service MyService1, "My Service2", MyService3}
Else
{Exit}

Powershell truly makes life simpler!


Friday, August 25, 2017

My Windows 7 64 bits is choppy. How to make it work?


I got last summer a Toshiba Qosmio laptop with Windows 7 64 bits preinstalled. It just works very poor. It feels... choppy. Compiling a large program 4-5 seconds. All programs are less responsive.


On Windows 32 it takes 1.5 seconds. It seems to be because it takes quite a while until the CPU frequency switches from low power state to 100%. Is this a know problem with all 64bit OS?


Initially I worked with the software/drivers preinstalled by Toshiba (an believe there were few GB of garbage preinstalled). Then I reinstalled and I put only the (minimum set of) drivers and no garbage utility software.
The laptop is as choppy as before.


Answer



I switched to Win 7 32 bits and everything works smooth now.
I guess we will have to wait until MS optimizes this (relatively) new 64 bit OS.


How to prevent Windows 10 waking from sleep when traveling in bag?


I am not turning laptop off, but rather putting into hibernation, as it starts much faster and I can continue working without starting all apps again.


It was working long time from Windows XP to Windows 8.1.


However now (after upgrade to Windows 10), when I just take my laptop out of the bag after a travel, it was quite hot. I've realized that it is turned on.


In the event log I have found that it was installing updates and before that there was the following log:



The system has returned from a low power state.


Sleep Time: ‎2015‎-‎08‎-‎16T12:55:18.180075900Z Wake Time:
‎2015‎-‎08‎-‎16T12:55:17.852758500Z


Wake Source: Unknown, but possibily due to timer - Windows will
execute 'NT TASK\Microsoft\Windows\UpdateOrchestrator\Reboot'
scheduled task that requested waking the computer.



When I located the task above in the task scheduler, it has trigger in that time, however the "last run time" is day before. So I do not know what to believe "last run time" or the wake source from the event above?


How to find out what is waking the computer from the hibernation (it is possible?) and how to prevent it?


Answer



This has worked for me so far. Go to:


Control Panel\Hardware and Sound\Power Options\Edit Plan Settings


Click "Change advanced power settings"


Go to "Sleep->Allow wake timers" and change the setting to Disable.


power options screenshot 1


UPDATE: As Erik pointed out, there can be two options:


power options screenshot 2 with 2 options


Disable them both.


Disable "Remember my credentials" on Windows 7 Home Premium


I would like to disable the ability to save network passwords (when connecting to \computer\share) on Windows 7 Home Premium.


password prompt


On Windows XP there was a registry setting to disable the checkbox "Save password" for network shares:


Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\Lsa]
"disabledomaincreds"=dword:00000001

However on Windows 7 it doesn't work.


It is written that you can disable it in GPO in the following place:


\Computer Configuration\Windows Settings\Security Settings\Local Policies\Security Options

However GPO is not available on Home Premium. I know you can hack GPO onto HP, but I would like to have a simple reg setting for this policy.


Do you know what is the reg value for the above setting?


Answer



I realize this is an old question, but I just faced a similar problem. On Windows 7 Pro, you can prevent the credentials from being saved by setting


HKEY_LOCAL_MACHINE\SYSTEM\ CurrentControlSet \Control\Lsa\disabledomaincreds


to 1. Maybe using the setting in ControlSet001 was your issue. However, this won't "disable" the check-box, it will just make it useless.


Thursday, August 24, 2017

ubuntu - what to use instead of laptop-mode?




I have Ubuntu 10.10 64-bit on HP 6735s (turion processor). it overheats, and i'm forced to use turion power control in order to keep core temperature to a reasonable level.
one more measure that i use is putting my processors to conservative mode. that way, i'm perfectly happy with its performance, and heat is where it should be.



however, after my latest upgrade, something happened - cores are back to on demand by default, and I'm not sure if turion power control is working any more (ps axu | grep urion shows no process). in addition, i read somewhere that laptop-mode uses hdd spindown for preserving data/energy, and that hdds have only a limited amount of those spindowns, so laptop-mode usage can actually shorten the life of my hdd.



I'm wondering if there is a good way to set my cores to automatically go to conservative mode? also, what's the good way to see what is the voltage my cores use? on windows i use cpuz tools.


Answer



I use the cpufrequtils package to do similar things. I generally tend to leave the governor set to ondemand and limit the upper bound of processor speed. You can, however, also change the governor using these tools.


Relation between RAM usage in Task Manager Processes and Performance

Is the amount of ram shown in the performance graph, 5.5 GB in my case :


enter image description here


the sum of the ram used by programs shown in processes :


enter image description here


Somehow I find it hard to believe that those 6MB will amount to 4GB and when I close firefox for example it seems the graph in performance falls down by much more than 830MB.


Is it just an impression, or are the values in Task Manager/Processes systematically lower than real usage ?


Edit.: Here is also the RAMMapp. Paging file is still disabled.


enter image description here

Missing disk space in Windows XP

On my mother's Lenovo laptop, Windows XP claims that the hard drive is almost full. According to the properties window, 52.7 out of 55.2 GB is in use:


Drive C properties


By deleting temp files from Internet Explorer, System Restore, Recycle bin, Windows Update, System Cleanup, I managed to free up about one GB. That's still > 50 GB in use, which still is a lot more than I expected. Hence, I gave good old WinDirStat a spin, and here's the output:


WinDirStat


It might be hard to read here, but the first line says that the total amount of disk space in use on drive C is 24.3 GB. So Windows claims usage of 52.7 GB and WinDirStat can only account for 24.3 GB. Where is the other half of that disk space being used?


I hope someone has an answer, or some tricks or tips to do further research.




UPDATE: The laptop in question has an SSD hard drive. I am aware that these disk (at least the earlier ones) have a limited life-time. Could the symptoms described be caused by wear and tear on the SSD?

How to find and replace line(s) in multiple files using Notepad++?



I have been messing with notepad++ for a bit now and am confused as to how to go about doing this:



I have a line in multiple files (Within a root directory) that I am searching for. Example:




Brittany (File 1)
PeopleSleptWith 2
Tiffany (File 2)
PeopleSleptWith 4
Bonqueesh (File 3)
PeopleSleptWith 3456
.
.
.



My goal is to replace all of the PeopleSleptWith lines with a constant (I.E. PeopleSleptWith 7) but when I search and replace in multiple files, it does not remove complete line, which results in:



Brittany (File 1)
PeopleSleptWith 7 2
Tiffany (File 2)
PeopleSleptWith 7 4
Bonqueesh (File 3)
PeopleSleptWith 7 3456



When in reality I want:



Brittany (File 1)
PeopleSleptWith 7
Tiffany (File 2)
PeopleSleptWith 7
Bonqueesh (File 3)
PeopleSleptWith 7



So how do i go on about finding a string, removing everything within that line, and replacing it with another string?


Answer



Using Notepad++ to find a string on a line in a file, and replace that entire line with the match with another string




Instructions



Open Notepad++ and press
Ctrl+F and then from the Find in Files tab options.




Now you'll...




  1. Put the string in the regex format of the Find What:
    ^.*(PeopleSleptWith).*$




    • The string will go between the "()" parenthesis just as shown above in #1



  2. Put the 5 spaces and then the Replace with: PeopleSleptWith 7 string


  3. Put the Filters: as *.* or *.txt or whatever you are replacing file type wise

  4. Put the Directory: where you want it to be (the root folder)

  5. Check the Regular expression option

  6. Select Replace in Files

  7. Check the file(s) and all should be correct now



    enter image description here





Wednesday, August 23, 2017

windows 7 - Can't shrink partition due to mystery file

My system came with win xp. I installed Win7 in a separate partition, volume E. That was a while ago. I don't need xp anymore and now I want to shrink the C partition so that I can grow E. I deleted most files from C but since the boot manager is there I'm not totally deleting the partition. However I cannot shrink the partition because of a system file that's at the end. FSUTIL reports that the file name is "$LogFile::$DATA". I can't find it using any method I know of, I don't know what it is, but I want to get rid of it. What is it, and how can I delete it or otherwise shrink the partition?
Here's what I have now:


pic1
pic2

Deleted Recovery partition on Dell XPS 13. Now unable to boot into windows 7


Mine is Dell xps 13 ultrabook shipped with windows 7. I thought of installing ubuntu, so I unknowingly deleted recovery partition, formatted it and installed ubuntu. Now ubuntu is working fine. But in grub, I am not able to see windows. So I followed this tutorial How to Manually Repair Windows 7 Boot Loader Problems - How-To Geek to fix my windows. But it didnt work


In second screenshot, Windows 7 option didnt appear. I clicked next and did Startup repair which didnt help and then went to command prompt to execute the two commands


bootrec /fixmbr


bootrec /fixboot


The first command executed successfully but the second command gave me an error "the volume does not contain a recognized file system"


How can I recover my windows . Please help. I need windows badly


Thanks!


Answer



Finally got the solution. In case if someone else also faces similar problem, here is the solution


1)Some times system repair may not work


2)Its because C partition may not be active - In my case atleast this happend - so fix is - First make it active - http://www.sevenforums.com/tutorials/71432-partition-mark-active.html


3)Now try system repair. It works :)


So be careful while deleting recovery partition. If you delete it, make the main partition active and then try system repair.


Thanks guys :)


I just shared all my dual booting experience here - in case - it can help some one - http://rajeshksv.blogspot.in/2012/10/how-to-fix-dual-booting-issues-windows.html


wordpress - GCP compute Engine SSH permissions Issue

Hi Everyone i've been banging my head against this issue all day and all the solutions seem to be tackling different SSH issues.



My goal is to connect using FileZilla sFTP into my Google Compute Engine. I'm running a wordpress site there and I need file edit access.



In Terminal When I run :




root@wordpress-1-vm:~# gcloud compute ssh wordpress-1-vm



I get this error:



ERROR: (gcloud.compute.ssh) Could not fetch resource: - Insufficient Permission



I'm using Root user, but I also get this with my personal User which has OWNER access.



What I've tried:




I have payment set up, no problems
I've checked my IAM settings, my user is an Owner. I also added Admin access to compute Engine
I updated the File Permissions to '777' Mentioned HERE
I also get this same error when using Terminal on my local machine, or browser SSH connection from google cloud

windows 10 - Why does installing GeForce GT 730 1GB graphics card steal RAM?

I just installed this card and now system memory says 4GB RAM (only 3.19 usable). Is it not using it's own one GiB of RAM?


I'm running Windows 10 32 bit OS. 64bit processor.


GeForce 6100PM-M2 Mobo


Resource Monitor says 833MB reserved....

Tuesday, August 22, 2017

Restore Windows 10 EFI boot entry


I used my computer to install W7 on a HDD (from a laptop, that didn't have a DVD drive) and it worked flawlessly. Except that when I removed that HDD (that I had just plugged there the time of the installation) and rebooted, I wasn't able to boot on my regular HDD. I went in the BIOS and saw that the Windows boot manager entry had disappeared.


I tried repairing it using bootrec but it didn't change anything. I also tried resetting the uefi firmware to factory settings, still nothing.


How can I get the entry back?


Edit: to be more clear, I am not using W7, I just used my computer to install W7 on another hard drive (it wasn't supposed to touch my main HDD) and somehow it managed to remove the UEFI entries of the W10 that was installed on another drive


Answer



Stupid me.


This fixed the problem:


bcdboot C:\Windows /s E: /f UEFI

I had already tried this some hours ago from a W10 live CD but it didn't work so I thought it wasn't worth trying again. But I tried again this time from a fresh W10 install USB and it worked.


How to delete an administrator account (Windows 8)?

I use Windows 8 with Windows 7-like GUI, classic shell


I have two administrative accounts: user and Administrator.


I am currently user


Control Panel\All Control Panel Items\User Accounts\Manage Accounts\Change an Account does not show "Delete" button:


enter image description here


I run cmd with administrative privileges and executed


net user Administrator /active:no


net user Administrator [/DELETE]


Both times I got "The command has completed successfully" message, but Administrator is still visible under Manage Accounts menu.


When I execute these commands again, I get the same message.

Can't delete directory under Windows 7

I want to delete a directory under Windows 7 from Explorer, but every time I do so I get an error window with the message "Could not find this item" and "This is no longer located in ...".


The file is not in use, I can change into the directory (it's empty), reboot doesn't help, clicking "Try again" doesn't help, deleting from CMD.EXE doesn't work. I cannot rename it as well.


What can I do to delete the directory?

windows 7 - How to delete $RECYCLE.BIN folder on external hard disk?



I have a $RECYCLE.BIN folder on my external hard disk that takes up space and contains files that should be deleted permanently. I know that I am allowed to delete this folder, but how do I do that?





  • I see the $RECYCLE.BIN folder and its files in Defraggler while it is defragmenting these useless (big) files.

  • However, the Windows recycle bin appears to be empty.

  • Doing a disk cleanup from the Properties-dialog of the disk shows the recycle bin as containing 0 bytes of data and doesn't remove those files.

  • I cannot see (and therefore not delete) this folder in Windows Explorer, not even when I can view hidden files.

  • I can't format the external hard disk as it contains lots of files I want to keep.

  • It is an NTFS-formatted external platter hard disk of a bit less than 1 TB.


Answer




In Windows Explorer's Folder Options dialog, along with ensuring Show hidden files, folders, and drives is selected, you need to ensure the Hide protected operating system files option is not selected.



1



This should show you all the Recycle Bin folders/files marked with +H and +S attributes.



You can get rid of the entire $Recycle.Bin folder if you're an admin user or via a Linux LiveCD, but Windows will recreate it once you delete some more files on the same drive.


Monday, August 21, 2017

hard drive - how can I restore deleted boot files of my HDD?

Few weeks back I tried turning on my old PC. After turning it on, I realized it was having blue screen problem, so I tried re-installing windows XP but installing in previous windows XP drive(C) failed as a result I installed windows in F drive.


After successful installation I booted my new windows from dual boot and started wiping data from C drive, at first I tried formatting C drive which failed then I started deleting individual files from C drive. During wiping I turned on visibility of system and hidden files and wiped everything from C drive (Including any files used for booting in C drive). Then after some minutes I restarted my windows.


From that moment on whenever I try to boot my windows it shows the following error:


"Boot failed: system halted"


After that I tried reinstalling windows XP via same USB boot stick but boot screen gets stuck at message:


press any key to boot from cd . . . (or something like that)


I also tried accessing my IDE HDD by inserting it as a slave in master slave formation in another PC; when I tried opening old HDD most of the drive won't open except one drive which opens but after several minutes of opening it and most of the times it either doesn't responds or responds too slowly.


How can I make this HDD to successfully boot up? Is there anyway I can restore those boot files?

command line - Windows 7 equivalent for ntrights.exe


What is an equivalent for ntrights.exe on Windows 7?


I need it to be able to be run from the command line.


Answer



You can still use ntrights from the Windows Server 2003 Resource Kit Tools. Although not supported naturally, many of the tools performs flawlessly (including ntrights.exe).


Proof: Microsoft TechNet (scroll down until you find the Tool table, including NTRights.exe as one of the tools that can be used).


Chart format corrupted or size is wrong when I copy from Excel 2013 to Word 2013

When I copy charts from Excel 2003 or Excel 2013 to Word 2013 the charts are corrupted:



  1. the fonts are too big so the titles and legend text is a mess.


  2. If I don't want the chart to update in Word when I change the Excel spreadsheet I have to copy as a picture. Then it comes across as much too large (off the page) and I have to scale every chart every time. It's time consuming and difficult to get all chart to be the same size.



How can I get around these problems?

How to make Windows 7 Explorer show files that live in %localappdata%VirtualStoreProgram Files?


I have an app that is writing a log file to its "Program Files" directory, like this:


C:\Program Files\SomeApp\blah.log

This is not my application, I have no control over how it runs or where it puts the log file.


Windows 7 file explorer does not show this file at all, even though I have selected "Show hidden files, folders, and drives" and deselected "Hide protected operating system files".


The file explorer does show the file if I navigate to:


C:\Users\svec\AppData\Local\VirtualStore\Program Files\SomeApp\blah.log

Apparently there's some mapping going on from "Program Files" to this VirtualStore directory.


The app's log file viewer can see the file in its "Open File" dialog in "C:\Program Files\SomeApp\", but it has a lock icon for the file.


How can I get Windows 7 File Explorer to let me see that file in "C:\Program Files\SomeApp\"?


Thanks!


Answer




How can I get Windows 7 File Explorer to let me see that file in "C:\Program Files\SomeApp\"?



You cannot, for one very simple reason: That's not where the file is. Only your badly-designed application thinks that it is there. Windows is trying to cope with the bad design of your application, and is relatively unobtrusively placing the file where it ought to be, in an application data directory.


This is not a Windows problem to be "worked around". This is Windows fixing up your application so that it actually works when used by non-administrators. This is an application problem, that you should be nagging your application vendor to fix. The people who designed your application mis-designed it in such a way that when the security hole of letting everyone have full access to the program image directory was closed, the application didn't work for non-administrators. Windows is trying to work around this mis-design for you, trying to make the application operate as it should have been designed to operate, rather than expecting to have administrator-level access to everything.


Don't re-open the massive security hole merely for the sake of getting Explorer to show you an application data file where it really isn't and should not be.


Sunday, August 20, 2017

windows 7 - Connection to Oracle database via Visual Studio Server Explorer crashes Visual Studio




I am trying to create an ADO.Net entity Data Model of an existing oracle 11g database, however I cannot even get past the step of Database Connection.



Every time I attempt to test the connection Visual Studio closes without any details as to the error. Just this screen



Error Image



I am using following:



Visual Studio 2010 Ultimate




.NET 4.0.3



Oracle 11g client



ODAC 11.2.0.3



Windows 7



Any help is appreciated. Thank you




EDIT :



This what I got from Event viewer of windows:



Faulting application name: devenv.exe, version: 10.0.40219.1, time stamp: 0x4d5f2a73



Faulting module name: oran11.dll, version: 11.2.0.1, time stamp: 0x4bb34692



Exception code: 0xc0000005




Fault offset: 0x0028deee



Faulting process id: 0x2020



Faulting application start time: 0x01cd5f6aa0a48f4f



Faulting application path: C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\devenv.exe



Faulting module path: C:\app\User\product\11.2.0\client_2\bin\oran11.dll




Report Id: c2394ba8-cb5e-11e1-8347-005056c00008


Answer



This occurs when you install the ODAC into an existing Oracle Home.The OCI.DLL in your Oracle_Home was locked during the installation and was not overwritten.The OCI.DLL is now old and out of synch with the other DLLs, hence the crash.



The easiest solution is to simply reinstall into a new Oracle_Home (directory). If you must use the same Oracle_Home name and directory, you will still need to delete the now corrupted Oracle_home and then reinstall, using the following steps:




  • Use the installer to uninstall the entire oracle home that is
    crashing.

  • Look at the home in windows explorer. oci.dll should still be there.


  • Rename oci.dll to oci.toanything.

  • Reboot machine.

  • Go back to windows explorer and delete all remaining files in the
    oracle home, including oci.toanything.

  • Install ODAC.



Hope it helps.


Command-line Resource Monitor for Windows?


On Windows, there's a GUI "Task Manager", and there's also a great little command-line "tasklist.exe" which lets me see most of the same data but in text that's really easy to parse from a script.


Is there an analogous command-line tool for "Resource Monitor"? I'm looking for something that will list global CPU/disk/network/memory usage, and/or per-process usage.


Answer



I think you are looking for typeperf. It should work for:



  • Windows Server 2003 - 2016

  • Windows 10

  • Windows 7

  • Windows Vista

  • Windows XP


An example:


typeperf "\Processor(_Total)\% Processor Time"

will log the processor time until you hit Ctrl-C. Adding -sc 5 will report 5
instances:


typeperf -sc 5 "\Processor(_Total)\% Processor Time"

Here is example for disk activity, total bytes per second:


typeperf -si 2 "\LogicalDisk(_Total)\Disk Bytes/sec"

Windows Performance Monitor Disk Counters Explained


What's a good, light, unintrusive and free tool to monitor network/internet speed for the Mac?


I need to know how much internet activity is taking place on my iMac. I don't want something very detailed like Little Snitch or some professional network analysis tool. I'm looking at something simple that can simply upload/download speeds in the Mac OS Menu Bar next to the WiFi and other icons.


If you've used DUMeter or NetMeter on Windows, you know what I'm talking about.


Answer



Found the answer from another question. iStat Menus and MenuMeters do what I need.


Thanks to @Sathya!


windows 7 - Move specific rarely used or non-performance critical files off SSD

I was trying to make some more space on an SSD boot drive today since it is getting very tight for space with C:\Windows stuff and applications that seem to insist on putting stuff on the system drive. The system has 1TB of HDD space as well.


Is it possible to move rarely used or non-performance critical files onto the SSD? Examples would be many of the system fonts (700MB), Windows\Installer files (20GB), certain things in the user AppData & and system ProgramData (e.g. do the F1 games really need 2GB replay files on an SSD, as long as the HDD can read/write at the required speed), etc, and some stuff that seems to demand C:\Program Files.


I was thinking perhaps some way to keep the directory structure on the SSD (well I guess it has to), but have the filesystem point to the HDD for the actual file contents (symbolic link?).

java - Setting JAVA_HOME on Ubuntu 10.x

I'm trying to get the Rhodes framework installed so I can develop Android apps.


This requires that I install the SUN JDK and add JAVA_HOME and JAVA_HOME/bin to path.


I thought I could solve this by editing my bash.bashrc file:



JAVA_HOME="/usr/lib/jvm/java-6-sun/jre/bin/java"
export JAVA_HOME
PATH=$PATH:$JAVA_HOME/bin



This still doesn't work, because when I run:



rake run:android



I get a prompt in the console that says the Java bin was not found in my path.


However, running echo $PATH gets me:



usernamee@ubuntu:~$ echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/home/username/ruby/gems/bin:/usr/lib/jvm/java-6-sun/jre/bin/java/bin:/home/username/ruby_files/android-sdk-linux_86/tools



What are my options here?


Edit: If the problem is not the export statement, how can I ensure that the Sun JDK is properly installed and that I am, in fact, pointing to the correct path in bashrc?

linux - wget terminates unexpectedly

I need to periodically traverse a site to update the server cache. It is a database driven site with very many (thousands of) pages. I use wget to mirror the site locally on the same server, so I use this command:


wget --mirror localhost


After some time it stops suddenly with this message:


HTTP request sent, awaiting response... Terminated


It happens always, but not on the exact same url. And I have tried on another server as well with the same result.


The --debug option does not provide any helpful information, nor does Apache's log file.


What could be the cause of this problem? I suspect some buffer running out of memory etc. Or a stack overflow.


Alternatively, are there other command line tools that can do the same?


It's Wget 1.11.4 on Debian Lenny.


Martin

Saturday, August 19, 2017

windows 7 - How to identify which unmovable files are in the way of shrinking a partition

I cannot shrink Windows 7 OS partition because of some unmovable files. I was wondering how to identify these files, so that I might be able to search ways to move these files elsewhere. I read this post, but don't understand how to identify. Thanks and regards!

Windows 7 - RCA audio to audio adapter

My monitor has RCA audio male inputs and my PC has standart audio input. I want to connect the PC and the monitor in order to use the monitor's volume.


I have not done this before, so what I am doing maight be wrong.


So, I have look trought all "strange" cables that I have in my PC box and there was no cable that can connect the PC and the monitor. A quick resarch in the internet point me to RCA to audio adapter, in my case "male to two males":


enter image description here


Unfortunatelly, this is still not doing the trick. Can anyone advice what can I try?


I am using windows 7.


EDIT 1:


My audio card is build-in (Intel G-Series).
My monitor model is LG M2752D LG.


I am able to use the an second RCA female adapter with 2 colons. So, I gues the problem is the monitor.


EDIT 2:


In the monitor tenichinal specifications is said:



Audio is catered for by two 5-watt speakers. There's an audio
mini-jack for inputting audio from a PC connected via VGA or with a
DVI-to-HDMI cable. Plus, if you use the component connection, two RCA
ports are on hand for the audio signal.



Firstly, I have try to do this using the RCA ports. As I was able to get sound using the other RCA female adapter with sound colons directly to the PC, I am pretty sure the issue is not due to the computer.


After that, I get one DVI-to-HDMI cable. I was able to get picture (only have to change the resolution) but again no sound. So, I guess the DVI-to-HDMI is working, I just have to do something other to get the sound working too.

windows 10 - PC won't wake up from sleep

The OS is Windows 10 with hibernation completely disabled through command line. Yet, the PC still won't wake up from sleep when Wake History Count more than 0.



When my computer goes to sleep for the first time since it was started, the led light on the tower is blinking and it wakes up perfectly upon mouse move or any key press. However, when the computer goes to sleep for the second time, the led indicator goes off and PC does not react to the keyboard or mouse. When I press power button the led light goes on, and fans start, but PC still won't wake up, neither by keyboard/mouse, nor power button press. I have to unplug it for some time in order to turn it on.



Here's the wake_armed command result:




$ powercfg -devicequery wake_armed
HID Keyboard Device
NVIDIA nForce Networking Controller
HID-compliant mouse


Here's power settings:



enter image description here




EDIT:



Here's the result of powercfg /energy test:



enter image description here

How to redirect all traffic except SSH to one local port with iptables


Host OS: Ubuntu 16.06 LTS
I have my server listening on port 1233. I have to redirect my all TCP and UDP traffic to port 1233 except the SSH port. I successfully redirected my all ports to 1233 with the following IPTable rules.


*filter
:INPUT ACCEPT [89:12442]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [114:10536]
-A INPUT -p tcp -m tcp --dport 22 -j ACCEPT
COMMIT
*nat
:PREROUTING ACCEPT [2:64]
:INPUT ACCEPT [2:261]
:OUTPUT ACCEPT [8:524]
:POSTROUTING ACCEPT [8:524]
-A PREROUTING -p tcp -m tcp -j REDIRECT --to-ports 1233
-A PREROUTING -p udp -j REDIRECT --to-ports 1233
COMMIT

I have also added a rule for the SSH port, but I could not successfully establish an SSH connection with my server because PREROUTING chains will execute first. After searching, I found a lot of questions that look related to this, but not a single one covered this scenario.


You might be wondering about the use case of this type of implementation. It's a honeypot server and our idea is to set up the honeypot to listen for all traffic except SSH. I know I could define a range of ports or use the multiport facility of iptables, but I have to redirect my all ports except 22.


Answer



My SSH was server listen at port 22. I got success with the following IPTables rules.


iptables -t nat -A PREROUTING -p tcp --dport 1:21 -j REDIRECT --to-port 5000
iptables -t nat -A PREROUTING -p tcp --dport 23:65389 -j REDIRECT --to-port 5000
iptables -t nat -A PREROUTING -p udp -j REDIRECT --to-port 5000
service iptables-persistent save
service iptables-persistent reload


Friday, August 18, 2017

Shadow Copy nightmares with Windows 7 + SSD




My backups act horrible. It will sit for 20 minutes, locking up the machine attempting to do a shadow copy. When I look at the event logs, it is loaded with the error:




Volume Shadow Copy Service error: The I/O writes cannot be flushed
during the shadow copy creation period on volume
\?\Volume{621eaee6-beb3-11e0-a305-005056c00008}. The volume index in
the shadow copy set is 0.



Error details:





  • Open[0x00000000, The operation completed successfully.],

  • Flush[0x80042313, The shadow copy provider timed out while flushing
    data to the volume being shadow copied. This is probably due to
    excessive activity on the volume. Try again later when the volume is
    not being used so heavily.],

  • Release[0x00000000, The operation completed successfully.],

  • OnRun[0x00000000, The operation completed successfully.].




Operation: Executing Asynchronous Operation



Context: Current State: DoSnapshotSet




I'm not 100% sure how to interpret this, but some sources online seem to suggest I expand the system partition from 100MB to 300MB. However, I couldn't figure out how to perform that operation. I'm pretty lost!!



I skimmed through this article and noticed that my C: boot drive is not marked as active (although my system reserve partition is). Does that have any bearing on things?



This is all occurring on my 120 GB Intel 510 SSD.




How can I perform a shadow copy/get this darned backup working??


Answer



The very first try should be to make sure that Windows is not right and confirm that your SSD is really idle. See the answers to this question for some suggestions (not the answer I posted there :-)



Secondly, try to disable your Anti-Virus and try again. Some AV programs can be so slow scanning files Windows thinks that the disk is too busy (we had one case with a program from a company starting with F-).



Finally, for a Windows XP I used the description to re-register all VSS components (as described here, for example). But I don't know if these components are still working for Windows 7.


hard drive - Laptop boots - Windows taking hours to load - unusable


I have a friend's Asus X54 L laptop that Windows 7 (64-bit) suddenly stopped loading correctly on.


Windows loads a little slowly to the login screen, I login, then it takes hours just to get to the background. The screensaver kicks in occasionally.


I can boot into safe mode just fine, but not with networking. Safe mode might be a little slow, but it is difficult to tell. Otherwise, it is usable and functional in safe mode. Safe mode with networking experiences the same slowness as a regular boot.


Would a dying HDD have symptoms like this? I have run chkdsk - all came back normal. Malwarebytes and SuperAntiSpyware quick scans in safe mode both came back clean.


I have turned off all startups in msconfig, and that didn't change anything.


I have run Windows Memory checker, and that also returned no problems.


I have run Autoruns but couldn't really see anything useful to me (not experienced with it though).


I have tried several system restores to no avail. There are 3 system restores available, 1 was automatic, 1 was related to the "Windows Module Installer", and 1 was from the "Language pack removal".


Finally, I have tried to load an Ubuntu Live CD (on my USB stick). I have done this successfully with many computers, but I get an error on this one most of the may through the loading sequence: Ubuntu Live CD Boot error


Specs:


Graphics: Intel integrated graphics


CPU: Intel Core i3 2.20 GHz


Ram: 4GB


OS: Windows 7 64-bit SP1


HDD: Hitachi HTS547550A9E384


Can anyone give me some suggestions as to what the problem may be? My reading suggests HDD going bad, but I hope for the opinion of someone with some expertise.


EDIT TO ADD: I also note the BIOS will not save my boot priority settings. I have 3 times now set it to boot to USB, then CD, then HDD. It has reverted every time to the default, which is reverse of that order. No idea if it is relevant, but there it is.


EDIT 2: As per XXL below, I have added some screenshots of my S.M.A.R.T. tool.
S.M.A.R.T. Health 1
S.M.A.R.T. Health 2


The two images above are the full view of the Health tab.


Disk Monitor


This image (above) shows Disk Monitor running for over 6 minutes.


Benchmark


This image (above) Shows the results of a benchmark test.


Random Access


The above image shows the results of a Random Access test.


I honestly don't know if these have helpful information, but this computer is not usable in it's current state. I appreciate any help I can get!


Answer



I have a solution! I had previously turned off all startups, but I had not turned off services. So I turned off all non-Microsoft services, and the laptop booted fine!


The last service in the list was the first one I turned back on, and it immediately would not boot correctly again. I turned that service off from safe mode - the laptop booted just fine again.


The offending service? "WRSVC", the service for Webroot SecureAnywhere. I have no experience with this program, but my research tells me it is at least a legitimate tool.


But that means the program only causes problems when the service is enabled. If I start the program manually after boot, it works fine. What would cause such behavior?


networking - Computer wakes up when called by ip

I have a Z97 motherboard from ASUS (windows 10), setup to work with wake on lan in uefi and windows settings:



  • In the uefi settings I enabled wake on pci express from APM settings

  • in windows, device manager, network cards, it's checked to only wake on magic PACKET, not pattern (pattern is disabled)


problem is, i can wake it up by simply calling the ip address


No wake on lan packets are sent. I just do a node js script that calls the ip of the computer and it powers on the pc


I did check with the powercfg utility to see if there are any armed devices and such, only the NIC is armed (which is should be for wol to work). also, -lastwake option doesn't say anything (wake history count - 0)


Other patterns that I noticed:



  • if I shutdown windows -> run script -> powers on by ip

  • if I shutdown windows -> turn off PSU -> turn on PSU -> run script ->
    DOES NOT power on by ip. it DOES power on by wol (which is good)


I'm thinking if maybe there's something wrong with how windows shuts down the computer? I did try the "complete shutdown" using a shortcut for "shutdown /s /t 0" with the same result though.


just for infos, the script i'm running is this, so nothing fancy:


var request = require("request");
request({
url: "http://192.168.1.9/",
body: "",
method: "GET",
timeout: 3000,
}, function(error, response, body) {
console.log('done');
});

not sure what else i could try

Thursday, August 17, 2017

windows 7 - Netbook won't boot after using EasyBCD

I have an Asus T91MT netbook on which I used to have Windows 7 Home Premium and Ubuntu 10.10 installed (dual boot).



After trying to upgrade to Ubuntu 11.04, Ubuntu is no longer able to boot, so I tried to uninstall Ubuntu completely and then reinstall it. Following these directions, I tried using EasyBCD to bypass the GRUB2 bootloader so that after uninstalling, it would automatically boot into Windows 7.



However, after doing the "install BCD" step and restarting, I got the following message:




Windows Boot Manager  

Windows failed to start. A recent hardware or software change might be the cause.
To fix the problem:

  1. Insert your Windows installation disc and restart your computer.
  2. Choose your language settings, and then click "Next."
  3. Click "repair your computer."

If you don't have this disc, contact your system administrator or computer
manufacturer for assistance.


  File: \Boot\BCD

  Status: 0xc0000098

  Info: The Windows Boot Configuration Data file does not contain a valid OS entry.


I'm currently trying to create a USB stick of the Windows Installation disc but in the mean time, I can only boot from a Ubuntu USB stick.



Is there anything I can do from within Ubuntu to fix this? Or does anyone have any other suggestions/solutions?

I have some sort of adware that isn't being detected by anything. What should I do?


This started happening a couple of days ago. It's a small and simple form of adware, but it's incredibly annoying. It linkjacks your results on google. For example, if I search for "jobs", the top result is Monster. But if I click it, I get sent to a random spammy site.


I have Microsoft Security Essentials' realtime protection on. I have run a full system scan with it, Avira, Malbytes, and Spybot. None of them pick up anything. There is nothing suspicious in my task list, and no unknown applications or services are starting up with my computer. I have no extensions for chrome running.


What can I do?


Answer



I would try running a scan for outside the OS in case u have a rootkit that could be hidding it self inside the OS.
Heres a link to AVG free bootable virus scan AVG Rescue CD


You could also try flushing your DNS by running the command "ipconfig /flushdns"


if nether of the to work try a system restore.


Last case scenario Back up, format and reinstall.


batch - For loop where the for variable contains parenthesis

I have a number of files that contain a line that needs to be deleted. These files are contained in subdirectories of a specific directory, and all files of a specific extension need to be iterated through and the line deleted. The problem I have is that the path has brackets and spaces, which seem to prevent the loop from working properly. How do you escape the path?


The code I have currently:


For /R "%ALL_BUT_FIRST%\bin\%1\Scripts" %%G in (*.csx) do (
echo %%G
findstr /V "texttoreplace" "%%G" >"%%G"
)

When not trying to write to the file, findstr outputs to the console the correct result perfectly. It is only writing the file that causes the .bat to fail with the error:


C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(5185,5): error MSB3073: The command ""D:\Users[username]\Desktop\Other projects (ie open source ones)\Freee\FrEee.WinForms\post-build.bat" Debug D:\Users[username]\Desktop\Other projects (ie open source ones)\Freee\FrEee.WinForms\" exited with code 1.

Wednesday, August 16, 2017

Irritating auto-changing column types in Windows Explorer in case of audio/video files


I have an empty folder with regular details view. File name, file size, file type columns are shown and I am happy.


Then I put some MP3 or WAV files in. Windows Explorer "kindly" changes the column types. It will show Genre, media length, Album and other metadata tags, but does not show the file size anymore. If I do not like it, I have to manually change the columns back. It is very irritating.


How can I turn this automatic behavior off?


Answer



You have to disable the "Automatic Folder Type Discovery" feature present in Windows Vista and later versions. (This solution is tested on Windows Vista, and probably works on Windows 7 as well. I'm not sure about Windows 8 / 8.1 / 10).


Perform the following steps:


Download this file and double click the REG file inside it.


In case the link goes broken, copy the following lines into a new text file, save it as "resetfolders.reg" and double-click it:


Windows Registry Editor Version 5.00
; Reset and delete all saved folder customizations and settings.
[-HKEY_CURRENT_USER\Software\Classes\Local Settings\Software\Microsoft\Windows\Shell\BagMRU]
[-HKEY_CURRENT_USER\Software\Classes\Local Settings\Software\Microsoft\Windows\Shell\Bags]
; Turn off Vista auto folder type template discovery.
[HKEY_CURRENT_USER\Software\Classes\Local Settings\Software\Microsoft\Windows\Shell\Bags\AllFolders\Shell]
"FolderType"="NotSpecified"
; Modify the storage space to 10000 for saving of up to 10000 folder settings.
[HKEY_CURRENT_USER\Software\Classes\Local Settings\Software\Microsoft\Windows\Shell]
"BagMRU Size"=dword:00002710

 1. Reset the folder options:



  • In Windows Explorer, click Organize -> Folder and Search Options -> View tab -> Folder Options -> Reset Folder

    • The above can also be done by removing the registry keys HKEY_CURRENT_USER\Software\Classes\Local Settings\Software\Microsoft\Windows\Shell\Bags and its subkeys and HKEY_CURRENT_USER\Software\Classes\Local Settings\Software\Microsoft\Windows\Shell\BagMRU and its subkeys.


  • go to Folder Options (Organize -> Folder and Search Options) View tab, and make sure the Remember each folder’s view settings is checked.

  • Close the Explorer window after changes to save the settings. Windows Vista will only remember the state of folders of the window is closed.


 2. Disable auto discovery:



  • Start Regedit, navigate to the key HKEY_CURRENT_USER\Software\Classes\Local Settings\Software\Microsoft\Windows\Shell and perform the following steps:

  • Right click on Shell in left pane, select New and then click Key.

  • Type Bags to create a key named Bags, and press Enter.

  • Right click on Bags that just been created, select New and then click Key.

  • Type AllFolders to create a sub-key named AllFolders, and and press Enter.

  • Right click on AllFolders that just been created, select New and then click Key.

  • Type Shell to create another subkey named Shell, and then press Enter.

  • Select Shell key that just been created, and then right click on an empty area in the right pane, click on New and then select String Value.

  • Type FolderType as the value name, and press Enter.

  • Right click on the Folder Type and click Modify or simply double click on FolderType.

  • Type NotSpecified as its value data.

  • Click OK.


 3. Increasing the BagMRU Cache Memory Size



  • Run Registry Editor (regedit).

  • Navigate to the following registry key: HKEY_CURRENT_USER\Software\Classes\Local Settings\Software\Microsoft\Windows\Shell

  • If there is not a BagMRU Size value, right click on a blank space in the right pane, then select New, and then click DWORD (32-bit) Value. Then, type BagMRU Size as the value name.

  • Double click on BagMRU Size key just created, and then enter 10000 (in decimal base) or 2710 (in hexadecimal base) as its value data.


(source)


extended desktop - Three displays (1920x1200) with one graphics card

I'm using a Zotac GTS250 with two 1920x1200 28" monitors in extended desktop mode.



I need an additional display, so I'm going to buy one more 1920x1200 28", but since GTS250 doesn't support more than two displays, I need a slight upgrade.




The best solution for me is a new graphics card - I'm thinking of an AMD 6850 XFX 1024MB, with two DVI, one HDMI and one DP. I don't need Eyefinity, I just need three displays with the same maximum resolution of 1920x1200 working in extended desktop mode. However I looked on the AMD website and found out that Eyefinity requires at least one display connected through DP, and there is no information about three displays without Eyefinity. Since my displays are DVI and HDMI only, I need a dongle, which is unavailable in my country and I don't have time to wait for its delivery.



Can I use the 6850 with three 1920x1200 displays, connected via DVI-DVI-HDMI? Is there any alternative solution in this situation (three DVI/HDMI displays)?



A second graphics card is not a solution currently because the second PCI-E port on my motherboard works in 1x mode. Would it be a possible solution to use two different graphics cards to solve my problem? I mean, I actually can buy a new motherboard if there is no chance to connect displays. As I said, DVI-DVI-HDMI.

keyboard - Synergy: how to forward same keystroke to client and ALSO to server?

I've installed synergy on two different machines... now I need to type one key in the server in order to obtain an action both in server and client (i.e. left and right arrows to control two different powerpoint presentation simultanously on the 2 machines).
I've configured the server but when I press the key in the server the action is executed only in the client.
Where is my fault?


Thanks!

windows 8 - Why access denied for user within permitted group?

First let me start off by saying that I'm not an IT expert, and I've just been experimenting a lot lately with sharing and permissions in Windows 8.1. I've reached a point of extreme confusion right now and I can't find anything online.




Since I'm not running a professional edition of Windows 8.1, I've had to use the net LOCALGROUP command in the command prompt to add users to groups etc.



I basically made a LOCALGROUP called HomeSecure, and added two users (AdminOne and AdminTwo) to it. Both of these users are also in the Administrators group and are indeed administrator accounts in Windows. It sounds pointless but it's because I'm attempting to manually simulate HomeGroup functionality, and plan to add non-administrator accounts from other workstations using the net GROUP command instead once I've got the basics.



I have checked, and the commands worked just fine. The administrator accounts are in that group. The confusion comes about when I remove absolutely all user and group permissions (including Everyone) from my C:\Users\AdminOne and C:\Users\AdminTwo folders except Administrators and SYSTEM, then proceed to add allow permissions for the HomeSecure group...



All of the groups I gave Full Control of the folders to. I went into the advanced settings and made sure everything was checked, and even made the HomeSecure group take ownership of the folders. It's also worth mentioning that I made all of the child objects inherit the owners and permissions of these folders.



But even after all of that, I still can't access the above folders from the network using HomeSecure members. I also can't access them straight from C:\ without it prompting me for administrative consent.




Accessing via the network, I get: You do not have permission to access ----- Contact your network administrator to request access.



Accessing via C:\, I get: You currently don't have permission to access this folder. Click continue to permanently get access to this folder.



If I press continue, all that Windows does is add allow permissions for the current user (AdminOne or AdminTwo) which seems redundant because they were already allowed? They were already allowed via the HomeSecure permissions?



Why? Shouldn't AdminOne and AdminTwo be allowed to access both folders normally since they are in the HomeSecure group?

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