Wednesday, November 30, 2016

windows 10 - “ntoskrnl.exe” system process eats ~12% of CPU when idle

So, after around 5 minutes of idle, CPU goes to ~12% usage by process SYSTEM (PID 4), more specifically by thread called ntoskrnl.exe!ExQueueWorkItem+0x400 and after some time it ends by itself but it happens everytime I left my PC idle. If any key is pressed or the mouse moved, this stops immediately.


I have this PC for a year already and never seen this before last couple of months. So, i did clean installation of windows about two weeks ago to solve this and there was not such a problem since then but today it appeared again. I didn't make any changes in software/hardware.


I have all drivers updated, Windows 10 Home, Fall Creators Update with latest build. Despite this everything is working fine but this problem is annoying.


So what should I do?


Edit: i found out using taskschedulerview that everytime this cpu usage happen there are several processes every time the same


screenshot from taskschedulerview

Windows Mobile Device Center - How do we clear the list of previously installed programs?

I have a device with Windows CE 6.00. From its Control Panel, I have opened Remove Programs and removed all of its programs. There are now no more programs listed in its internal Remove Programs dialog. This is good.


I also have Windows Mobile Device Center (WMDC) 6.1 installed on my PC. When I plug in my Windows CE 6.00 device via USB, it connects to WMDC, from which I can click Programs and Services > More > Add/Remove Programs.


First it retrieves the programs from the mobile device.


Retrieving Programs


Then it displays a list of programs that I have previously installed from the PC. How do I clear this list of previously installed programs?


Displaying Previously Installed Programs

windows - Log %CPU by Process over time


Is there any easy way on Windows to log %CPU time per process over time to a file for later analysis?


As far as I can see...



  1. Task manager shows me the %CPU per process but only visually - no
    way to save to a file.

  2. Perfmon will let me save to a file, and will additionally create a
    time-based file (taking snapshots at specified time intervals) -
    which is almost what I want, except that as far as I can see it
    can't break down the %CPU by process.

  3. Process Explorer will let me break down by process, but it will only
    save the file as a snapshot of a single point in time


So, none of these are quite what I need: I need to get a file that contains something like 'top 10 processes by CPU, every 15 seconds, until I stop the monitoring' The reason I need this because I have a machine on which some process is causing occasional brief spikes in CPU usage several times a day and I need to find out which process is the culprit.


Can anything do that, or have I missed some feature of perfmon or process explorer?


Answer



Process Monitor can do that for you.


You'll first might want to enable collection of profiling events:


enter image description hereenter image description here


Then, simply collect data for as long as you want (you may want to set up filters and enable Drop filtered events if you plan to collect for extended periods of time). Then go to Tools -> Process Activity Summary:


enter image description here


You'll now get a list of all active processes you recorded, with their activity over time.
enter image description here


You can then open the details for a single process (by double-clicking on it) and inspect the timestamps for certain events in the graph:


enter image description here


windows 7 - How do I find out which programs were blocked by my group policy?

I have to lock down a company computer so that it becomes reasonably difficult to perform anything but the intended tasks with it. As one of the steps, I have restricted the programs that are allowed to be run via a group policy object. However, at times (for example when I plug in a USB device), a window pops up informing me that my group policy has blocked the execution of a program. How do I track down which program that was?


When I have the Task Manager enabled, I notice that something seems to run when plugging in a device, but it disappears so quickly that I am unable to catch its name. I also don't seem to find anything in the event logs. How can I track that program(s) down?

drivers - How can I tell what PCIe USB 3.0 cards are compatible with NAS4Free / FreeBSD?

I have NAS4Free running on an HP ProLiant Microserver G7 N40L/N54L. The Microserver only has USB 2.0 ports, so I’m thinking of purchasing a PCIe card so I can use a USB 3.0 hard drive at full speed. How can I tell what cards are compatible?


I figure the yes/no in each case will depend on the chipset the card uses. From my research so far, it looks like it’s the xHCI driver that talks to the USB controller. (See 17.4. USB Storage Devices, and the xhci man page.)


Is this something that even needs to be checked? Or do all USB 3.0 chipsets have to present a uniform interface, such that a single generic driver (xhci) handles all?


If there are compatibility issues, does NAS4Free support all the chipsets that FreeBSD does? The latest NAS4Free, 10.1.0.2, is based on FreeBSD 10.1-RELEASE.

Tuesday, November 29, 2016

Are there any GUI SVN file management software for Windows?


Excluding TortoiseSVN, I was looking for software with a similar interface to Versions, for OSX.


The only requirement is that the SVN software runs independently of Windows Explorer, preferably with its own window (ala Versions).


Answer



RapidSVN is an alternative, but TourtiseSVN is really your best option. RapidSVN is portable however, and runs in its own GUI.


hard drive - Windows 7 dual boot with Debian Jessie

I had debian jessie installed on a single hard drive, then i added 3 other hard drives just for storage purposes but I installed Windows 7 Home Premium on one of them. It was working fine until windows update corrupted my Windows drive, and upon trying to reinstall i deleted that partition on the drive. Then upon booting i get an error on the Debian drive saying "missing operating system". I could only reinstall windows by unplugging all but the desired drive, and now i still cannot boot Debian, but Windows will only boot properly with only its drive plugged in. I am trying to find a way to leave all 4 drives plugged in, and repair my Debian installation. Does anyone know what the problem could be booting with the other drives plugged in? and any way to repair Debian so that it will recognize the operating system alongside Windows 7?

Does excel have an arrow key shortcut to skip blank cells?



In most versions of Excel (I'm using 2010), pressing ctrl+up or ctrl+down will take you to the edge of the current data region or the start of the next data region in a worksheet. Effectively skipping "empty cells", i.e. cells where =isblank() returns TRUE.



I frequently set up a column in a worksheet with the formula eg:



=IF(MID($C2,5,1)=" ", "space", "")


to highlight rows where something I'm looking for is true, in this example: when the 5th character in the cell in column C is a space, the cell in the new column will be "space" and if it is not, the cell in the new column will be blank.




Visually, this is a good cue for finding the data rows you're interested in, and you can use a Filter to display only those rows that match.



I would like to be able to use ctrl+up or ctrl+down or some similar keyboard shortcut to skip between the cells with content and skip over the blank cells, but this doesn't work as the blank cells still contain a formula and are not "empty" cells. Is there any way, I could achieve this behaviour?



Short version:



Is there any keyboard shortcut in Excel to skip over cells which show no value, but aren't "empty cells"?



Or, is there any value I can return from a function (e.g =NA()) that will trick Excel into thinking the cell is empty so the default ctrl+arrow keys shortcut will skip them?



Answer



No, but set it up this way, and Tab and Shift+Tab will take you to the next and previous highlighted row. First do this:




  1. Change your formula to =IF(MID($C2,5,1)=" ", 1, "") (copying down, of course)

  2. Highlight the column (Ctrl+Space will do that if you're in any cell in that column).

  3. Press F5, then Alt+Special, Formula, de-select Text, then Enter




    • To exclude errors, de-select Errors in step 3 also. (e.g., when LEN($C2)<5, but you could also change the formula to account for that)





Now the Tab key will step you through each cell in that column that has a numeric value in it (1). It also has the added bonus that in step 2 above, you can see the total of the highlighted rows in the status bar at the bottom of the screen (Sum:).


Monday, November 28, 2016

windows 7 - Computer screen stops working after installing graphics driver

I have a Dell studio 1558 laptop with Windows 7 ultimate. Yesterday i got a blue screen with error for "atikmpag.sys" file and the screen stopped working. It just went blank. Later i hooked it up to external monitor and again got the same blue screen on startup. Now if i remove the graphics driver using safe mode, the screen starts working and it boots up also. But if i install the driver again i get blue screen on windows startup. Could it be that my graphics card has gone bad ?


My pc config is
intel i5 processor, 4gb ram, amd ati radeon hd 5470 graphic card

mac - Mapping Apple Keyboard Keys to Windows Keys



So I got myself an Apple "Ultra-Thin" USB keyboard (the one that has two USB hub ports).



Keyboard



However, I use PC, so some of the keys on the keyboard are not mapped to Windows keys. Specifically, I am worried about the loss of the print screen, scroll lock, and other keys, and how certain Mac keys don't have a function.



I read online that using Apple Boot Camp drivers for Windows would fix this problem. My question is:




Is using the Boot Camp drivers the right approach? If so, can I get them online anywhere (for free, as I don't have a Mac disk)? If not, what can fix my problems? I think I read somewhere (possibly on Coding Horror) that there's a program called SharpKey which does these modifications. An alternative solution that I've heard of is using AutoHotKey. So, what should I do?


Answer



I've tried using the Boot Camp drivers, but it was in the Mac .dmg format and I couldn't open the package. When I finally got around to opening it, all I could do was install the entire Boot Camp package -- which I didn't want to do considering it might overwrite drivers and make a royal mess. All I wanted was keyboard and the only thing I ended up with was a 32-bit package (couldn't find the 64-bit keyboard package) so I ended up using RandyRants' SharpKeys and AutoHotkey. I use them both anyway.



I have an Apple Pro Keyboard (graphite) and use it in Windows Vista -- I use Randyrants.com's SharpKeys to map:



F13 -> PrintScreen
F14 -> Scroll Lock
Left Alt -> Left Windows

Left Win -> Left Alt
Right Alt -> Right Windows
Right Win -> Left Alt


(since the Win key belongs between Alt and Ctrl)



The only thing SharpKeys can't do is Pause-Break, which appears to use a three-byte scancode which native Windows key-remapping can't handle (it'll just fire NumLock instead)



For Pause-Break, I added a definition to my AutoHotkey ahk file:




F15::
Send {Break}
return


The Eject key still doesn't work -- this seems to be a special key handled differently, as Eject can be used before an OS is even running.



ymmv, especially on newer Apple keyboards. As long as it produces a scancode, SharpKeys should be able to do it. The only troublesome key is Pause-Break.




SharpKeys is here : http://www.randyrants.com/2008/12/sharpkeys_30.html


windows 8 - How can I force the Pictures app to refresh its library?


I've imported some pictures to my "My Pictures" folder using Adobe Lightroom, but the Pictures app doesn't seem to notice the new files? Is there some way to force it to refresh its library?


To be clear,


Pictures are sorted under C:\Users\\Pictures\ by year, then date; for example: C:\Users\\Pictures\2012\2012-10-20, these show, however those in C:\Users\\Pictures\2012\2012-10-29 do not, despite coming from the same camera, being in the same format, thumbnails working in Exporer, the pictures opening in the Pictures app via a double click in explorer, and Windows Media Centre having no problems.


I have tried excluding the Pictures library, and reincluding it, but that had no effect. It has taken three or four reboots for even the folders to show up in the app, but it reports them as empty


Answer



This can happen if Windows Search hasn't had a chance to index the photos yet, or the index is corrupt. Rebuilding the index can force the pictures app to rebuild its own index.


to rebuild the index, or ensure the relevant folders are included from the Start screen, type Indexing Options and choose the option of that name that appears under the "settings" section.


If the option doesn't appear, it may be due to the search service having been disabled (for example, to install Outlook 2013 on x64), so it would need to be reinstalled from control panel.


bsod - Windows 7 - computer restarts every 1 hour and say "Boot device not found"


Since yesterday, my computer hangs and restarts automatically approx every 1 hour approximately. Also occasionally, the system does not boot and fails with the error "boot device not found".


I don't remember installing anything new. I tried looking at the Task Manager just before it freezes and found nothing suspicious. EventLog has no information. It just says "Windows unexpectedly rebooted" after reboot, but there is nothing when it freezes. I cleaned up the startup tools using "msconfig".


Is this some kind of a virus (boot sector virus) as sometimes it is not able to boot. My hard drive is an SSD and I did chkdsk and found nothing.


Is there anything that I could do without formatting and reinstalling?


Answer



Check the STOP code on the blue screen as suggested by DragonLord. If the error indicates a hard disk problem, check the firmware version of your SSD and install the latest version. I had similar problems with an OCZ SSD, which were resolved by updating the firmware.


vba - Macro does not run when opening a File/Workbook from within Excel



I'm new to Macros and VBA in general but my goal is pretty simple I believe. My macro should search an opened Excel document (automatically) and create a MessageBox with a warning if the WEEKNUM() function is used with only one parameter (the date).
So I've created my Macro in excel 2016/Visual Basic editor and have saved it as .xlam (a Excel Add-In).
Then I have copied the file to C:\Users\User\AppData\Roaming\Microsoft\AddIns because that's where the Add-Ins are located I guess. I've made sure that this location is a trusted one in the Excel Trust Center settings + I've enabled all macros in the settings.



So my macro looks like this:
Excel Objects - ThisWorkBook:



Private Sub Workbook_Open()
Application.OnTime Now + TimeValue("00:00:02"), "Start"
MsgBox ("Hello World!")
End Sub



I'm using the Workbook_Open() event to start my macro.
Then my Module named kwTester which tests the document:



Private Sub Start()
'Sheet is the current sheet
Dim Sheet As Worksheet
'my Regex
Dim regEx As New RegExp
'the search pattern

Dim strPattern As String: strPattern = "^\=WEEKNUM\(\w\d+\)$"
'is used to tell my if there is just one parameter
Dim verwendetKalenderwoche As Boolean
verwendetKalenderwoche = False
'CellAddress and CellFormula are just for debugging purposes
Dim CellAddress As Variant
Dim CellFormula As Variant
'Setting up the RegEx
If strPattern <> "" Then
With regEx

.Global = True
.MultiLine = True
.IgnoreCase = True
.Pattern = strPattern
End With
End If
'Code should be repeated for every opened Workbook and Sheet
'Dim book As Workbook
For Each book In Workbooks
For Each Sheet In book.Worksheets

With Sheet.UsedRange
For Each cell In Sheet.UsedRange
On Error Resume Next
CellFormula = cell.Formula
On Error Resume Next
If cell.Formula <> "" And regEx.Test(cell.Formula) Then
verwendetKalenderwoche = True
CellAddress = CellAddress & vbNewLine & Cells(cell.Row, cell.Column).Address(RowAbsolute:=False, ColumnAbsolute:=False)
End If
Next

End With
Next
Next
'if there is a WEEKNUM function with just one parameter then display msgBox and UserForm
If verwendetKalenderwoche = True Then
MsgBox "Sie verwenden die Funktion KALENDERWOCHE mit nur einem Parameter. Ab Office 2007 wird hier die amerikanische Rechenweise zur Bestimmung der Kalenderwoche verwendet." & vbNewLine & "Diese ist nicht mit der geltenden ISO-Regelung in Deutschland kompatibel." & vbNewLine & "Biite verwenden Sie wenn möglich den zusätzlichen Parameter <21> um diesen Fehler zu beheben." & vbNewLine & "Beispiel:" & vbNewLine & "KALENDERWOCHE(A2;21)", vbExclamation, "KALENDERWOCHE-Warnung"
'UserForm anzeigen um die betroffenen Zellen darzustellen
UserForm1.TextBox1.MultiLine = True
UserForm1.TextBox1.Text = CellAddress
UserForm1.Caption = "Betroffene Zellen"

UserForm1.TextBox1.ScrollBars = fmScrollBarsVertical
UserForm1.Show vbModeless
End If
End Sub


The UserForm should not be that important so I'll not include it, it just displays the cells which contain the WEEKNUM function.



If I open up a excel document which uses the WEEKNUM function everything is working properly - My MessageBox is displayed, I receive my UserForm and this tells my which cells are using the WEEKNUM Function. Exactly how I want it to be, so I guess my code works in some way. :)




I've used the following sites to write the code:
Automatically Run Excel Macros Upon Opening Excel
Run a macro



Description of my Problem



Excel is closed - I open a file by double clicking on it - my macro is executed successfully and displays my results. But if minimize this Excel-instance and open up another file my macro is not being executed again. Same thing if I open a document from within Excel via File-Open dialogue.
What is wrong?
Is this the way the Workbook_Open Event is supposed to work or am I missing something?
Is my add-in located at the correct place? Do I have to check some other settings?



I hope my question is not considered off-topic. I was not sure where to ask - Stackoverflow or Superuser. Notify me if I should delete this question :)



Any input is very welcome.


Answer




You are attempting to work with the Workbook events, which are local to the object to which they belong (in this case, the add-in). What you need is an Application event. Chip Pearson has a page explaining the concept.



To summarize, put this code inside the ThisWorkbook object of your add-in.



Option Explicit
Private WithEvents App As Application

Private Sub Workbook_Open()
Set App = Application
End Sub


Private Sub App_WorkbookOpen(ByVal Wb As Workbook)
MsgBox "Hello world"
End Sub

laptop - MSI GE70 2PE Apache pro - memory upgrade

I need to upgrade the laptop to 32GB, 16GB 1 piece. It has only 2 slots.


at present the memory specification is below:
https://www.memorycow.co.uk/8gb-8gb-x1-ddr3l-ram-memory-non-ecc-sodimm-1600mhz-pc3l-12800


i wannna purchase crucial 32gb, and the specification is below
http://www.crucial.com/usa/en/ct2kit204864bf160b#productDetails


As a laymen, i think their pins are identical. both 204 pins, DDR3L, CL11 and non-ecc ram (both are not for server).


am i missing something ? can upgrade ? thanks

macos - Resize Windows partition on a Mac without destroying data


Is there a method/utility to actively resize the partitions on a dual-boot MacBook Air, without destroying the contents?


I made the Windows Partition too small initially, and all the places I've looked have stated that resizing now using Boot Camp will destroy all data on the Windows 7 Partition.


How can I grow the Windows 7 partition into the available space (I can use Boot Camp to shrink the OS X partition without any problems)?


Answer



GParted should make it possible (I haven't used it), see comments.


The best way (that I have successfully used) is to use a utility to



  1. Clone the Windows partition to an external drive (or just to the OS X partition if you have room (also keep in mind this is risky – it's good to have the full backup off the disk in question), using Winclone within OS X. It just creates an image file that you can move around to wherever you have space, until you do the restore.

  2. Erase the Windows partition (it's ok, because you have the clone)

  3. Create your new partition however large you want, using the Boot Camp utility within OS X

  4. Restore the Windows cloned image to the new, larger partition

  5. Use the utility to "expand to all free space"


Also, I would run a "disk check" on the Windows partition twice before creating the clone with winclone. Otherwise, restoring will most likely fail.


You can follow some of the steps from this question.


linux - Recover files from fried Macbook - receive access denied

I have a friend that has a Macbook that no longer works, however the hard drive is still functioning properly. I took the hard drive out of the laptop and installed it into a desktop PC, and then booted to Linux Mint from a disk (I don't have a docking station). I then inserted a Flash drive to copy the files to. However when I open the home directory on the hard drive, I am getting an access denied. I can browse all through the disk except the home directory where all of their data is located. Does anyone have any suggestions on how to get by this?
Thanks in advance

windows xp - How do I run CHKDSK on an "Unmountable Boot Volume"?

My Dell machine running Windows XP SP3 can't start Windows : Unmountable Boot Volume.



I tried using the original Win XP disk to do a Repair, but it stops at 'Examining ... Disk 0 at Id 0 on bus 0 on Unknown'.



I then ran a Dell diagnostics test which reported 'Msg: Block 16980047: Uncorrectable data error or media is write protected'. The tests took in excess of 7 hrs.



Is there any way that I can run chkdsk /r to 'repair' this drive, since my XP disk cant get me to a command prompt etc?

repair - What are the essential tools you always have handy when attempting to fix someone's PC?



Specifically, I'm interested in knowing what tools you keep loaded on your thumb drive when asked to deal with a family member or friend's personal computer issue? Off the top of my head, I can think of things like:



  • AVG

  • Advanced WindowsCare

  • SpyBot

  • etc.


...but this question is not necessarily limited to virus/malware/spyware issues.


Answer



So, here is my list:


Note: feel free to add your tools to my list. If it's an alternative, please don't replace mine, add a sub-list started by "alt:" and say why do you prefer this one.


Boot-cd/usb key



  • Ubcd4win create a (custom) live cd that contains software used for repairing, restoring, or diagnosing almost any computer problem.

    • alt: Microsoft Emergency Repair Disk: a system rescue disk PE environment with advanced recovery tools like resetting passwords, hard drive repair, offline registry editing, file explorer, command prompt, etc. Only available to Software Assurance and MSDN subscribers, as part of the Desktop Optimization Pack. If you're a student, may be available to you through MSDNAA.


  • Offline NT Password & Registry Editor reset windows password

    • alt: Ophcrack (sort-of) brute-force windows password (if they are EFS encrypted files)


  • CloneZilla disk imaging backup

  • GParted partition editor

  • Stresslinux minimal linux with tools to monitoring hardware health: stress, cpuburn, hddtemp, lm_sensors, memtest86+, ...

    • alt: Memtest86+ RAM tester (don't need command line)


  • Hard Drive Manufacturers diagnostic tools: fujitsu / hitachi / samsung / western digital / seagate (maxtor)

  • Spinrite low level hard disk recovery (89$)


Kits



  • Sysinternals suite (1=included in this suite) a great set of tools by Sysinternals (so great that MS bought them)

  • NirLauncher (2=included in this suite) another great set of tools by NirSoft integrated in a launcher (that could be used easily with sysinternals suite too)

  • GnuWin32 port of the most important GNU utilities to Windows (command-line)


Remote control



  • Teamviewer all-in-one solution for remote access and support over the Internet. Easy (don't have to open ports on firewall/router), secure, and full featured.

    • alt: UltraVNC: less convenient but open source and free even in a professional environment



Anti-malware



  • Avira (use rescue disk or the one included in ubcd4win) and/or Kaspersky Virus Removal Tool

  • Microsoft Security Essentials or Avira (a little bit better but contains nag screen) -to install

  • System Explorer lists processes, startups, services, drivers... Check them with it's own database, VirusTotal or Jotti services. Snapshots before/after for registry/disk changes

  • RootkitRevealer(1) anti-rootkit

    • alt: Gmer more powerfull (but harder to use) anti-rootkit


  • Virus Effect Remover Repair/Fix damaged items like TaskManager, RegEditor, Folder Options, Windows AutoUpdate.


Startup Tools



  • Autoruns(1) the most comprehensive knowledge of auto-starting locations of any startup monitor

    • alt: RunAlyzer edit an external registry hive (used easily from a boot cd)



Process Tools



  • Process Explorer(1) detailed process, handles & dll informations

  • Process Monitor(1) real-time file system, registry and process/thread activity

  • Svchost analyzer lists all svchost instances and checks the services they contain


Registry Tools


Backup Tools


File Tools



  • Everything quick searching

  • Recuva recover delete files

  • RichCopy advanced copy tool

  • FileASSASSIN advanced delete (remove handle or delete at reboot)

    • alt: Delete Doctor delete with short DOS name or UNC name

    • alt: DelinvFiles same as delete doctor, but can scan the drive for invalid file names and from my experience it was successful where delete doctor wasn't. But it's a shareware: 26.95$


  • WinDirStat: graphical view of hardrive space usage

  • WinMerge folders/files comparison

  • Hashcalc md5,sha,crc32 checksum

  • TrIDnet file identifier


Disk Tools


Hardware Tools


Drivers Tools


Cleaning Tools



  • RevoUninstaller uninstaller that help to remove leftovers (without the need of monitoring install)

  • CCleaner remove unused and temporary files

  • PC Decrapifier remove or uninstall a specific list of unwanted software

  • JavaRa removes old and redundant versions of the Java Runtime Environment


Network Tools



  • NetWorx bandwidth meter

    • alt: NetMeter the live graph looks better but is a little less featured and have some instabilities on w7


  • NetResView(2) lists all network resources (computers, disk shares, and printer shares) on your LAN

  • CurrPorts(2) lists all currently opened TCP/IP and UDP ports and the processes that opened them

  • AS3 Personal Firewall portable firewall

  • eToolz gui for NS-Lookup, Ping, TraceRoute and Whois

  • Performance Pinging graph ping

  • Wireshark network protocol analyzer

  • Secunia PSI vulnerability scanning

  • SG TCP Optimizer (XP) (re)set & optimize tcp parameters


Misc


And some other essential tools, but not directly related, like notepad++, autohotkey, firefox (and its bookmarks)...


Most of these tools are portable and free (at least for personal use) and yes it's only the essentials one ;)


And if you want more security related software: Gizmo's Best Free Security List (by Antti Koponen)


Windows 10 Start Menu can't have multiple shortcuts with the same target

If you create two shortcuts with the same target then only one of them is displayed in the Start Menu. This is true for:



  • search results within the Start menu

  • manually browsing program folders within the Start menu

  • pinned shortcuts within the Start menu


This is important because:



  • the shortcuts might have different settings defined in the Properties dialog, such as different compatibility settings, or be set to start in different directories.

  • some programs install a shortcut to a command prompt which is set to open in the program's installation folder. This enables easy access to the program from the command line without having to modify %PATH%, but it means that users who are unaware of this "lose access" to CMD. Programs that do this:





  • Renaming shortcuts

    • Only the shortcut that comes first alphabetically is displayed


  • Using folders doesn't help

    • Only the shortcut in the folder that comes first alphabetically is displayed


  • Pinning shortcuts doesn't help

    • the pinned shortcut updates to point to the displayed shortcut





Fully up-to-date Windows 10 Home.



  1. Start → search for "Command Prompt" (or "cmd").

  2. (Optional) Right-click on Command Prompt → Pin to Start.

    • This makes Command Prompt available when you open the Start menu without searching for anything.


  3. Right-click on Command Prompt → Open file location

    • This opens a File Explorer window in %APPDATA%\Microsoft\Windows\Start Menu\Programs\System Tools


  4. Copy the Command Prompt shortcut and rename the copy "AAA Command Prompt"

    • This ensures it appears before Command Prompt when files are listed alphabetically.


  5. (Optional) Right-click on the new AAA Command Prompt shortcut → Properties

    • Change something. (E.g. set the "Start in" directory to a different location, such as C:\)



Notice that it is now not possible to access Command Prompt from the Start menu - it has been replaced with AAA Command Prompt everywhere. If you rename AAA Command Prompt to ZZZ Command Prompt then you get back the ordinary version and lose the customised version. Moving the shortcuts to different folders within %APPDATA%\Microsoft\Windows\Start Menu\Programs\ doesn't help.



Sunday, November 27, 2016

Removing Windows Technical Preview from Windows Update


Windows 10 Technical Preview question, running Windows 7 as my base OS.


Before I noticed the .iso files that were available, I ran an .exe from the Microsoft preview website that apparently configured my Windows Update to download an update called "Update for Windows." If I open Windows Update, it asks if I want to "Upgrade to Windows Technical Preview." I do not want this update now that I have the .iso to virtualize.


If I try to hide this update, it reappears! I want to get rid of that update, so how do I do it?


Answer



All you need to do is uninstall KB2990214


Just navigate to Control Panel\All Control Panel Items\Programs and Features


enter image description here


then click on View Installed Updates


enter image description here


Source



  • I don't have it installed so its not listed


microsoft excel - Will Eset File Security protect web server from users uploading potentially harmful files?

Our client has asked us to allow their users to upload Excel spreadsheets with macros but raised a concern about potentially harmful files being circulated between users.




A user is basically an author of articles to which they can attach files to share with their internal communities. Currently we restrict any macro based files but it has now become important for them to be able to share XLTM files.



The environment:




  • Windows Web Server 2008R2

  • Eset File Security (latest)

  • Asp.net based CMS system (Dnn)




My questions:




  1. Will Eset scan the file after it's uploaded or is it only if someone working on the server tries to open the file? (If the latter then we could still be spreading infected files because the next user that views the article and downloads the attachment wouldn't know that it's not safe unless they had good antivirus software, which we can't guarantee and have little control over)

  2. If Eset detects a problematic file will it intervene somehow in the HTTP Request pipeline? (I.e. I'm trying to understand what will happen when a user clicks the publish button for an article. If Eset finds an infected file, will it somehow end the current request prematurely (perhaps throwing a HTTP 500 error) which in effect stops the article from being published (the user at least knows something went wrong and we don't end up with infected files on the server at all).

Saturday, November 26, 2016

windows 7 - How to create an administrator account only used for UAC and prevent from WinLogon?

I am trying to create an administrator account to be used only as a UAC credential prompt when launching specific command (such as user account creation). I also want to prevent from login with this account on the WinLogon interface.


Is it possible ?


Thx in advance for your answers

windows 7 - Custom language for Microsoft Keyboard Layout Creator (MSKLC)

I'm trying to make a custom keyboard for my native language using Microsoft Keyboard Layout Creator (MSKLC). My native language is Khasi (iso-369-2 kha, iso-369-3 kha) and it is an unsupported language in Windows.


Since my language is not supported I get the language as English (United States).


Now, my question - is there any way to add my custom language? If yes, how to get the 'LOCALEID'


Eg.


LOCALENAME "en-US"


LOCALEID "00000409"


as for Engligh (United States)


With Ubuntu I can make just fine, this is my ubuntu layout:My Custom keyboard in Khasi Language

windows 7 - Huge memory usage in Nonpaged Pool


I have a one-year-old iMac with 8GB RAM running a bootcamped Windows 7 Ultimate 64 bit.


The following memory analysis with Sysinternals RamMap.exe leaves some questions open:


enter image description here


What could be the reason for the nearly 5 GB of memory in the Nonpaged Pool? How can I find out which driver is causing this huge memory usage?


Answer



Found it, you can add the column "NP Pool" to the "Processes" tab on Task Manager:


enter image description here


In my case, the culprit was Fling File Transfer, which has a serious memory leak. It was using more than 2 GB of the nonpaged memory pool before I restarted it. The above screenshot shows it after running for two minutes.


Bug report filed.


windows 7 - Cleaned computer and hard disk doesn't spin up anymore


I took my dad's computer apart and cleaned out all the dust today and now the hard disk doesn't spin up anymore. It's an IDE hard disk and it was working fine before. When I boot up, the BIOS says: No disk found. And then says something like "Insert boot media and press enter" All the necessary cables are in.


I didn't take off the motherboard or take apart the hard drive. I just cleaned out the front cavity of the case, inside the PSU, case fan, CPU fan, and heat sink.


Update 1: Tried the HDD on my mom's computer. It works fine. Then I put it back in my dad's computer and during boot, it seems to spin up. I rebooted a few times with my ears right above the HDD and it sounds like it spins up for a few seconds and then just stops with a little noise


Update 2: Never mind. My mom's PSU is too old. It's missing the 4 pin cord that goes right beside the big 24 or so pin MB cord


Update 3: Now that I think about it. He did call me over a couple days ago to ask me about this weird noise the computer was making. He thought it was the front fan but I thought it was around the PSU but I wasn't sure 'cause there was the case fan, CPU fan and the PSU fan all in the same area. It didn't happen again for a week or so, so I didn't think much of it


Answer



Check the IDE cable and connectors. There may be a pin bent in a connector, or the cable may be offset on the connector. It's also possible for an older cable to develop a short when it's plugged and unplugged. Try a different cable if you have one. And, try a different power supply connector if there is one that is unused. If not, you might be able to try one from the CD drive. It's unlikely to be a motherboard problem, but it is possible.


Same files have different "size on disk" on new drive



I recently bought a 8TB HDD to replace my 1TB drive for storing my backups. However after moving the files to the new drive I noticed they take up a substantially larger amount of space on the disk, even though the true file size is the same. Both drives are formatted to be exFAT so I am not sure why the reported size is so different. Why is substantially more space being used on the new drive?



File size comparison (Left is old, right is new)



Answer



The default cluster size for exFAT is extremely large. According to this answer it's like this



Volume size   Cluster size
500 GiB 128 KiB
1000 GiB 256 KiB
1500 GiB 512 KiB
2000 GiB 512 KiB
3000 GiB 1 MiB
4000 GiB 1 MiB

5000 GiB 2 MiB
8000 GiB 2 MiB
10000 GiB 4 MiB
20000 GiB 8 MiB


Your files are 753674490827/726245 ≈
0.9897 MB on average, so on the 1 TB drive with 256 KB cluster, about half of the files take 4 clusters (and waste almost nothing) and roughly the remaining half need 5 clusters (and waste 1 cluster)



The average wastage is 0.5 clusters = 128 KB per file or 12.5%. The total expected size on disk is 753674490827 × 112.5% ≈ 789.7 GB which is extremely close to what's in your screenshot. However on the 8 TB disk, the clusters are 2 MB, so you're wasting ~1 MB per file, which is why the new size on disk is almost twice the total size and the previous size on disk




See





It's also the same reason as this question Why is there such a big difference between "Size" and "Size on disk"?



On NTFS there are many other reasons. If you're interested read Why does "Size on disk" vary when "Size" does not with the same set of files?



In short, exFAT is bad for storing small files. Either use NTFS, or reformat exFAT with a smaller cluster size (4 KB just like almost everyone else including NTFS)



macos - Mac OS X can't be installed on this computer - strange error from boot - install of Snow Leopard


I have an "Intel Core 2 Duo, 1GB RAM" Mac mini.


I am trying to install Mac OS X Snow Leopard. Currently the Mac mini is running Mac OS X Leopard v10.5.8.


While Installing Snow Leopard 10.6.4 from an original Apple install DVD, I got the following message.


From my previously asked question's answer, according to me, it is possible to install Snow Leopard on a Mac mini. What would be the trouble here?


enter image description here


Answer



It sounds like you are trying to use an SL DVD that came with another Mac. They often fail to install on Mac models different from the one they were shipped with.


You need to get a Snow Leopard Retail DVD.


Friday, November 25, 2016

windows 7 - Outlook 2010: Your Outlook data file cannot be configured C:Users.AppDataLocalMicrosoftOutlookoutlook2.ost?

I have a user on a computer on our domain that we can't get Outlook to open her email because her roaming profile no longer exists in the location it did before...


Her user profile used to exist in C:\users\. but now it exists in C:\users\ instead.


The original folder does not exist on the new machine.


When I try to load up outlook on her machine it complains that the file is missing with the error:


Your Outlook data file cannot be configured.
C:\Users\bmiller.ourdomain\AppData\Local\Microsoft\Outlook\outlook2.ost

How can I tell Outlook to look for her ost file in an existing directory?

Is it possible to disable "Snap windows" when moving windows between monitors without disabling the Win+Right/Left Arrow hotkeys

If I toggle off "Snap windows" because I want to disable the window snapping that occurs when dragging windows between monitors, it also disables the Win+Right and Win+Left shortcuts for snapping to the right and left of the screen.


I even tried going to "Control Panel > All Control Panel Items > Ease of Access Center > Make the mouse easier to use" and checked "Prevent windows from being automatically arranged when moved to the edge of the screen" in hopes that it would only disable mouse snapping but that seemed to do the same thing as toggling off "Snap windows" because the keyboard hotkeys don't work when that checked either.


Is there a way in Windows 10 to disable snapping when moving between monitors but keep the shortcuts?

windows 8.1 - rundll32.exe invagent.dll eating 100% CPU


I am running Windows 8.1 Update in a Parallels VM. After about 5 minutes of inactivity, a rundll32.exe process is spawned and consumes a core. MsMpEng.exe activity also increases. (probably due to lots of IO but I can't confirm) If I interact with the VM in any way, the rundll32.exe immediately exits until I let it idle for another 5 minutes.


Task Manager reports that the command line is C:\Windows\system32\rundll32.exe invagent.dll,RunUpdate


There is no other unusual behaviour on this Windows install.


Update: Further googling has revealed a scheduled task under Microsoft/Windows/Application Experience called ProgramDataUpdater which seems to be the culprit. It's supposed to take care of cleanup after installing/uninstalling programs. I still haven't tracked down the core reason why it's misbehaving. Disabling it is a possible workaround but not a very good one.


Answer



The offending invagent.dll is part of Windows Update KB2976978, which seems to be about gathering app compatability telemetry in preparation for Windows 10 upgrades. Only users who opt into the CEI are offered this update.


By uninstalling the update (and opting out so I'm not re-offered it), invagent.dll was removed from my system and the scheduled task.


To opt out:



  • Open Control Panel

  • Navigate to Action Center, Change Action Center Settings, Customer Experience Improvement Program Settings

  • Select, "No, I do not want to participate in the program."


To uninstall the update:



  • Open Control Panel

  • Navigate to Programs and Features, View Installed Updates

  • Locate Update for Microsoft Windows (KB2976978), right click, and select Delete.

  • You will be prompted to restart your computer.


linux - How to install centos inside virtual box using iso image



I am using oracle virtual box manager



I created the virtual hard disk



In Setting -> System -> Boot order



selected CD/DVD-ROM has the first priority




enter image description here



And in storage I did this changes



enter image description here



while starting installtion its giving this error



enter image description here




What is the mistake here ?



Base system : Centos 6.2


Answer



Don't worry about adding the CD into the virtual machine, if it's a new virtual machine when you first power it on it will run the first run wizard and ask you if you want to install an OS and it will then let you choose the CD / ISO.



You can also use the removable devices options in the Virtual Machines menu.


windows xp - How program AutoHotKey for Alt + Space + N?


The sequence Alt + Space + N ( press Alt and Space together, then press N ) can easily minimize the current windows. I need to remap it to a useless key in my keyboard, for example, the right Win key or the Menu key next to it.


I tried many combination and they doesn't work.


>#Space::Send {Alt}{Space}n

This work, but require pressing two key, the right Win key and Space, while I want it to be a one key hotkey.


>#::Send {Alt}{Space}n

This doesn't work and only pop the start menu.


Answer



># is just a modifier. Modifiers must be used in conjunction with other keys. Use the key RWin instead.


RWin::Send {Alt}{Space}n

filesystems - Which file system to use for a large (1 TB) external hard drive?




I've got a 1 TB hard disk drive which is currently formatted as NTFS. I've recently learned about exFAT. I'm connecting this drive via USB. Which filesystem should I use for this large hard disk drive and why?



(I know exFAT requires a patch on Windows XP; this is not a concern.)


Answer



Since you're basically contemplating NTFS vs. exFAT, easy support for other operating systems doesn't seem to be a concern. I'd suggest staying with NTFS. exFAT is primarily meant for smaller volumes and slower devices where the space and complexity overhead of NTFS is an issue.



So I wonder what exactly do you plan to gain from formatting that drive with exFAT. It's in most ways inferior to NTFS anyway.


windows 7 - Can I have a single solid state drive and a RAID array on the same machine?

To summarize, i'm looking to use a single solid state drive as my primary drive, and two conventional sata drives in a RAID 1 configuration for data. I am trying to install 64-bit Windows 7 onto this configuration. Is this possible?


Here are the details:
I built a desktop that has been running 64-bit Vista on two 500Gb in a RAID 1 array for a few years. I just purchased an Intel X25-M 80Gb Sata Solid-State Drive, and was planning on using this a my primary drive, and keeping the RAID 1 array as my data drive.


I added the SSD drive and in the RAID setup, configured it as a RAID 0 array of only one disk.


Then, I tried to do a clean install of windows 7 64-bit, but got stuck in the "Missing driver for CD/DVD drive" black hole of selecting driver files and Windows telling me that i don't have the appropriate driver for my hardware. The missing hardware is NOT a CD/DVD drive, since i'm installing off of my only CD/DVD drive. Plus at one point i was able to point it at a driver for my raid controller, and then my hard drives magically showed up as browsable sources for finding drivers for some other unnamed device that setup couldn't recognize.


After a few hours of trying drivers (this was a very slow process) i decided to reboot and look at the BIOS settings. I'm using an ASUS M2A-VM motherboard which has an ATI SB600 RAID controller on board. I switched the "On board SATA Type" setting from "SATA" to "AHCI" thinking that since AHCI is an Intel thing, this would help. Unfortunately, this abandoned my RAID configuration, and my previously mirrored drives are showing up as separate drives when i boot into my current windows installation.


Am i trying to do the impossible here? Should i just buy a separate SATA/RAID PCI card and plug the SSD into that?


Any help would be greatly appreciated.

remote - How can I organise files in a disconnected manner?

I know that cloud and syncing solutions are popular now, but I've got a scenario where I would like to work with files in a disconnected manner (i.e. without a network connection back to the computer where the files normally reside). It would not be a case of working with the content, but instead re-organising them and sorting them when I am offline and then have those changes applied when I reconnect.


I expect I could put some form of script together and then manually apply changes, but are there any other approaches I might be missing? I was thinking perhaps some form of disconnected filesystem.


The key tasks for me are:



  • Rename files and folders

  • Move files and folders from one folder to another

  • Delete files and folders (rarely)


Ideally I'm looking for something that works on Linux (which is run on both the "home" computer where the original files are and the "disconnected" computer). If it works on Android and/or Windows, so much the better.


In my scenario both computers are a single user set up (i.e. there's unlikely to be any file contention) but I can imagine others who might be interested in this type of solution might not be so lucky.


The reason that sync and cloud aren't viable / useful is that the files are too big and in most cases I know enough about them from the name / location alone, and merely need to apply some "order".


I've Googled and did turn up CODA but it seems not to offer quite what I'm after (nor stability or an active community, from what I've read - but no offence meant to any CODA-fans!)

windows 7 - How to enlarge or move bitlocker system partition


I have 2 partitions on my 120 GB SSD (one for system, one for multimedia data which rarely changes). I am using Bitlocker encryption for both partition. After I have replaced the SSD with larger one, I wanted to enlarge both partitions, however could not find a way how to do it. Particulary I needed to extend the C drive as it was almost full and prevented further Windows updates installations.


First I cloned the entire disk with HDClone - unfortunately it treats bitlocker paritions as raw data, so can't manipulate them, only copy them block-by-block. So I have ended with my new SSD having two small partitions and after them half of SSD as unassigned space.


I tried various free partitioning tools, but could not find any which would be able to move the D drive. For all the bitlocker partition was raw data. The Windows itself is able to resize bitlocker partitions, but is not able to move them.


Answer



Finally I was able to find AOMEI Partition Assistant, which is able to "copy" bitlocker partition even into the same drive. For D drive this is an online operation and it can "move" the partition to get some free space after the C drive. However it can't resize bitlocker partitions.


Using this I was able to make a free space between C and D drives. Then I used built-in Windows Disk Management component of Computer Management to extend both partitions (Extend Volume options after right-clicking on partition).


windows 7 - Where can I download "bootrec.exe"?

I have my Windows 7 x64 ISO on my pendrive, but WinToFlash app forgot to install the MBR (again).



The only PC I have, uses x86 Win7 , so it won't install the bootrec.exe, since that is a 64bit binary.



I need the /boot/ folder from the Win7 ISO/disc. (32-bit)
Where can I download only that? Can anyone give me a link?

cpu usage - Windows 10 System (ntoskrnl.exe) using CPU when machine has been idle for a while



I noticed that my laptop's CPU starts getting used (maybe 15% usage?) and the CPU fan turns on, generally in the evening when my laptop has been idle for 5 minutes or so. The process using the CPU was System which doesn't tell me a lot so I decided to leave Process Explorer running and monitoring threads for System. It started using CPU again and this is what I found:



Process Explorer system



The thread eating the CPU after a few minutes of idle had the start address ntoskrnl.exe!RtlAvlRemoveNode+0x7ba0. So it seems pretty core to the system. Does anyone know what might be causing this and/or how I could further diagnose it? I don't like my CPU fan spinning up like this and I would like to stop the system doing this.




I even disabled all scheduled tasks that are triggered on idle (finding them with PowerShell Get-ScheduledTask | Where-Object { $_.State -ne "Disabled" } | Select-Object TaskName, TaskPath, Triggers | Where-Object { $_.Triggers -match "MSFT_TaskIdleTrigger" }) and it still happens.


Answer



The thread's start address mentions RtlAvlRemoveNode. This is a function called through the ntoskrnl.exe. Rtl stands for Run-Time Library so (most likely and without get further into it) it gets called through a native application (which would be, for example, the autochk program). If you want to know more about the background there's a lot of information on this site. However it's only the start address, it's not necessary this function that causes the CPU time usage. Press the "stack" button to see the full call stack or use 3rd party tools like ProcessThreadsView.



You have two basic options:




  • The trail and error approach: You disable applications for example through the Task Scheduler / Safe mode etc. hoping to disable the right application. (Applications could be the screensaver, defrag, search index, etc. most likely but not necessarly something that is triggered by the PC being idle)


  • The analytical approach: You run further analysis to pinpoint the problem for example by further analysing the thread in question or using "Windows Performance Toolkit" to further identify the application that causes the CPU usage





Since the analytical approach has quite a lot of overhead - knowledge wise - I would suggest the trail and error approach. Although it's just educated guessing it's most likely you are not the only one having the problem, so trying out most common solutions should be a good approach.



If you don't get anywhere by trail and error you will have to switch to a more analytical approach. As HoD suggested in his comment, Windows Performance Toolkit is a good next step here. Once you have more information or run into specific trouble you can further specify you're question so we'll be able to help you.



There is also the chance this behaviour is caused by something like malware, bugs, problematic updates etc. please take that into account, especially if you use the trail and error method.


Thursday, November 24, 2016

windows 7 - Repeating identical updates requests

Why do I keep getting updates requests that are identical? I install them and restart only to find "another update is ready to install".

Vim quit insert mode when navigate with mapping keys


In order to move the cursor in insert mode, I add the following key maps in my .vimrc(I use vim 7.3 on Sun OS)


inoremap  
inoremap
inoremap
inoremap

When I press the mapping keys, the cursor moves correct, but vim will quit insert mode and switch to normal mode, what's wrong with my vim? I also tried this with my gvim on Windows, it works well. Did I lost any options for the mapping keys?


Answer



Some terminal emulators generate escape sequences for meta (alt) characters. Alt-A becomes a. This is usually a problem on *nix machines.


You can find out more details here:


http://vim.wikia.com/wiki/Fix_meta-keys_that_break_out_of_Insert_mode


windows 7 - Print to pdf without margins

I have a site that generates barcodes for printing. These are to be printed using a label printer (think a Zebra label printer) at exactly 1.25" x 2.50".


From the "print" window in my browser I'm able to specify the correct page size, but I'm unable to specify the margins. It's creating a margin of about 0.50", I need it to be much less than that.


EDIT: more confusion: margins are set to 0 in the print server properties, but the pdf created still has margins.


Here's a screengrab of my print server settings:


enter image description here

java - How to make Microsoft JVM work on Windows 7?

I am struggling with the following problem. I cannot install MS JVM 3810 properly on Windows 7. When I start Interner Explorer 8 without starting any java 1.1 programs choosing Java custom settings under Internet options causes the crash of the browser.



I have some Java 1.1 programs that work well in Internet Explorer 8 on Windows XP after the installation of MS JVM 3810. I know that it is not advised to use this old JVM but it is not a short-term option to port the programs in newer Java since it contains 3rd party components. Complete rewrite is a long-term plan.



Strangely jview and appletviewer (jview /a) works from a console so the MS JVM 3810 is not completely busted just IE 8 does not like it. The problem with the appletviewer is that it cannot connect to the server even if both signed and unsigned content in Java custom settings have been set to Enable all. (Since Java custom settings was unreachable due to the crash the modifications - including My computer - were performed through the registry and pre-checked to behave correctly on Windows XP and Internet Explorer 8.)
If jview was working then I could at least think of a workaround.



Is there a way to configure MS JVM or jview properly on Windows 7?




Another options would be:




  • Checking Internet Explorer 9 Beta.

  • Using virtualbox and Windows XP older IE in it.

  • Delaying Windows 7 upgrade.

  • ...



Update




Finally we have modified all the programs to work parallelly as applet and application as well.



This way the programs can still be used from browser on older Windows versions. On Windows 7 the applications are started from the desktop. Installation to all user machine can easily be solved since they already have a large common application drive.
The code update is fortunately only a few lines of modification: including a main method in the applet class.
Furthermore instead of the starting html page a bat file is used to set the classpath before the startup with jview.

Batch file that search in google and opens specific web site

Is it possible to make a batch file which search a word in google and afterwords opens a specific web site?


For example when i run this script
@echo off
cd C:\Program Files\Internet Explorer
iexplore http://www.google.bg/search?q=%search%+wedding photographer


It opens IE and search automatically "wedding photographer"
I want, if it is possible, automatically to "land" at specific site http://example.com


10x in advanced!

Determine Product Key Used to Activate Windows 7



I have an OEM version of Windows 7 running on a recently purchased Dell laptop. The laptop came with only 2 GB of memory but I'd like to upgrade it to 6 GB. To do so will require me to reinstall Windows so that I can upgrade to the 64-bit version.



I'm unable to locate the Windows 7 key on the laptop or any material included with the laptop. How can I determine the product key used to activate Windows on my machine?




Update: Is it the Product ID located under the following (Paste into Windows Explorer)?




Control Panel\System and Security\System



Answer



Power down the laptop and remove the battery, you should find it on the case, safely hidden away... ;-)


Wednesday, November 23, 2016

hard drive - Access denied to write boot record under Windows XP on Award BIOS


I've recently deleted a NTFS partition by mistake.
I haven't created a new partition in its space (it's unallocated right now).


I tried recovering it using Active@ Partition Recovery software under Windows XP, the program recognised the partition immediately during scan, so I chose to recover it. However, I got "error writing drive" with "access is denied" cause. The program is being run as an Administrator user.


After a bit of googling I figured out it might just be the BIOS' "Boot virus protection", so I started looking for the setting in CMOS setup, but couldn't find any. The motherboard is a Gigabyte M61SME-S2, with an Award BIOS; I searched the manual and there's no reference to boot sector protection whatsoever. I tried flashing the latest BIOS version (version 6 is installed, version 9 is current stable version) with no success (using QFlash my USB drive isn't recognised, and the windows utility exits with no error or success messages, but BIOS is not updated).


I need to recover files in that partition very badly. Is there anything I can do to stop the "access is denied" error, or any other way to recover the partition? Just in case it's useful, I know the start and end sectors, as well as the number of sectors in the partition, of course. Would it be possible to use GParted or a similar tool to re-create the partition with its original (and existing) content?


Answer



BIOS virus protection was only useful when the OS would have written through the BIOS functions. 32-bit OSs avoid calling the legacy 16-bit BIOS functions except during boot, so BIOSes have stopped boot virus protection. Newer versions of Windows do block MBR write access to active disks on their own.


A deleted partition can be recovered by creating a new partition in its place. My tool of preference is using a Linux live CD (or USB stick) and run cfdisk to recreate the partition. If you want to check (and maybe back up) the data safely from under Linux, then use mount -o ro /dev/sdXX /mnt first, which prevents writing to that partition.


OEM Windows 7 key with downloaded ISO?


I'm going to reinstall my Windows 7, but when I bought this PC it came with Windows 7 preinstalled and the product key is on a sticker on the PC's case. I have downloaded a Windows 7 Home Premium ISO file from here and I do believe that this download is legal as I found it from superuser.com a while ago. What I'm asking is: will I be able to use my OEM key to install Windows 7 from this ISO file?


Answer



Yes, it will work as long as you are installing the edition you have the key for. For example, if you have the key for Windows 7 Home Premium it will work if the downloaded image is of Windows 7 Home Premium. Service Pack doesn't matter.


linux - Pre-pending to an output line of `tail -f file` if its contents match another file



Trying to cram all of the following into the title was hard, so this is what I really mean:



I am doing a tail -F access.log to watch an Apache2 log in realtime. The first thing on each line is an IP address followed by a space. I also have an unchanging CSV file where each row is an IP address, comma, name. For example:




10.1.2.33,John Smith
10.1.2.190,Jane Doe



Deliverable: I want to follow my access log as before, but if the CSV happens to contain a row with the same IP address that the current logfile line starts with, then insert the person's name at the start of the line.



For example, a line like this:



10.1.2.33 - - [22/Aug/2013:13:41:24 +0000] "GET /index.php ...



Should instead render as:




John Smith 10.1.2.33 - - [22/Aug/2013:13:41:24 +0000] "GET /index.php ...



Ideally, I would like to do this entirely by piping some regex commands together. So far, my biggest issue is that grep doesn't accept a pattern on stdin, it expects the subject on stdin (unless I'm missing something). Also, I have no problem transforming the CSV into some better format if required. Thanks.


Answer



Here's a POSIX shell solution



tail -f access.log | while read -r line;do
ip=${line%% *}
name=$(grep -F "$ip" your_csv_file|cut -d, -f2)
if [ -z "$name" ];then

printf "%s\n" "$line"
else
printf "%s\n" "$name $line"
fi
done


Edit



Two improvements made to the solution:





  • -r switch added to read so that it doesn't evaluate escape sequences in the lines it reads

  • -F switch added to grep so that it treats the IP as a fixed string rather than a regular expression.


windows 7 - Custom keyboard shortcut for changing keyboard layout

I typically work on Linux machines which have a fairly handy way of changing the keyboard layout with Shift+Caps Lock. On Windows, though it's possible to change the layout with keystrokes, it doesn't seem possible to use this specific keystroke:





Is there a tool or a registry hack to enable me to customize a shortcut for switching keyboard layouts in Windows 7?

linux - How to decrease the CPU usage when running Virtual Box?

I am facing an issue with 100% CPU usage under my system when running VirtualBox. Here are some further details:



My System Information:


CPU 1 name: Intel(R) Pentium(R) Dual CPU T2310 @ 1.46GHz
CPU 1 level 1 cache size: 32K Data cache. 32K Instruction cache.


CPU 1 level 2 cache size: 1024K Unified cache.
CPU 1 Mips: 2926.20
CPU 2 name: Intel(R) Pentium(R) Dual CPU T2310 @ 1.46GHz
CPU 2 level 1 cache size: 32K Data cache. 32K Instruction cache.


CPU 2 level 2 cache size: 1024K Unified cache.


CPU 2 Mips: 2925.96
64 bit CPU? Yes!
Total memory: 2.0 GB
Total swap: 6141 MBytes




My Operating System Information:


Kubuntu OS version: 11.04
Kernel version: 2.6.38-8-generic
Kernel arch: i686
Default shell: /bin/bash




My Virtual Box Settings:


OS Type: Windows XP
Video Memory: 32 MB
Acceleration: 3D
Base Memory: 512 MB



The Problem Details:


Well, each time I run Windows XP from my VirtualBox, I see the CPU usage at almost 100%. I experience a slow system even if no programs were running on my hosted Windows XP version.


I was wondering if there is a way for me to play with the settings so I can slightly enhance the performance. My PC is relatively fast under my Linux operating system. I need to know if there are some tips that I may follow when configuring the settings of my VirtualBox so i can achieve better results.


Any suggestions/ideas are highly appreciated!

Tuesday, November 22, 2016

windows 10 - The selected boot device failed. Press any key to continue

I am attempting to create a bootable USB drive to install Windows LTSB on my computer. To do so I have taken the following steps.


1) Procured an ISO file containing Windows LTSB


2) Tested that this ISO file worked by a] verifying its checksum and b] opening it with Virtualbox


3) Use Rufus to create a bootable USB drive like so:


Screenshot_Of_Rufus


4) Launch UEFI and change the following settings (the following is not exact wording):



  • Secure boot to off

  • "Legacy boot" to on or off (either option didn't work)

  • "Allow legacy ROMs to on"


I would then re-launch my computer and press F12 to select a bootable drive. While I could select a bootable drive labeled as "Mass Media Storage Device" - it would not launch and instead would give the error described in the post title.


How can I fix this error, or at the very least, determine if the problem is with my UEFI settings or flashdrive?

windows - How to find which tab a particular Chrome process refers to


I often have 6 or 7 separate Chrome windows open, often with 5-10 tabs in each. When I look at Windows Task Manager, I see each chrome.exe process, with some using a large amount of memory. How can I find which particular tab the process refers to? I want to know which one uses the most memory and close that tab instead of having to close every Chrome window. Is there any way to get this information? This is on Windows Vista, but it is the same on other versions of Windows as well.


Answer



Press Shift+Esc to bring up the Chrome
Task Manager under Windows, or select it from the Window menu under MacOS. It will tell you how much memory and CPU each tab uses, and its process id if you enable the process id column. You can also switch to a tab by double-clicking it, or kill its renderer process.


If there's still a sneaky process that isn't showing in Chrome's Task Manager, you can launch Chrome with the command line switch --task-manager-show-extra-renderers (from the Command Prompt or a shortcut under Windows, or from the Terminal or an Applescript under MacOS), but my current experience (2019-07-13) suggests that this may cause Chrome to sometimes crash, at least under MacOS.


How can I read my hard drive’s SMART status in Windows 7?


How can I read the S.M.A.R.T. state of my HDDs while using Windows 7, either automatically or manually?


Answer



HDTune works on Windows 7 too.


Screenshot of HDTune


A blog-post reference.


Why Windows toggles off laptop with new battery while Linux runs just fine

For most of what I do I (have to) use Windows 10. I got a new battery for a MSI GT70. With the new battery fully charged I can boot the machine to Windows, attempt a login, but before the desktop is shown, it just toggles off. With that I mean it is not a clean shut down. It also makes this strange "pock" noise. Maybe coming from the speakers or so. (It does not make that sound when the machine is turned off by holding the power button for 5 seconds.)


Then, with the same battery state, I can run Linux just fine. For hours, because the battery was fully charged.


Windows does recognize the battery to be fully charged. I even let Windows charge it from 2% to 100%. I got to the 2% battery state by letting Ubuntu drain it.


All the behavior described above only happens when the AC adapter is disconnected. Otherwise, Windows runs just fine.


I already uninstalled the battery drivers from Windows numerous times, with battery still in the machine, with the battery removed.


What in Windows can cause this immediate toggle off as soon as I login to Windows? The version I am using is Windows 10 1809.

hard drive - Good HD Health Checkers/Programs


Possible Duplicates:
When to stop using a HDD? What rules/software apply?
How to check the health of a hard drive



Hello guys,


Can anyone recomend me good HD diagnostic tools? Light weigth and free?

usb - How do I install Ubuntu on an Intel iMac with no OS nor CD drive

What I want:



  • Linux on an Intel iMac (Core Duo).


What I have:



  • An empty PC (17" Intel iMac) with broken CD drive. It's model A1173.

  • This PC with Ubuntu 12.04 and an old Windows Vista partition.

  • a USB flash drive and an Ubuntu ISO.


Problems:



  • No CD means the only boot drive I could use is USB.

  • There is no BIOS on Macs, so I can't set boot settings or even see if it detects my USB drive. When I start the machine and press Option, the first and only thing I see is an old corrupted Windows XP partition and not a single option or additional information.

  • So assuming blindly that the Mac hardware/firmware works normally, I don't have any Mac OS to use any of the tools that I found on different tutorials for building a bootable drive for Macs.

  • I can't find much software on Linux/Windows to substitute to those tools, for example among others converting an .iso file (Win/Linux) to .img (Mac I guess). Which makes me think that the scenario where someone like me has Mac hardware but no Mac OS is extremely rare.

  • So other than finding someone that has a Mac I have no solution. So I ask, what would you do? The only thing is it should not involve any money (I know Mac software is rarely free) which also excludes getting any Mac OS unless I can use a free macos.img for VM or restore the original Mac for free.

Preserving permission when saving from linux to NTFS filesystem

Today I was devastated to see that a software project that I had backed up in my external HDD was almost completely ruined because the execution (and other permissions) where "reset" because the external HDD uses NTFS filesystem.




Is there a way to backup data to an NTFS or FAT32 filesystem while preserving permissions set in linux?

Monday, November 21, 2016

I seem to have wrong Mac Ports after upgrading to Snow Leopard




I upgraded recently to Snow Leopard but used Time Machine wich was in Leopard. Time Machine asked to copy everything from old machine and I said yes.



How I seem to be having trouble installing Ruby because of the libraries and when I try to upgrade the Mac ports it fails although I installed the latest mac ports software.



Any ideas?



sudo port upgrade -d outdated
Warning: Skipping upgrade since ncursesw 5.7_0 >= ncursesw 5.7_0, even though installed variants "" do not match "+darwin_10". Use 'upgrade --enforce-variants' to switch to the requested variants.
Warning: Skipping upgrade since ncurses 5.7_0 >= ncurses 5.7_0, even though installed variants "" do not match "+darwin_10". Use 'upgrade --enforce-variants' to switch to the requested variants.
---> Computing dependencies for apr-util

---> Configuring apr-util
Error: Target org.macports.configure returned: configure failure: shell command " cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_devel_apr-util/work/apr-util-1.3.9" && ./configure --prefix=/opt/local --with-apr=/opt/local/bin/apr-1-config --with-expat=/opt/local --with-iconv=/opt/local --with-berkeley-db=/opt/local/include:/opt/local/lib/db46 --without-mysql --without-pgsql --with-sqlite3=/opt/local " returned error 1
Command output: checking for -ldb... no
checking for Berkeley DB 2 in /opt/local/include and /opt/local/lib/db46...
checking db2/db.h usability... no
checking db2/db.h presence... no
checking for db2/db.h... no
checking db.h usability... yes
checking db.h presence... yes
checking for db.h... yes

checking for db_open in -ldb2... no
checking db2/db.h usability... no
checking db2/db.h presence... no
checking for db2/db.h... no
checking db.h usability... yes
checking db.h presence... yes
checking for db.h... yes
checking for db_open in -ldb... no
checking for Berkeley DB 1.0.0 in /opt/local/include and /opt/local/lib/db46...
checking db1/db.h usability... no

checking db1/db.h presence... no
checking for db1/db.h... no
checking db.h usability... yes
checking db.h presence... yes
checking for db.h... yes
checking for dbopen in -ldb1... no
checking for Berkeley DB 1 in /opt/local/include and /opt/local/lib/db46...
checking db_185.h usability... no
checking db_185.h presence... no
checking for db_185.h... no

checking for Berkeley DB... not found
configure: error: Berkeley DB not found.

Error: Unable to upgrade port: 1
Before reporting a bug, first run the command again with the -d flag to get complete output.

Answer



Do what it says and use the --enforce-variants option to rebuild your installed ports using the 10.6 default variants:



sudo port selfupdate

sudo port upgrade -u --enforce-variants installed


EDIT: If you haven't already, you will also probably need to install the MacPorts base files for 10.6 and then upgrade the ports. There are detailed instructions here.


exfat - Getting around the FAT32 4GB file size limit


I recently purchased a 32GB USB 3 stick that was formatted FAT32. I plugged it into my computer and attempted to copy a film onto it, the file was over 4GB however and it would not let me copy the file across because of the 4GB file size limit imposed by FAT32.


After some googling I found that I could format my USB stick to have an exFAT format which would mean I could put files onto the stick greater than 4GB in size and the drive would work on both my Mac and my PC.


The problem with this solution is that my PS3 cannot detect the USB stick when it is formatted with exFAT.


I would like to know if there is a way I can have my USB stick formatted so it can have files greater than 4 GB and work on my PC, Mac and PS3.


Answer



Unfortunately, there is no way to copy a >4GB file to a FAT32 file system. And a quick google says your PS3 will only recognize FAT32 file systems.


Your only option is to use smaller files. Maybe chop them into pieces before moving them or compress them.


I would try a networked solution to file sharing.


windows 7 - External USB hard drive momentarily disconnects when additional external hard drive is plugged in

On a Windows 7 laptop with one USB 3.0 port and two USB 2.0 ports:


Whenever there is already an external hard drive plugged into the USB 3.0 port, and then another external hard drive is plugged into a USB 2.0 port, the drive that was already connected momentarily becomes disconnected, before automatically reconnecting again. Both drives are USB bus-powered hard disk drives; not SSDs.


The same is true if a drive in already plugged into a USB 2.0 port, and then another drive is plugged into the USB 3.0 port.


The above behaviors become apparent by assigning Device Connect and Device Disconnect sounds in Windows. The behaviors are confirmed by using USB Device Tree Viewer.


Both external drives are the same model, Western Digital WDBBEP0010BBK-01. These drives are compatible with USB 3.0 and USB 2.0.


According to the Windows 7 Device Manager, the driver being used is "WD My Passport 0748 USB Device" provided by Microsoft (Driver Date: June 21, 2006, version 6.1.7601.19133).


Is this normal? If not, how can it be prevented? Is data loss possible?

macos - Disable internal display on Macbook Pro without closed lid mode?

I have an early 2007 Macbook Pro running 10.5 that I've recently set up on a KVM with my primary desktop system.




The problem I've run into is that I have a 20" 1680x1050 LCD, and OS X only provides options to mirror at the resolution of the built-in display or to span. Since the built-in display runs at 1440x900, this leads to running my LCD at non-native res and a fuzzy picture. There isn't any option that I can find to simply disable the built-in display entirely and run the external LCD at its native resolution.



I am aware of closed lid mode, but the MBP was disassembled while in storage for about 6 months (took it apart to pull the HDD) and the cable to the touchpad, which controls the sleep sensor was damaged, meaning closed lid mode won't work. I've looked into replacing the cable, but the cheapest I've been able to find it is $75-100, and I'm trying not to invest any more money into this computer as it also has a completely dead battery and a few other minor problems.



I've found the app SwitchResX which appears to allow you to do what I need, but it has a lot of functionality I don't need and a ~$20 registration charge attached to it.



An odd set of circumstances, I'm aware, but I was hoping somebody might know of an OS hack that would let me just disable the internal display and be done with it. :)

Hide Administrator account from Windows login screen

I have enabled the Administrator account so that I can use it with runas in command prompt, but now the account is displayed also on the login screen.


Is there a way to hide the Administrator account from the login screen without disabling/deleting it?


administrator account on login screen

Protect powershell script from being opened, edited or modifed in Windows

I have the below powershell myscript.ps1 which I use to ask for username and password and depending on it it copies a file to a certain destination. I wanted to make this myscript.ps1 protected so no one can edit it and see the username and password and I found the solution found here which converts the powershell script to an .exe file. When I originally run the script using powershell the below credentials form appears allowing me to enter the username and password. But after the .exe is generated and when I run it the credentials form no longer appears, instead the cosole appears saying "Credential:" I don't know why? I want the credentials form to still appear when running the exe. Anythoughts please?


$credentials = Get-Credential
if ($credentials.Username -eq "user1" -And $credentials.GetNetworkCredential().password -eq "pass1")
{ Copy-Item "test1.pdf" "\test\test1.pdf"; }
else
{ Copy-Item "test2.pdf" "\test\test2.pdf"; }

Output when running the script through powershell:
enter image description here


Output when running the generated exe file:


enter image description here

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