Tuesday, April 30, 2019

usb - Cannot open an external hard drive in Windows

In Windows 7, I was installing Ubuntu using Wubi (Windows-based Ubuntu installer) to an external hard drive when suddenly it disconnected from the PC. After I connected it back to the PC, and double clicked the drive's icon, Windows didn't show the content of the disk but asked me whether I wanted to format it. The hard drive has only one partition. Its format is NTFS.


I also connected the disk to Windows XP. It makes the Windows Explorer super slow and I cannot open the disk either.


I can open the disk on Ubuntu and Mac.


Is it possible to restore the disk and make it run in Windows?

Any reason to prefer video adapter with two DVI ports versus one DVI/one VGA for DVI/VGA optional dual monitors?

I am looking to buy a new video card to power two identical monitors. The monitors came with both DVI and VGA cables, so I am able to use either.


My current video card has two DVI ports on the back, so I have both monitors connected via DVI at present. I have noticed that many modern video cards have a DVI/VGA/HDMI port trio and that cards with two DVI ports seem somewhat more scarce. Essentially, I have more options available to me for purchasing cards with a DVI/VGA/HDMI trio than with a DVI/DVI duo.


My question is, are there any sound reasons to go to the extra effort of finding a card with two DVI ports versus simply running one of my monitors through a DVI and one through a VGA on a DVI/VGA/HDMI card? Quality differences? Any variety of image asymmetry? Configuration difficulties (I dual boot Windows and Ubuntu)? Anything else?

How can I edit PNG file rating property value in Windows 10?

In Windows 7 and 8 I was able to edit the rating of PNG files by right clicking on that file and going to Properties, Details, Rating.


In Windows 10 this is not available anymore for PNG files, but for other file types like JPEG it is available.


Why is this not available in Windows 10 Enterprise x64?

memory - What's a good rule-of-thumb for choosing between Windows 32 bit and 64 bit?

I'm installing Windows on an old(ish) machine again - and am again faced with the question of whether to install the 32-bit or 64-bit version.


Instead of asking this question specifically for some individual setup (like here), let me ask more generally:


What is a good rule of thumb, or combination of criteria or rules, for deciding between 32-bit and 64-bit?


Possible factors affecting the decision:



  • Which version of Windows is to be installed (Win XP, Win 7, Win 8.1, Win 10); I'd guess the newer the version, the better it is to go 64-bit.

  • Memory size (1, 2, 4, 8, more) - 32-bit prevents you from benefiting from > 3GB memory or so; and 64-bit must eat up more memory.

  • CPU speed - is this at all a factor?

  • Others, I'm sure...

Transfer account data from a Windows XP drive to Windows 7


I had a motherboard die on a Dell laptop that was running Windows XP. I now have a new Dell laptop running Windows 7. The old hard drive is fine, and I have it in a USB drive caddy, which I can attach to the new laptop.


How can I 'cleanly' transfer my User account data from the old drive to the new?
I am most concerned about 3 things in particualar:



  1. Thousands of pictures and videos in Microsoft Digital Image Gallery

  2. Thousands of songs in iTunes

  3. Mail, contacts and calendars in Outlook.


I am more familiar moving accounts in OS X by just dragging the home folder from one machine to another and getting everything back. Given the account name Admin in the old XP machine, can I just copy everything from


c:\Documents and Settings\Admin

to the new Machine and assume I'll get everything back?


Answer



Windows 7 moved Pictures, music, and video outside of the Documents folder. It might redirect correctly, but I would copy (assuming your USB drive is letter X) using Drag and Drop. (Don't move, copy, if something goes wrong, you still have the original on the USB drive)


x:\Documents and Settigns\Admin\MyDocuments\My Pictures to c:\users\\My Pictures\
x:\Documents and Settigns\Admin\MyDocuments\My Videos to c:\users\\My Videos\
x:\Documents and Settigns\Admin\MyDocuments\My Music to c:\users\\My Music\
x:\Documents and Settigns\Admin\MyDocuments\ to c:\users\\Documents\
x:\Documents and Settigns\Admin\Favorites\ to c:\users\\Favorites

I'm not sure on outlook where the PST file is, but you will need to also copy it to your new computer, or just open outlook and Import the PST from your old drive.


How to chain GRUB2 for Ubuntu 10.04 from Truecrypt & its bootloader (multi boot alongside Windows XP partition)?


I want Truecrypt to ask for password for Windows XP as usual but with the standard [ESC] option, on selecting that, i.e via Escape key, I want it to find the grub for the (unencrypted) Ubuntu install.


I've installed Windows XP on the 120Gb hard drive of a Toshiba NB100 netbook then partitioned to make room for Ubuntu 10.04 and installed that after the Windows XP install.


When I encrypt Windows XP, Truecrypt will overwrite the grub entry in the master boot record (MBR), I believe (?) and I won't be able to choose between XP and Ubuntu anymore. So I need to restore it back.


I've searched fairly extensively for answers on Ubuntu forums and elsewhere but have not yet found a complete answer that covers all eventualities, scenarios and error messages, or otherwise they talk of legacy GRUB and not GRUB2. Ubuntu 10.04 uses GRUB2.


My setup:


Partitions:



  1. Windows XP, NTFS (to be encrypted with Truecrypt), 40Gb

  2. /boot (Ext4, 1Gb)

  3. Ubuntu swap, 4Gb

  4. Ubuntu / (root) - main filesystem (20gb)

  5. NTFS share, 55Gb


I know that the Truecrypt boot loader replaces the GRUB when boot up because I've already tried it on another laptop.


I want boot loader screen to look something like the usual:


Truecrypt


Enter password:


(or [ESC] to skip)


password is for WindowsXP
and on pressing [ESC] for it to find the Ubuntu grub to boot from


Thanks in advance for your help.


The key area of the problem is how to instruct Truecrypt when escape key is pressed, and how the Grub/Ubuntu can be made visible to the truecrypt bootloader to find it, when the esc key is pressed. Also knowing as chaining.


Answer



The answer I am going to accept for this question is my own. And that answer is to accept that I can't* do this and I will accept one of the alternatives:



  1. Use a virtualisation/VM ware application running in Windows XP (the encrypted system drive partition) host Ubuntu, such as VirtualBox, VMWare or Parallels. So I would have to boot into Windows then run this application and boot into Ubuntu from within this. Some commentators list one of the disadvantages of this approach as being that you have to boot twice (first XP, then Ubuntu) to get to Ubuntu. However, I would say it actually has an advantage over ordinary BIOS-launched dual boots in that you actually have both OSs running at the same time. Great if you want to, for example, test applications or web pages quickly on multiple platforms.


  2. Use a secondary hard drive or SD card (for example 8gb, 16Gb) for Ubuntu and select from BIOS (one-time) boot to boot Ubuntu from that.



*Can't = really means I've spent enough time (about 6 hours over 3 days, going away cleared my mind, searching forums coming back refreshed) on this and am not prepared to spend any more. So I can't be accused of being lazy and relying upon others. Can't = also means: can't at the moment. I may revisit this again.


Here's some references that others might find useful:


All of the above offer some insight but not a definitive complete answer that covers every eventuality or grub version.


I've posted this same question here on superuser, on ubuntuforums and truecrypt forums:


My justification in doing this is that readers of these forums won't necessarily read other forums, there will be some overlap but some vital advice may get missed.


Background thoughts and learnings (if interested!)


I'm actually quite pleased to say that I called it a day and came around to the alternatives though I did let it get the better of me and kept on fighting to win and solve my answer. But it's a relief to accept that it can't be done (easily) and that there are alternatives. Now I can get on with more important things! I already dual boot Windows 7 and Ubuntu 10.04 on a desktop without encryption - that is quite a straightforward procedure. And with the alternatives I'm not far off what I wanted in my original answer. Actually I don't use Ubuntu on a notebook as much as Windows at the moment so I won't be missing it so much. I also have a MacBookPro, so am by no means more a Windows fan than any other OS!


Here's a reason why I would like truecrypt encrypted windows dual booting with Ubuntu, from another user's perspective:


http://blog.mfabrik.com/2008/07/15/perfect-dual-boot-crypted-hard-disk-setup-with-truecrypt-and-luks/



"I have a work laptop used in Symbian and web development. I need to be able to boot both Vista and Linux. Due to client privacy, both operating systems must be crypted for the case of lost laptop. Even if I do not use Windows actively, its web browser data may contain stored password for client systems and it would be catastrophic to leak them accidentally."



Grub2 is much more complex than grub, some might argue necessarily so. I had success with pre-10.04 Ubuntu (GRUB not GRUB2) with Windows XP:


http://www.howtoforge.com/forums/showthread.php?p=184776#post184776


I say more complex because there are more settings files are now present, spread over more directories with references between them, some are now machine generated and editing of them is advised against, e.g. boot menu, there is a sort of scripting language to learn and script interpreters to run when a change is made. It's too involved for me at the moment, and it's only for launching an operating system, not a rocket to the moon!


Monday, April 29, 2019

Dual/ triple personality M.2 SSDs that support PCIe NVMe + SATA just like dual personality M.2 slots (B+M) support? How to find/ identify them?

This is a little tidbit question I posted on a comment on the below mentioned question.




"Of course also means it can be used in a (true) dual-personality M.2 slot. It won't work with PCIe, though."

"Just the way there are dual personality M.2 slots are there dual/ triple (SAS??) personality SSDs?"



I got a bunch of negatives on this question of mine but there's still no easy way to find, identify & determine PCIe / NVMe/ SATA properties of an SSD especially those with B + M dual connectors:




Understand how this M.2 B+M Key SSD can work via PCIe Adapter Card with 2 slots (both 1 B and 1 M slot)?



Read these and a few more articles as well at the time:





PS: Similar question but no answer posted. We need a SU Wiki for this subject area.



NVMe support - implicit or explicit?




Also mentioned on a comment here by Ramhound:


"M.2 x4 Socket 3, with M Key, type 2242/2260/2280/22110 storage devices support (both SATA & PCIE mode)" indicates to me both AHCI support and NVMe support but that is just me. Now If you want to boot to the device, that ius entirely up to the OS, after POST. "

macos - Using Windows Virtual PC Images in Parallels

I have a dual-boot bootcamp install of OSX and Windows 7 on my Macbook Pro. On the Windows install, I've created a series of Windows XP Mode installs so that I can access each IE browser in its native state. But since I develop on my OSX install I need to be able to hop between Windows and OSX quickly. For this I have chosen Parallels, but I can't open up the Windows Virtual PC images that I made for Windows from Parallels. Does anyone know how todo this?

hard drive - How to find out how many hours a disk has been mounted?

My box has an uptime of 400 days, but I saw one disk smart reported online hours of 270 hours. I suspect someone hot swapped that disk. How to find out?



Power_On_Hours 0x0032 100 099 000 Old_age Always - 276

purchase a laptop to recycle windows product key


I need to activate Windows 7 ultimate x64 on my workingstation and I have to buy a product key.
I'm considering opting for a solution with a greater value for money: purchasing a cheap used laptop with Windows already preinstalled, uninstalling it and recycling the product key for activating Windows in the workingstation I am currently using. (I would install a distro Linux opensource on the new laptop instead).


I have several doubts:


1) Product keys used for x86 operative systems do work for the x64 of the same version as well (for example, do they work both for Win 7 ultimate x86 and Win 7 ultimate x64) ?


2) the laptop I would buy comes with Windows preinstalled: after having uninstalled it, is there the risk to face any additional troubles while using its product key for activating Windows on a second device?


3) If any troubles by attempting doing that, could I still apply for Microsoft technical support?


4) I saw that product keys come with different names (OEM and so on): should I keep those differences in mind for my purpose?


OPTIONAL - - -


I'm also considering purchasing a laptop with Windows PROFESSIONAL installed instead than ULTIMATE: in that case I should downgrade my windows 7 ultimate to the professioanl edition in order to use the product key of the former -> is there any remarkable implication I should considere before doing that? (I mean data loss, the necessity of reinstalling softwares, any kind of incompatibility with the product key, etc...)


Answer



This cannot be done. The product keys on the machine you purchase will be tied to that hardware, and as such won't activate against new hardware. Note that OEM (Original Equipment Manufacturer) keys are the bulk of keys you will find with machines direct from a manufacturer (EG. Acer/Dell/Lenovo etc...). Retail keys are ones you purchase direct from a store, or Microsoft directly, without the PC itself, just the software/key.


See here and here for more information, specifically this part of the site (aimed at manufacturers issuing OEM licences)



The Microsoft Software License Terms is granted to the end user by
you, the system builder. It is related to the OEM System Builder
License for the PC on which it was originally installed.


You are required to support the license on that original PC, but you
cannot support a license that has been moved from a PC that you
manufactured to one that you did not. This is one of the key reasons
why an OEM System Builder License can’t be transferred.
​​​​​​​​​​​​​​​​​​​​​



and here



Q. Can my customers transfer or sell their OEM software licenses?


A. After an OEM software license has been installed on a PC, the
license may not be installed on or transferred to another PC.

However, the entire PC may be transferred to another end user along
with the software license rights. When transferring the PC to the new
end user, the software media, manuals (if applicable), and Certificate
of Authenticity label must be included. It is also advisable to
include the original purchase invoice or receipt. The original end
user cannot keep any copies of the software.



Now, if you purchased a machine with a retail version of Windows, you may be able to transfer this. However, this is only really likely on a custom built computer, and will be quite hard to track down, as the user is more likely to have retained their key for their own use.


To answer your questions, although you cannot go down this particular path:



  1. Yes, Windows 7 and above keys are valid for 32-bit and 64-bit installations.

  2. See above :)

  3. You will not get technical support.

  4. Yes, OEM and Retail keys are the world of difference in your case.

  5. You cannot downgrade from Ultimate to Professional without completely reinstalling, or doing an in-place upgrade of the OS. You will lose any activation status, you may need to reinstall software and data should be backed up before attempting either.


Verifying linux mint iso image



I wanted to try linux mint on my computer so I downloaded the iso file from the official website https://www.linuxmint.com/edition.php?id=217 via torrent.



The computer I used to download it runs windows 10. Now I want to verify the integrity of the iso file, but the instructions in the website https://linuxmint.com/verify.php don't seem to apply for my case (being a windows owner).



I know that before linux used to provide with the value of the md5 checksum, but from what I see that is no longer available. I could generate md5, sha-1, sha-256 and sha-512 using a windows utility. However, I don't know where to find the correct values to compare them. Using both mirrors or torrent, I could only download the iso file. Theer were no sha256sum.txt or sha256sum.txt.gpg files along with it.



What would you suggest for this case?


Answer




I accessed the mirror, chose the stable branch, klicked on "18" and found the sha256sum.txt and the corresponding gpg file sha256sum.txt.gpg.
https://ftp.heanet.ie/mirrors/linuxmint.com/stable/18/



3fb60a7698f5d80e68526016da3e4455d8a19be6b1cb0eeb5b59dbdd8cf1ffb3 *linuxmint-18-cinnamon-32bit.iso
2238dca5b51f9e2674a7e31c46f19141fbdecff6e44c06ecbc9a7bb59b75a816 *linuxmint-18-cinnamon-64bit.iso
d064397cd185fa4a91fd6db4ff42f105c121a7607691797325323135713a8810 *linuxmint-18-mate-32bit.iso
c634f48b248489eef782067484a04978f046e9ccd507d9df35c798a1db9bef22 *linuxmint-18-mate-64bit.iso


You should definetily check them out yourself, but know you can compare them with PsFCIV



Sunday, April 28, 2019

Is it possible to upgrade to/clean install windows 8.1 with an iso on an existing windows 8 installation?

I hava an oem license of windows 8 core & I want to upgrade to 8.1 .
Since my internet connection isn't reliable it's hard to get the update from windows store app. So I'd like to download an iso of windows 8.1 which is unofficially availabale.
After I do the installation(with a generic key,if required) will I be able to activate with my windows 8 product key?

Saturday, April 27, 2019

windows - Unable to change keyboard repeat delay



I was looking for a solution for a problem, and I needed to know what program used which shortcuts. The program I found, however, happened to be glitched on Windows 10 and caused it to actually press all possible shortcuts, and it broke the repeat delay when typing.



When you press a button and hold it, it usually waits a second before it starts spamming the characters. This is the thing that doesn't happpen anymore, so when I'm typing, I need to release the button really fast, otherwise it just puts down the same character multiple times.




Things I've tried:




  • Disabling everything in the 'Ease of use accessibility'-screen

  • Changing the keyboard settings in the configuration panel, I just don't notice any difference when I change this

  • Changing regedit values in 'Keyboard Response' and 'Keyboard' to the same values I have on another PC (HKEY_CURRENT_USER _> Control Panel -> Keyboard Response). This is what it is set to right now: http://i.imgur.com/Z3FhedY.png

  • Uninstalled the program

  • Rebooted multiple times




Here's a small video that might clear up any confusion: https://www.youtube.com/watch?v=Z1kKOayRTJY



I hope someone can help me :(



EDIT: Found a solution, in case someone else has a Ducky Shine 3 with the same issue, try pressing FN + F1, followed by FN + F5.


Answer



A: If the keyboard drivers have become corrupted, you can delete them and allow Windows to reinstall them.





  1. Open the Device Manager control panel. You can get to it easily by pressing the Windows key and pasting in "device manager" (in case it is too frustrating typing it in).


  2. Open the "Keyboards" section.


  3. For each keyboard device shown (there may be only one), double-click it, choose the "Driver" tab and click "Uninstall".


  4. Restart Windows.




It is possible that you have a keyboard which needs the manufacturer's driver installed for extra functionality. If so, check that the keyboard now works normally and then install that driver.



B: Your keyboard may have its own setting for repeat delay which could work independently of the OS and you may have inadvertently set it to zero. Check your keyboard documentation on how to set it to the desired value.


linux - Move Ubuntu to another drive

I have a laptop with an 80GB SSD and 500GB HDD. I currently have Windows installed on the SSD, and a 400GB data partition for Windows on the HDD. I set aside 100GB on the HDD to try out Ubuntu, and I'd like to make it my primary OS and switch it over to the (much) faster SSD.


How could I go about getting my Ubuntu setup moved over to the SSD? I have a 120GB USB hard drive I can use if necessary for getting through it.

file permissions - removing read-only access for a folder in windows XP

So I have this windows XP box which has a folder. When I look at its properties, it read-only is enabled. When I uncheck this checkbox and saves it, it saves with no messages, but when I open it again it shows the checkbox checked!!


Is there any way to remove read-only for a folder?

How to save Word documents as HTML to be viewed in Firefox


I'm in need for saving a Word document as HTML. It has some background images, other images, texts, ...
It opens correctly in Internet Explorer, but how can I save a word doc as HTML so that Firefox and other current browsers render it correctly?


All images are missing in the document. I looked through the generated html document, but the paths for the images appear to be correct.


Any idea?


Things like "Don't save docs as html" won't be helpful here.


Edit: To make myself clear, the normal "Save as HTML" doesn't cut it, the result is broken in any browser other than Internet Explorer.


Edit 2: What I'm using is Word 2010 and Firefox 4. I also tried rendering it in the latest Chrome version, which failed as well. I used different compatibility settings for saving as html, it did not help


Answer



As apparently nothing else worked, it became one of these damn "IE only" solutions.


Edit: Just to clarify: I answered this myself as I didn't receive any other answer for 8 months. As I am not in need of the solution any more at the moment, and was too long ago, I will/can not accept another solution.


Friday, April 26, 2019

boot - Firefox process doesn't die, and prevents new instances to start


I'm having a strange problem with Firefox 3.5.8 on Win7 x64. If I start Firefox and close it, and then later want to start it again, the little icon in the task bar gets its highlighted background for a few seconds, then it disappears and no firefox window appears.


I have checked this against Task Manager, and found that the earlier process is still running - in the list is an entry for "Firefox *32", which usually is taking up around 200,000 K private working memory. If I kill that process, I can start firefox normally without problems.


Why doesn't this process die when I exit firefox? Is there anything I can do to "automagically" kill it, either right after exit, or right before starting a new instance, so I don't have to go into task manager every time?


Edit:
I have now discovered that this does not only prevent me from opening new instances of the program when I have closed it - it also prevents some popups, if they require opening in a window and not just in a new tab. In that case, killing the current process is not an option, since I don't want to be limited to one firefox window at a time.


I experience the same problems if I try to start a second window with the first still open, by right-clicking the icon in the task bar and selecting "Mozilla Firefox".


For some reason, Firefox is preventing me from opening a new window, if there is already a firefox process running - regardless of whether I already have a window open or not.


Answer



A lot of times this is also caused by an installed extension not stopping properly, causing Firefox to hang during closing. Check your list of installed Firefox extensions and disable them one at a time until you track down one which is preventing Firefox from closing fully.


See Here


windows xp - Defragmentation stops and does not reduce below 52%

In one of my PC a single drive is not defragmenting. When i do it using windows defragmentation option the fragmentation does not reduce below 52%. I tried so many times and facing same problem. Then i checked the disk for errors using chkdsk,but didn't find any error. In that hard disk i have 4 drives.But only one drives is having this problem. Also accessing the data from that folder has become slow now. So how can i defragment it and solve the problem?


The drives size is 250 GB. Total of only 8.5 gb files are there in drive actually. But when i check the free space by right clicking-> properties it shows that 45 gb is used. But actually only 8.5 gb of file exists in the drive. Then i had doubt regarding recylebin. After clearing it also nothing changed. I have set shadow copy service to some folders in it. I think due to this free space shown is different that when i check each folder size in the drive. So what may be the error which does not reduce fragmentation?


This is the report of defrgmentation analyze for the drive


This is the report after defrgmentation

linux - Filter tail command through multiple grep commands to separate files

What I am trying to do is filter the output of one log file into separated log files based on a grep filter.



tail -f test.log | tee >(grep "Error" > error.log) >(grep "Warning"" >
warning.log)



This way all "Error" entries are in one file, and all "Warning" entries are in a separate file.


I know this works in concept, because if I use cat instead of tail, I get the correct file output, but cannot track changes in real time (which I need because I am watching output logs from actively running tests)


Also, if I remove the '>' file re-directors from the grep commands it outputs the individual grep outputs to the console correctly; however, I want a recorded file as well.


Answer:


When writing to a file the output of grep was being buffered. Using egrep with a --line-buffer option fixed the behavior.


The new command looks like:



tail -f test.log | tee >(egrep --line-buffered "ERROR" > error.log) >(egrep --line-buffered "WARNING" > warning.log)


Can't go to BIOS/Boot Menu, keyboard cannot work there

I have a weird problem. Some months ago all ports of my PC were damaged. So literally no port is working (USB, Audio, Serial, Keyboard/Mouse, only VGA
is working) I went to a repair shop and the guy installed a PCI USB card. So
I am again on all ports with USB mode.


Here is the problem, since the port is not a normal USB port, so the keyboard is
not ready on boot, keyboard only works from login screen in Win 7 and onwards.


Is there any solution for me to go to boot menu or make the keyboard work in
current circumstances?


May be a windows based BIOS menu or something that forces me to go BIOS.


I have Intel Core i3 (3rd Gen), DH61CR.

Thursday, April 25, 2019

microsoft excel - move worksheet to another workbook, without the vba code but keeping the colour scheme

I current have some code that first copy a worksheet do some cleaning and then move it to another workbook.



My problem is that when i copy or move a sheet it also copies the vba code that is attached to the sheet object.




Is there a way to avoid this?



Also when i move the sheet to another workbook the colours changes. Is there a move option that allows to keep the source formatting, much like the paste in the excel ribbon.



Currently I'm exporting the colour scheme and then importing it to the new workbook, but that requires unlocking the source workbook and with the new (2013) security it takes a very long time.



Ideas are highly appreciated.

How can I easily toggle display of page breaks for all worksheets in an Excel 2010 workbook?

Excel 2010 only allows turning page breaks off or on for one worksheet at a time via File → Options → Advanced → "Display options for this Worksheet":


enter image description here


I previously came up with a VBA macro to toggle page breaks, but it only works on the sheet I have active:


Sub TogglePageBreaks()
ActiveSheet.DisplayPageBreaks = Not ActiveSheet.DisplayPageBreaks
End Sub

The next logical question (which someone else had to point out to me) is how do I use a macro to toggle page breaks display for all worksheets in the active workbook?


Being new to VBA, I spent a couple hours researching how to loop through worksheets and also how the DisplayPageBreaks object works. I came up with an answer below.

Wednesday, April 24, 2019

Windows Update is downloading updates when it is supposed to notify me first


I have Windows XP SP2, and Windows Update is set to notify me that updates are available and not download any updates.


However, recently, the yellow shield in the system tray has appeared indicating that updates are downloading.


I have gone into the Windows Security centre and confirmed updates are set to notify only, and not download.


How do I fix this?


Answer



You may be getting pushed emergency out of band updates...these typically disregard policy.


windows 7 - USB pen drive randomly disconnects

When I connect a USB pen drive in my computer it randomly disconnects. I already unchecked the power manager option in the device manager.
I have the same problem in XP & Windows 7. I tried with Ubuntu on the same machine without any problems.

boot - How to create an UEFI bootable USB stick from an ISO

I have an ISO image of my backup solution's recovery cd. When I burn the image to a CD-ROM, I can boot from it in UEFI or normal mode without problems.


Unfortunately, this is no solution for my laptop, as it does not have an optical drive. Thus, I tried to create a bootable USB stick that can also boot in UEFI mode, but so far I have not been successful (note that the laptop has UEFI and boots Windows 7 in UEFI mode).


So my question is, if anyone knows how I can get said ISO on my USB stick so that it boots as if I would use a CD-ROM?

keyboard - Solution to Capslock / Shift every key?

I would like every key to be equivalent to "Shift + " when caps lock is turn on. Currently caps lock only capitalizes letters, not other keys.


So if I press:
'/", then it should be " rather than '
1/!, then it should be ! rather than 1


This may be out of scope, but does AHK work for remapping keys in other programs?


In other words, where does AHK sit in the execution from the actual hardware to the OS to the application receiving the keypress event?


Anyway to trace this flow?

Vista PC - Continually losing space on my C Drive


I am having a problem with my C Drive as it continually loses free space. I keep backing up and deleting files, but the easy ones are all off (those folders that are 100 MB and larger that can be easily moved or backupped and deleted from the C).


I did free up the 100 GB drive to 8 GB, but a couple of weeks later it was down to 4 GB. I searched for new or modified files in that time, but there was no substantial files (bigger than 1 MB). So I am not sure why I am increasing usage / losing free space.


I used http://windirstat.info/ to find out where my disk space is has gone, but could not see any change either.


I have norton anti-virus, but it hasn't found anything.


I thought maybe it had something to do with the two large .sys files, but with 3 GB of RAM, my friend tells me the sizes of my hiberfil.sys (3.15 GB) and pagefile.sys (3.45 GB) are appropriate.


I have also tried defragmenting. For some reason, this made it worse. Recently I removed files to go from 3 GB free space back up to 5 GB. In that time though, the free space dropped to 4.6 GB. Then when I ran the defragment tool on Vista, the free space went down to 2 GB!


Any suggestions?


(Side question - the only other thing I can find to delete of considerable size is .cab files in the C:\Windows\SWSetup. It seems they are tied to programs. Can I deletes these files, especially if they are all older than 2 years old?)


Answer



You may (as in likely) have system restore points enabled. You can clean those up, and put a maximum on the volume used for restore points


Here is one guid on how to do that: http://www.watchingthenet.com/how-to-reduce-disk-space-used-by-windows-vista-system-restore.html


windows - Remove Main Partition (C:) and make other Parition (D:) the main


Basically I installed windows 8 and windows 10 on the same HDD. I created a partition on the HDD for each. I started with windows 8 on C: and then created a partition (D:) and installed windows 10 on it. Now I want to keep windows 10 and remove 8 (on C:) but I can't delete the partition because there are boot files and paging on (C:).


What do I need to do this? I've been googling for a while with no luck.


Answer




Remove Main Partition (C:) and make other Parition (D:) the main


Now I want to keep windows 10 and remove 8 (on C:) but I can't delete
the partition because there are boot files and paging on (C:).



Use the below instructions with gparted to set the Window 10 partition as the active boot partition, confirm that it reboots properly as you would expect, and then afterwards wipe the Windows 8 disk partition from Disk Management, reformat, and so on.



Use a GParted Live CD to make a Linux or Windows drive Active


How to use the free GParted CD to mark a Linux or Windows Primary
partition Active.



  1. Download the latest stable release of
    GParted and create the
    Live CD from the ISO file.

  2. Boot from the Linux Live CD and complete
    the three user-input requests. GParted will run automatically.

    • Right-click the Primary partition you wish to make Active and select
      Manage Flags.

    • In Manage Flags on ..., tick (to enable) the boot check
      box to make the partition Active.

    • Click Close and exit the partition utility


  3. Restart your computer.


source



To burn a Live CD instructions, download the gparted ISO and then see How to burn a DVD on Windows for the instructions how to burn an image to a disc with Windows 10; you can use a CD rather than a DVD for gparted but the steps should be very similar regardless and self explanatory from there.



How to burn a DVD on Windows


Once you’ve downloaded the file, follow the instructions below to burn
your DVD, depending on which version of Windows you are currently
using.


Windows 7 / 8 / 10



  1. Right-click on an ISO image and choose 'Burn disc image'.enter image description here


  2. Select a disc burner (drive) and choose 'Burn'. If you check 'Verify disc after burning', it will confirm that the ISO image has been burned correctly.



enter image description here


source



Tuesday, April 23, 2019

Does hard disk spin when PC sleeps?

When I put a Windows 7, Windows 8, Windows 8.1 PC on sleep mode, does the spinning of hard disk turn off or is kept on? I am talking about the internals of the hard disk and general sleep mode not hibernate.

Why must Windows apply updates when shuting down and starting up and can this be disabled?



Why does Windows apply updates when shutting down AND turning on? I'm working on Windows 7 and would like to know if this can be disabled. It's really bad when I need to leave and turn off my laptop to have it go through a bunch of updates. It's also annoying when I want to use a computer and don't expect to wait for updates to be installed. If Microsoft wanted to force people to install updates why can't Windows wait until the user has logged in and started working?


Answer




Some updates require that system dlls are replaced.



The way that Windows works means that these often can't be replaced while a user is logged in so the machine has to be rebooted to allow this.



You can get the update to happen while you are still using the machine, but once it's complete it will nag you to reboot. You can postpone this, but you will eventually have to do it.



As to why Windows 7 performs part of the update on shut-down and the rest on the next reboot I'm not sure - unless it's because certain files are still in use at that point or as Robert points out the update needs to access the registry which needs to be done early in the boot process to prevent hijacking.


Monday, April 22, 2019

windows 7 - Admin Account Keeps Getting Locked Out


Ever since I changed the admin password on my work domain, the admin account keeps getting locked out in the morning when users start logging on to their computers. I am not sure why a user logging on to their PC would try to use the admin account, but I keep getting Event 675 with failure code 0x18. After a few of these failed logons, the account is locked out. The User ID in the error is the domain admin and the Client Address is the IP address of a user's computer.


After everyone is logged on in the morning, the admin account no longer gets locked out--it only happens during the time everyone logs in. I have not seen a pattern as to specific computers causing the lockout (so I do not suspect an attempted security breach).


Any idea on why this is happening and how I may fix it?


Answer



It sounds like a service or a mapped drive is using the admin account with the old password. The error log should show the IP or name of the computer that has the issue.


windows 8.1 - How can I fix broken shift-JIS filenames?


I've got some files with shift-jis filenames in ANSI.
e.g.


home_03@‚¢ƒgƒ‰ƒ“ƒNŠJ‚¢‚½Aƒtƒ@ƒCƒ‹—L‚è

when they should be in shift-jis like


home_03@青いトランク開いた、ファイル有り

This is because the archive extractor I'm using doesn't support shift-jis. That can't really be helped. But is there a way to fix the filenames of the files I've extracted?


edit:


another example


Ší‹ï‘ä@ƒXƒpƒi

should be


器具台@スパナ

Answer



Since you're using Windows, PowerShell is probably the easiest method.


Now, PowerShell internally uses UTF-16 for its strings, so a conversion would involve four steps:



  1. Read the incorrect filename from the filesystem into PS (represented internally as a UTF-16 string)

  2. Tell PS to convert the string into a raw byte array as if the string were . We can't use the PS string directly (as it's UTF-16).

  3. Tell PS to convert the byte array back to a string interpreting it as . This will give use a UTF-16 string of the raw bytes interpreted as Shift-JIS.

  4. Rename the file


Let's start by defining the encodings. In your case, I'm guessing your source is Windows-1252 (default non-Unicode codepage for Western/English Windows).


$srcEnc = [System.Text.Encoding]::GetEncoding("Windows-1252")
$destEnc = [System.Text.Encoding]::GetEncoding("Shift-JIS")

You could also use [System.Text.Encoding]::Default to get the current system codepage but I prefer to be explicit.


Then we apply the conversion steps:


$newName = $destEnc.GetString($srcEnc.GetBytes($oldName))

In your example, home_03@‚¢ƒgƒ‰ƒ“ƒNŠJ‚¢‚½Aƒtƒ@ƒCƒ‹—L‚è becomes home_03@ツいトランク開いたAファイル有り. While this is different from your example result (see notes at bottom), it matches what I get from http://string-functions.com/encodedecode.aspx's Windows-1252 => Shift-JIS. If this is incorrect, you may have to play around until you find the correct source and destination encodings.


Putting it together with a standard loop:


$srcEnc = [System.Text.Encoding]::GetEncoding("Windows-1252")
$destEnc = [System.Text.Encoding]::GetEncoding("Shift-JIS")
Get-ChildItem | %{Rename-Item -LiteralPath "$_" "$($destEnc.GetString($srcEnc.GetBytes($_.Name)))"}

Or if you prefer to recurse into subdirectories:


$srcEnc = [System.Text.Encoding]::GetEncoding("Windows-1252")
$destEnc = [System.Text.Encoding]::GetEncoding("Shift-JIS")
Get-ChildItem -Recurse | %{Rename-Item -LiteralPath "$_" "$($destEnc.GetString($srcEnc.GetBytes($_.Name)))"}

Add -File to Get-ChildItem if you want to avoid renaming directories.




Looks like your example included two characters that were invalid in Windows-1252 and were likely dropped when you posted the question (based on reversing the process using your example output). There's a 144 (0x90) between the first @ and Â, and a 129 (0x81) between the ½ and A. For the convenience of anyone else looking to test, here's a base64-encoded version of the raw bytes: aG9tZV8wM0CQwoKig2eDiYOTg06KSoKigr2BQYN0g0CDQ4OLl0yC6A==.




Also note that this will not work when there are characters Windows considers invalid in either your source or destination filenames. Especially in the source filename, as your extraction tool probably would have irrecoverably mangled the name on extraction (by dropping the bytes corresponding to the invalid characters like ? or \ in the wrong encoding). The only thing you can do in those cases is use an alternative extraction tool that avoids this problem entirely.


command line - Make Batch File Cmd Window Stay Open For X Seconds


I'm running a batch file on a server to dump a MySQL database.


I'd like to have the cmd window stray open for, say, 20 seconds, and then close. That's so if I run it manually I can see that it finished the task .


I tried Sleep 20, but it doesn't look like it works. The file is like this:


echo CAMS MySQL database backup
"d:\program files\mysql\mysql server 5.1\bin\mysqldump" -u xxxxxxx -pxxxxxx --result-file="D:\MySQL_Data_Backups\cams\cams.%DATE:~10,4%-%DATE:~4,2%-%DATE:~7,2%.sql" cams
echo Done!
sleep 20

When I run this, it closes the window without showing the final echo ("Done!").


If I use pause instead of sleep, it does show the final echo, but I would like the window to close after a delay.


Any suggestions as to what I have done wrong pls?


Answer



Use this:


@echo off
echo done
ping 127.0.0.0 -n 1 -w 20000 > nul

-n 1 attempt to connect once
-w 20000 waits 20 sec


@echo off just to have prettier output


Another one is:


timeout 20

This you can stop even before it counts down to 0.


Sunday, April 21, 2019

windows - Does Virtualbox support DMG files on non-Mac OSes?


I'm trying to use a DMG as disc drive for a VirtualBox virtual machine, and I'm greeted by this very unpleasant surprise :


Sadness (error message screenshot)


This reads :



Error opening optical disc file C:\Users...


Could not open the medium 'C:\Users...'


VD: error VERR_VD_DMG_INVALID_HEADER opening image file 'C:\Users...'
(VERR_VD_DMG_INVALID_HEADER)


Error code : E_FAIL (0x80004005)


Component : Medium


Interface : IMedium {05f2bbb6-a3a6-4fb9-9b49-6d0dda7142ac}


Called function : IVirtualBox {fafa4e17-1ee2-4905-a10e-fe7c18bf5554}


Code returned : VBOX_E_OBJECT_NOT_FOUND (0x80BB0001)



I've searched and it seems like it's supposed to work as claimed by this post from an Oracle employee on the Virtualbox forums :



Did no one really notice that VirtualBox supports typical DMG images of CDs and DVDs on every supported host platform?



Can someone who used DMG files with Virtualbox on Windows confirm or deny this ?


Answer



I've been finally able to use a DMG file as an optical disc image in Virtualbox on Windows.


It seems like the first image I used wasn't compatible, despite being successfully recognized and extracted by 7-zip. However, an InstallESD.dmg image from a Mac OS X setup package worked just fine and booted in Virtualbox on a Windows 7 host.


Cannot install Windows 10 Cumulative update KB3194496 for x64


I cannot install Windows 10 Cumulative update KB3194496 for x64


what I have done and found so far:


cleared WU download folder, tried to install the update manually,


Error 0x800F0922 when it tries to install by automatic Windows Update
Error 0x80246010 when I tried to install the .cab file manually with DISM.


It installed fine on 2 other Win10 notebooks. more recently installed, no hyper-v etc.


I know this is currently under investigation by MS but I'm looking for a reason or workaround.


Answer



the workaround could not be simpler:



  1. delete folder C:\Windows\System32\Tasks\Microsoft\XblGameSave

  2. delete registry key:
    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\WindowsNT\CurrentVersion\Schedule\TaskCache\Tree\Microsoft\XblGameSave

  3. Re-run the update


-> link to the solution


How to dual boot Windows 10 and (Kali) Linux?

I tried to install (Kali) Linux over a live usb stick (live .. > Application > System Tools > Install Kali Linux), but the with Windows 10 created partition of ~60GB won't be recognized by the installer (sda in picture 2).


As I said, I'm using Windows 10 as primary system. Why does the installer don't recognize my created partition?


enter image description here


enter image description here

laptop - Can a single HDMI port be used for two external displays?


Is it posssible to connect two external monitors using a single HDMI port, perhaps using a special adapter/splitter?


The two displays are currently connected to a desktop using VGA and DVI.


Answer



You should be able to with an HDMI splitter.


Saturday, April 20, 2019

ubuntu - Why doesn't my environment variable get set?



I have to set an environment variable called GDK_NATIVE_WINDOWS to fix the problem with Eclipse buttons in Ubuntu. To set the environment variable, I added the following line to ~/.pam_environment.





GDK_NATIVE_WINDOWS DEFAULT=true




Surprisingly, the environment variable doesn't get set when I echo $GDK_NATIVE_WINDOWS in a terminal. However, all other environment variables that I've listed in ~/.pam_environment are set properly. Besides, when I switch to a tty, e.g. Alt+Ctrl+F1, the environment variable gets set correctly. Can anyone tell what's wrong with setting this environment variable in ~/.pam_environment?


Answer



It looks like it's just a bug that my environment variable is not being set.


hard drive - How to shrink Windows 7 boot partition with 0 available shrink space

I'm trying to shrink a partition that has 140GB of 210GB free. I followed the suggestions here: How to shrink Windows 7 boot partition with unmovable files (defragged, turned of restore, recovery, etc) and managed to get about 30GB worth. But now I'm stuck. I can't shrink any further, but it doesn't report any unmovable files. The query runs, and I get an event in the log with ID 258 saying "The disk defragmenter successfully completed shrink estimation on (C:)".


Any suggestions? I'm open to using a third party tool as long as its free. I also have a ubuntu system setup that I could use, though I've read some horror stories about parted making the windows drive unbootable.

windows 7 - Two System Reserved Partitions after clean install on new drives


I just did a clean install of Windows 7 on a pair of SSDs (RAID 0) and was going to clear out my old HDD when I saw I have two system reserved partitions:


Two System Reserved Partitions


AFAIK I'm booting from Disk 1 (BIOS says it's using the SSD RAID), but when I go to delete the volume labeled D (the old system reserved partition), it says it's currently in use. However, right clicking the second system reserved doesn't present the option of deletion.


Is it safe to delete that partition? I'd like to format that entire disk into a single NTFS drive.


Answer



Yes, you can remove it. And you're not able to delete one of them because it's mounted/in use. Use the setup disk to boot to a command prompt and use diskpart.


source: http://technet.microsoft.com/en-us/magazine/gg441289.aspx


How to remove write protection from a write- protected USB drive and make it usable using diskpart?

I saw your answer to a question which has somewhat similar details like mine in this thread: Recovering a Partially Formatted USB Thumb Drive.
However, in my case, my usb is write- protected. Can you help me with it?


enter image description here


As you can see, there is a part in the picture above saying, Current Read-only State: Yes, and I think it's because my USB is write- protected. I tried entering a command, attributes disk clear readonly, and it replied Disk attributes cleared successfully.. Ensuring that I can format the USB now since the write- protection is gone, I entered, detail disk, but it only gave me the same results.


enter image description here


Even though it gave the same results, I continued following your solution. I entered, FORMAT RECOMMENDED OVERRIDE, but still, it gave me a reply saying The media is write protected. Seeing this result, I did not continue the following solutions, thinking it would just worsen the state of my USB and I would just obtain the same results. What can I do? Also, I still want my USB file system to be FAT32.


enter image description here


Here is the view of my USB drive in My Computer when I mounted it.


In addition, my USB doesn't have a switch.


My question with complete details is here, since I can't post more than 2 links and I can't upload images:
http://swampertblaziken.wordpress.com/2013/10/18/how-to-make-a-write-protected-usb-drive-usable-using-diskpart/

Windows failed to start 0xc000000f


I recently bought a Kingston 120GB SSD and installed Windows 7 Ultimate 32-bit on it.
I also have a secondary 500GB HDD: Western Digital WD5000AADS.


When I try to boot, it freezes and shows the following message:



Windows failed to start. \Boot\BCD Error code: 0xc000000f An error
ocurred while attempting to read the boot configuration data.



I've tried most of the solutions I could find:



  1. Using the /fixmbr and /fixboot commands.

  2. Using /bcdboot D:\Windows.


I can boot normally if I insert the Windows Installation disc, select to boot from it and skip the button press.


The SSD is C: and the HD is F:. However, on the Repair System menu, the Local Disk (SSD) appears as D: and the HD as C:.


Also, there was a SSD partition named D:, which was active, but I deallocated it and set C: as active, because there was a missing bootmgr problem previously.


Computer Management screenshot:
enter image description here


UPDATE: I disconnected the HDD and ran the Repair System again. It automatically detected the error and repaired the boot data.
I reconnected the HDD after that and now everything is fine. Thanks.


Answer



Sounds like your HDD is in the boot order before the SSD.


In your BIOS ensure that the SSD is ahead of the optical drive and the HDD, in the boot order.


If the item in the boot order list is "Hard drive" or something generic like that, look for a separate (Hard) Drive order section and ensure the SSD is ahead of the HDD in there as well.


Also, you may want to disconnect the HDD from the system completely, boot from your Windows install disk, and do a repair.


Once that's done and you can boot into Windows, stick the HDD back in.


Windows 8 High System Memory Usage

My problem seems simple. My computer is using more physical memory than is actually accounted for in the sum of my programs.


!(Running windows 8.1, latest patches)


What windows reports my total usage as


What the total system usage is


I use 7.5 GB. Total usage is 12GB. The Delta is 4.5 GB. This is something I'd consider very high.


Most of the posts I've found on this site relate to driver memory leaks affecting the 'paged pool' and the 'non paged pool' creating high usage. However my pages + nonpaged pool is around 650MB, which I understand isn't far above 'normal', and shouldn't cause this 4.5GB delta. To further investigate this, I even ran poolmon.exe and found no such leaky drivers when I sorted by usage.


Poolmon screenshot


So my question is simply: what gives? Where art thou memory?


Update:


A kind user referred me to the program rammap, which gives more detailed descriptions of memory allocation. Upon running it, I discovered that 2GB of memory in the 'in use' section was allocated for 'Mapped Files', which I presume is disk caching. Upon going to the 'physical pages' tab and sorting by said files, I learned that a lot of the active mapped files were files in use by a torrent application hosting large datafiles. Terminating the application freed 1.2GB of disk caching into 'standby', thus giving the screenshot you can see below.


Rammap


The the 'delta', has dropped to 3.2 GB, which is getting closer to what I'd consider normal but is still on the high side, though if you subtract the remainder of the 'mapped file' 800MB, you end up with 2.4GB, which could be simply explained away by the count listed in Users in the task manager being incorrect.


With this information, now I'm not so sure. Is this just me not understanding memory accounting? Is the 'shareable' section in the table actually used by user programs and just not accounted for in the user's space in the task manager? If so then this issue would be a mixture of me not knowing disk caching can count under 'In Use'/'Active' memory and that the User's tab in the task manager is inaccurate.

file permissions - Strange Windows Errors


I run Windows 7 and I've been getting strange errors from different applications, for example attempting to uninstall VMware Workstation causes the following error:


"Error in the lua script: [string "-------------------------------------------..."]:785: attempt to call global 'ReadRegistry' (a nil value)"

When I attempt to run Process Explorer (which has always worked perfectly) I get the error "Unable to extract 64-bit image. Run Process Explorer from a writeable directory." even though I've tried it in multiple directories I have write permissions to. Only when I launch it as an Administrator will it run correctly.


I believe it may be due to the environment variables as I added an extra path to my "path" variable to allow me to execute easily in cmd from any folder but I've since not only removed it but performed a System Restore and I'm still getting the same errors.


Here's the PATH variable for the system:


C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Program Files\Microsoft\Web Platform Installer\;C:\Program Files (x86)\Microsoft ASP.NET\ASP.NET Web Pages\v1.0\;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\Microsoft SQL Server\110\Tools\Binn\;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\GNU\GnuPG\pub;C:\Program Files (x86)\Nmap

and here's the user TEMP variable:


C:\Users\Arron\AppData\Local\Temp

Are these errors caused by my editing of the environment variables or is there another problem?


EDIT: I think I've found the problem, I used Process Monitor to see what was going on and it appears that nothing can write to my Local Temp folder. Here is the result when it's run as a normal user:


enter image description here


But when run as admin it succeeds:


enter image description here


The main problem is I can't see anything wrong with the permissions of my temp folder, it seems that Everyone has read and write access:


enter image description here


I've also got the full Process Monitor logs for both launching as a user and admin if they would help at all.


Answer



I seem to have found the solution, somehow the permissions for my Temp folder were changed so I no longer had full control. Now that I've added myself back as having full control I'm no longer having the errors from Process Explorer.


Reinstall windows 8 upgrade with a windows 8 oem disk?



I have a windows 7 PC that I upgraded to windows 8 pro awhile back. This PC has been having some issues so I wanted to do a clean install, but I didn't make an ISO image of the windows 8 upgrade when I downloaded it. I do have a windows 8 system builder disk though from a different PC I built. Is it possible to do a clean install of my upgrade using the "system builder" disk and my upgrade key? I read some posts from a year ago saying you can do a clean install using the upgrade CD but didn't know if the system builder could be used instead to accomplish the same thing?
Thanks



Answer



I just did a clean install of Windows 8.1 Pro on my machine using a previously purchased Windows 8 upgrade key.



First, I downloaded the full 8.1 ISO using this procedure. I used my own upgrade key to initiate the download.



Then I installed 8.1 Pro using a generic "trial" key for Pro version



XHQ8N-C3MCJ-RQXB6-WCHYG-C9WKB



This installs a non-activated trial version of Windows 8.1 Pro.



And then I activated that freshly installed version using my upgrade key. It all worked without any problems.



So, my suggestion would be to forget about any disks you might have. Download the full ISO from Microsoft, install it and then activate it with your key.



But if you insist on using your system builder disks specifically, you might find yourself in a situation when system builder disk refuses to accept an upgrade key. In that case you might try using the "trial" key for installation and then using your upgrade key for activation.


csv - PowerShell Script to Rename - Copy - Move

I am trying to write a PowerShell script to do the following.


step 1


Rename files in source (FTP folders) directories with it's "current_name_datetime.csv" as per a source file "Source_list.csv" this file has the directories "source,destination" I want this script to look into.


step 2


Copy newly renamed files to backup directories as per destination in Source_list.csv this file has the directories "source,destination" I want this script to look into.


step 3


Move newly renamed files to final destination directory which is not in my current script.


---------------------My Script ----------------------


$sdfiles = Get-Content c:\!tony\Source_list.csv
$sourceDir = "c:\test\"
$destinationDir = "c:\testing\"
Get-ChildItem $sourceDir -Recurse -Include $sdfiles "*.csv"|
ForEach-Object{
$newname= "{0}{1}_{2}.csv" -f $destinationDir, $_.BaseName,[datetime]::Now.ToString('MM-dd-yyyy-hh-mm-ss')
$_|Copy-Item -Include ,$sfiles -Destination $newname -whatif }

-----------------------Error--------------------------


What if: Performing operation "Copy Directory" on Target "Item: C:\test\cscenter Destination: C:\testing\cscenter_10-01-2015-12-22-24.csv".

I see in the error that it is trying to copy the directory not the single file in each directory and creating a new folder using the original folder name and renaming the folder and appending the date/time stamp.


Any help would be greatly Appreciated.

boot - Copy Windows 7 recovery partition to a bootable external drive

I would like to copy my netbook recovery parition to a bootable external HDD because two of my partitions were damaged including the partition which contained the Master Boot Record.
I wasn't able to repair the mbr but I needed the machine so I installed a Win 8 on it but now I want to reinstall the factory win 7 which is on the offline recovery partition but I don't know how can I copy it to a bootable drive.

Friday, April 19, 2019

Chrome won't work after Windows 10 update


After a forced update on Windows 10 (to Version 10.0.17134.376) I can't access any site with Google Chrome.


Every time I try to visit a site it times out (ERR_TIMED_OUT).


Microsoft Edge (which suddenly appeared among my desktop icons) appears to work fine.


I've tried



  • Restarting the computer

  • Reinstalling Google Chrome

  • Running the "compatibility problems" dialog on the Chrome application


Nothing has worked.


Any ideas to what I can do?


Answer



The problem


The problem has been discussed on Google Chrome's help forum:



The problem started with the April 2018 Win10 1803 Feature Update and can also happen with fresh Windows installs that use 1803. It is an (unknown) artifact of how Windows is installed or updated. The 1803 update can cause a core Windows identity service (CryptSvc) to loop endlessly and stall connections. -- https://productforums.google.com/forum/#!topic/chrome/s5S1uPI0kMc



Are you affected?


Try the following steps to see if you are affected by this problem:



  1. Open Task Manager

  2. Go to services

  3. Find the CryptSvc service

  4. Right click and restart the service


Can you browse sites with Google Chrome now? If so, you are affected and this is only a temporary fix.


Permanent solution


There are a lot of suggestions for solutions around (just google chrome CryptSvc fix)


The simplest fix (that worked for me) came from the Microsoft Forum.


(I have slightly altered the solution for easier understanding.)



  1. Run regedit

  2. Go to HKEY_CURRENT_USER\Software\Microsoft\SystemCertificates\Root

  3. Right click "ProtectedRoots" and click "Permissions"

  4. Select your user account and tick "Allow Full Control"

  5. Take a backup of Root by right clicking and click export, and save it somewhere

  6. Open Task Mananger and stop the "Cryptographic Service"

  7. Delete the Software\Microsoft\SystemCertificates\Root registry entry

  8. Restart Windows


I can't open my pen drive

I can't open my pen drive. When I inserted it to my computer it would just appear a removable disk and then when I tried to open it tells that there is no disk on the dirve. Can this be fixed? what should I do to open it so that I can Use it again. Hope you can help me with this problem. thanks!

Thursday, April 18, 2019

linux - Swap partition size on a 64 GB RAM computer for memory-intensive work


I have 64 GB RAM and 240 GB SSD on my computer, which I'm going to use for memory-intensive calculations (machine learning, data mining, etc.). Most of the advice I found on the Internet are about 2-4-8 GB RAM computers, and they recommend 2x the size of the RAM swap partition (so 128 GB).


Is it reasonable to make a 128 GB swap partition? what advantages do I get by making a huge swap partition?


Do I understand correctly that, in case I run out of physical RAM:



  1. If I have no swap, I get an 'out of memory' error

  2. If I do have swap, some of RAM pages will be copied to swap partition, and the program will continue to run (although more slowly).


Some people say it's a bad idea to make swap on SSD, since it has limited amount of read/write cycles. How fast using swap will it exhaust SSD read/write cycles (as far as I know, it's about 50000 write IOPS)?


I'm using Linux (Ubuntu 14.04 (Trusty Tahr)).


Going to set a 16 GB swap for now, as it should be surely enough (for example, RedHat suggests 4 GB), and 16 GB of disk space isn't actually a big deal.


Answer



You probably only need a small amount of swap. When you have sufficient RAM for your computer's typical working set, which I'm pretty sure you do, you only need swap for two things:



  1. You need swap to get information that will likely never be accessed out of RAM to free up more space for disk cache. Many applications run on system startup and will never be accessed again. You don't want any pages they dirtied stuck in RAM forever. So you need swap to hold them.


  2. You need swap to cover allocations that will never be filled. This space simply has to be available, even though it will not be used. Without it, the system will have to refuse to allocate memory even when it has plenty of free physical RAM because it has insufficient backing store to permit all of its allocations to be used at once.



Neither of these requires a large amount of swap. 16GB, for example, should be more than enough. The purpose is not to let you run bigger working sets at the cost of speed. The purpose is to let you use your 64GB effectively and not have to clog it with junk or reserve it for edge cases that will never happen.


(I agree with Bert that 4GB is quite likely to be sufficient.)


windows 7 - Stop Touchpad from disabling itself when I press any keys?

I have an acer E1-571 laptop, with an ELAN Smart Pad. Unfortunately the "Smart" pad is a bit too smart. It automatically disables itself while I am pressing any keys. This is useful when typing. However it does not allow me to play games that use the mouse for scrolling such as Counter Strike and GTA San Andreas as the touchpad gets disabled when I press any key. I tried to find an option or check-box of some kind that would disable this behavior in the ELAN Smart Device Driver's Properties and the Windows 7 Control Panel, but to no avail. Any ideas?

hardware failure - Are SSD's really reliable enough for power users?




TL;DR (though please read my full experience before jumping in with a quick answer.)




A power user performs a certain amount of write cycles. Does an MLC SSD drive support enough write cycles to last a power user around 5 years of usage. In my first experience with an SSD, it became cranky after just nine months. Based on my usage patterns, is this normal for an SSD or was it just a dud?






About nine months ago I bought an SSD (a 60GB OCZ Vertex Turbo). Up until about two weeks ago, I really loved the drive. It was extremely reliable and it really did make my system much more responsive. But two weeks ago, the drive started failing. It took me about 1½ weeks just to pinpoint the exact problem, and in the last few days it just got progressively worse. The drive has been taken back to the shop.



During these last two weeks I've done considerable research on MLC based SSDs and to be frank, I have huge doubts about the technology. What I would like to know is whether my concerns are warranted, or did I just get a dud drive?



You can reply per point if you like:





  1. Getting bad sectors on an SSD is just a matter of time, and bad sectors develop quick. It seems the software driver controller is responsible for keeping a log of these bad sectors and avoiding the use thereof.

  2. Within 9 months of usage I developed enough bad sectors to make the controller really work to find sectors it could still use.

  3. The controller isn't perfect, and once you've got a certain amount of bad sectors, you'll have an extremely unstable and insecure computing experience.

  4. It’s not easy to pinpoint the exact cause of your system crashes.

  5. I was using my SSD as a boot drive. I had vitals installed and other development tools, I also installed Sharepoint 2010 and SQL Server 2008 R2 Express. Besides this I had Visual Studio and Outlook. At no time did I copy huge movie or iso images or games to the SSD. Any non vital apps were kept on a regular hdd drive.

  6. I completely did apply tweaks such as turning off system restore, and I NEVER defragged SSD.

  7. I never turn my system off, unless I need to restart. Having said this, my system does enter standby mode when not in use.

  8. I was running Windows 7 64bit with trim enabled.

  9. I ran an anti-virus app.




Do you think if you're a demanding power user, you simply go through too many write cycles for an SSD to last more than around 9 months?


Answer



An Intel presentation we saw said that the SLC based SSD drives were recommended for heavy database and file usage. They are much, much more expensive, and designed for things like SANs... We use SQL express pretty heavily as well, on most of our laptops, and went with the MLC based ones.



We went with the X-25m's in about 4,000 laptops. We have had a few issues, some fixed by a firmware update.. others that were just bad drives.. but really, we are looking at about 1%-2% higher error rate than what we saw with the standard 7200rpm laptop drives. When you figure in the power, weight, and especially speed savings (we went from a 10 minute boot with XP and 7200rpm laptop drives because of all sorts of drivers and software and AV, to a 2 min boot with Win7 and an SSD) we would still choose the SSD's every day of the week, and twice on Sunday.



We had all sorts of HD's die for all sorts of reasons.. (when you have that many laptops, a 2% error rate means about 80 drives per year!) A good backup is critical, no matter what drive technology you use..


windows 7 - How can I troubleshoot a "Hardware Malfunction" blue screen?

Update 3/10/2011 (2): Switching harddrive slots once again allows Windows to load, but crashes are much more frequent than they were previously. It's clear that the issue has to do with the hard drive controller... Or a loose connection anywhere else in the system :(


Update 3/10/2011: After switching components back and forth, the system began to refuse to boot (no beeps, no video). I removed it from the case, and was able to get it booting again by switching the hard disks to a different slot. Windows asked to restart due to hardware changes, and I allowed it. After that, my system failed to launch windows (it reboots after the "loading Windows" screen).


At this point, my guess is that either the RAID controller or the SATA slots on the Motherboard have become damaged. I'm hoping the failure to boot isn't due to subsequent damage caused while I was troubleshooting. However, I have yet to have an actual test on the system fail, so I'm still somewhat mystified.


Update 3/9/2011: After moving my video card to a different PCIe x16 slot, I was able to run my test case without errors. Moving it back resulted in immediate errors again. I'll be spending tonight and tomorrow getting my PC sufficiently back together to run more strenuous tests on it, and hopefully make myself more certain.


Naturally, as soon as I posted the above, the test case failed with the same error message. Apparently the test case isn't as reliable as I thought it was.


My computer has suddenly started crashing to a blue screen with the following text:



hardware malfunction


call your hardware vendor for support


*the system has halted*



The crash occurs randomly during normal use. I have thus far always been able to reproduce it by transferring the contents of a large folder... But I'm not sure if this is caused by the file transfer, or simply because the transfer takes long enough for something else to trigger it.


A bit about my hardware


I have an dual core Intel CPU, and Asus motherboard. Video card is by nVidia, and connects via PCIe. My hard drives are in pairs, and connect via SATA to a RAID controller on the motherboard. They are configured to use a RAID0 configuration.


What I've tried so far


There is nothing in the Windows Event Log.


WhoCrashed was unable to find any crash records.


ScanDisk runs to completion (it launches prior to Windows load) and reports no errors.


MemTest reports no errors (to 200% coverage).


System temperatures are in the range of 40 to 50 degrees Celsius, with video card temperatures in the range of 60 to eighty degrees Celsius.


I have stripped the system down to a minimal configuration (hard drive, video card, one memory module, motherboard, CPU, power supply). The problem still occurrs.


I've reset the CMOS by removing the motherboard's battery for an extended period of time.


However, this has allowed me to rule out a few components:


It is not the video card because the problem still occurred after replacing the video card another one I had on hand.


It is not the hard drive or anything software related because the problem occurred after a fresh installation of Windows on a replacement hard drive.


It is not the hard drive cables because I replaced those with new ones and still had the problem.


It is not the power supply because the problem still occurred after replacing the power supply with another one I had on hand.


It is probably not the memory because I've tried three different memory modules in three different memory slots and was still able to replicate the issue.


It is probably not an issue of the motherboard grounding against the case because I've completely removed the motherboard from the case, and still encounter the issue.


Is there anything I can do to confirm what's causing the issue? At the moment it seems as though it must be either the motherboard or CPU, but those are both difficult components to replace... In addition, both components are relatively new (two to three years old).


I will gladly edit in any additional information I can get my hands on, and/or focus the question as I can find more details...

Wednesday, April 17, 2019

voltage - One laptop charger for laptop and monitor?


I have a monitor and a laptop and their chargers together are 91W. Both of them are 19V. So I was wondering whether I could just use a 90W charger and a cheap one male to two female 5.5x2.1mm splitter and adequate plug converters. Is there any danger to either the laptop or the monitor? I am not sure whether a laptop charger needs to be anything special or it just needs to supply the right voltage and amperage.


Answer



The brick which are calling a "charger" is not actually a charger. It's an AC to DC converter. Monitor and the laptop each have their own built-in charge controllers (and do those special things that keep Lithium batteries out of trouble).


This AC to DC converter's purpose is to supply the right voltage and sufficient current (or power, since P=IV).


If you execute this correctly, there is likely no danger to the monitor or the laptop. Be aware, however, that AC to DC converters should (and usually do) have over-current protection. So, if your equipment pulls more current from the AC to DC converter than it can supply, then the converter may shut off.


mouse - AHK script to click a specific button in a program not working inside the program window?

I'm trying to create a hotkey for a software button inside a program since the devs of the program did not do so.




Here is what I tried to move the mouse, click the button and move the mouse back to the original position:



F3::
CoordMode, ToolTip, Screen
MouseGetPos, X, Y
Click 512, 516
MouseMove, %X%, %Y%
Return



This works, on say the desktop, but when the program window is active, nothing happens. Is there some way to make this work inside the program window?

power supply - When laptop battery on "High Performance" it stops charging the battery




I'm using an ACER Aspire 5750G and my laptop specs are:




  • Proccessor: Intel Core i7-2630QM

  • Display: 15,6 LED LCD

  • Nvidia GeForce GT 540M - 1GB - CUDA

  • Memory: 8GB

  • HDD: 750GB

  • SSD: 250GB


  • Acer Nptity 802.11b/g/a



I have it for around 4 years now. Very strange thing is going on when I play games (like DOTA) or render movies or anything else that uses a lot of my laptop CPU. When this is happening and my laptop battery plan is set to be at "High Performance":




  • sometimes my laptop doesn't want to charge; in this case I have to unplug the charger from the laptop and plug it again

  • sometimes my AC power light is not on (which means it is not charging) and in order to fix it I have to unplug the charger from the wall and plug it again

  • or sometimes it is doing both things at the same time and because my battery is only holding my laptop up and running for about 2-3 mins and if both of the things above happening a lot (which they do) my laptop just shuts down and i have to unplug the charger again in order my laptop to have power and then power it again.




what I have done already to try and fix that issue:




  • I given my laptop 3 times to 2 different companies to fix the issue, paid like 50 euro and this issue its still there

  • I tried to run the computer without the battery and it does not work. it is still giving me the same problem

  • I tried to run the computer with other AC power and it is still giving me the same problem

  • I tried with other battery and it does not work as well


Answer




Your AC adapter isn't supplying enough power.




  • On some laptops, the battery will not charge when under full load because there is insufficient power available from the AC adapter. Under load, the processor and GPU can consume most of the power available from the adapter, leaving no power to charge the battery. This is more likely to happen in High Performance mode because faster system operation requires more power.


  • Make sure your AC adapter isn't damaged and supplies enough power for your system. If this behavior has only recently started occurring and the adapter has worked before, you may need to replace the AC adapter as power output can degrade over many years of use (electrolytic capacitors don't last forever).


  • The AC adapter you showed provides 90 watts. While this matches the supplied AC adapter, it isn't quite enough to power your system under load and charge the battery at the same time. The processor requires up to 45 watts, while the GPU can draw up to 35 watts. You may want to try finding a 120-watt adapter that will work with your system.



bash - separate mappings for TAB and C-i in .inputrc


For what I have tried, "TAB" and "C-i" in .inputrc seems to mean the same thing, whatever I bind to one is bound to the other. I know that originally, it was the same thing and that this behavior is kind of inherited from the old times but nowadays, apart from terminal emulators, all X applications makes the difference between a C-i and a TAB press.


So is there a way to run a terminal command ("complete" for example) when I press the TAB key and run another command when I press "C-i"?


(the same question applies for C-m and ENTER, C-z, C-d, and all these control sequences that I would like to send by other means than their original binding and apply my own commands to these precious keybindings)


And by the way, if you could explain a little bit the process from a keypress to a shell interpretation that would help me understand. For now I understood that keyboard events are translated by Xmodmap, then by .inputrc and that the result is interpreted by the shell or something like this.


Answer



There is no direct connection between xmodmap and .inputrc.


There are a few ways, depending on the terminal emulator, for modifying the keys sent via the terminal. Some of those include



  • modifying the X keyboard configuration (xkb)

  • modifying the keycodes sent for a given event (xmodmap)

  • terminal-specific things such as the translations resource used by xterm.


However, in the normal situation, control/I sends a tab character because that is the way almost all terminals were setup.


With xkb, you can (in principle) change what the keyboard does. In turn, the X applications detect key press and release events, and translate those into key symbols. xev is useful for showing events. A terminal emulator running in X gets the series of events, which (using X library calls) it can translate into characters. A tab is just another character in that case.


xmodmap's role in that process would be as an ad hoc change to the X keyboard configuration.


If you happen to be using xterm, the translations resource gives a lot of configurability. That is a feature of the X Toolkit, which allows you to associate various key combinations with xterm's built-in actions. The default key bindings are listed in the manual. You can override or add to those bindings. There are several places where you can set the information ($HOME/.Xdefaults for example, though it can get cluttered easily). For example, I set the XAPPLRESDIR environment variable to point to my user directory which contains customized app-defaults files. In one named XTerm, I could put this to change the result of ctrl/I:


*VT100*translations:    #override \n\
Ctrl ~ShiftI:string("??")

Because the tab key has its own special key-symbol, it is not affected by this translation.


windows - Create new directory with batch file (MKDIR not working)?

I tried using at first a combination of xcopy and del, but del kept failing.


xcopy creates directory if it doesn't yet exist.


The other option is to use MKDIR but it does not work inside a batch file?


MKDIR "C:\stuff"

Any ideas why this is not working inside .bat/.cmd file??


It works fine from a command prompt.

memory - Does my system support 1600mhz ram speed?

I'm looking into upgrading my PC, but I'm a bit confused about ram speeds. This is my current setup.



  • Motherboard: Asus p6x58d premium

  • CPU: Intel Bloomfield i7 930 DDR3

  • RAM: Corsair CM3x2G1600C9 (3 x 2GB, in triple-channel 3/6 slots)


The issue is that there seems to be conflicting information about what ram speeds my current board supports. The Asus website says up to 1600 non-O.C.. However, the specifications section of the manual says up to 1333 non-O.C.. I've seen other sites that claim up to 1600 as well, but I'm not sure.


I went into my BIOS and turned my ram speed up from 1066 to 1333, but when I tried selecting 1600 a warning dialog popped up mentioning something about keeping the current voltage setting. Also, the setting description mentioned that only 1066 and 800 ram speed would work on a "locked" cpu. My CPU seems to be working fine at 1333 so far, but I really have no clue if my CPU is locked or not!


Is there a good way of telling the what ram speed that my PC supports?

microsoft excel - Tick box with macro


please how to make tick box in excel make work with "2 macros"?


I need it, when checked, then hide some rows, and when unchecked, then unhide it. How can I do that?


I have this macro:


Sub bodnariucova_jednotlivci()
Columns("U:EW").Hidden = True
End Sub

tick box


EDIT: I edited it like this


Sub bodnariucova_jednotlivci()
Dim cBox As CheckBox
Set cBox = ActiveSheet.CheckBoxes(LName)
If cBox.Value > 0 Then
Columns("U:EZ").Hidden = True
Else
Columns("U:EZ").Hidden = False
End If
End Sub

But when I run it I get Run-time error '1004' Can not get properties CheckBoxes of class Worksheet (something like that, just in my language).


Answer



You need not two macros, you can do this in one. But have to ensure that you use a CheckBox from the ActiveX-Toolbar.


Edit: Insert new CheckBox, right click it and choose "Show code" (or similar in your language). The new Checkbox gets a name like CheckBox1 and the shown macro is named therefore CheckBox1_Click().


Private Sub CheckBox1_Click()
If CheckBox1.Value = True then
Columns("U:EW").Hidden = True
Else
Columns("U:EW").Hidden = False
End If
End Sub

And with some boolean logic you can simplify this macro:


Private Sub CheckBox1_Click()
Columns("U:EW").Hidden = CheckBox1.Value
End Sub

linux - add user accessible only to single other user

On my Ubuntu 16.04 workstation I have user provided by IT staff, named "john.smith". This account is in wheel group, has password managed by LDAP (I think... I know it changes in sync with other corporate systems).


We also have build system (GBS for Tizen) that uses chroot, so it needs root access. For this reason we have prepared sudoers file that covers all necessary commands. Problem is, this works for users created locally (those that I created normally with adduser), but does not work for IT-provided accounts. So when I build something, halfway through the compilation, sudo prompt asks for password. This is nuisance when compiling from console, but total showstopper when trying to use IDE.


Running IDE as a root is unreasonable for security/usability reasons. I also need the IT-provided account as my main account for some systems.


QUESTION: Is it possible to create user "builder" that:



  • will have wheel/sudo access

  • be possible to login without password from "john.smith"

  • will not be open-access for everyone else
    (I don't want to introduce security backdoor)


Then I could log-in as "john.doe", run IDE as "builder" and IDE would then not need to prompt me for password during compilation.

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