Wednesday, 31 October 2018

Sync Windows settings


Is it possible to synchronise certain Windows 7 settings. Things like the wallpaper you use for instance, or the programs that are stored in the start menu.


Or the programs that are docked next to your start button etc.



Answer



The only official transfer tool I know of Windows Easy Transfer, which however does only files.
See this article for details : What is Windows Easy Transfer & How to Backup Your Data for Transfer.


However, there are no tools that can transfer installed applications. Such a tool is even unlikely to exist, because of copyright reasons.


Most commercial products will naturally try to make it as hard as possible to copy a paid application to a second computer without paying for it.


The only truly transferable applications are portable applications.
Most of them are listed on the PortableApps.com website.


[EDIT]


You say that you are only interested in docked programs.
I know of no product that transfers these, but I added below some helpful information.


Windows 7 taskbar pinned icons are stored in two locations:



  • File System:
    %APPDATA%\Microsoft\Internet Explorer\Quick Launch\User Pinned\TaskBar

  • Registry:
    HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Taskband


Unfortunately, the registry information is binary-coded, so transferring it is all-or-none. In addition, the User Pinned folder is only created after the user has pinned at least one icon to the taskbar.


To deploy this, you would need to:



  1. Configure the pinned items on the source Windows 7 computer

  2. Export the above registry key to a file (say pinned.reg) and save the contents of the User Pinned folder

  3. Copy these to the target computer: The pinned.reg file by executing it and the shortcuts by copying to the User Pinned folder (which may require creating).


Please note that I have not tested this procedure. Also, any programs whose icons you transfer should have been installed in identically-placed folders.


bash - Change Python version a script is referring to


I have downloaded the script "install_esoreflex" (ftp://ftp.eso.org/pub/dfs/reflex/install_esoreflex) and then execute the following commands:


chmod u+x install_esoreflex

./install_esoreflex

I get the following warnings


WARNING: The following Python version is installed in your system Python 3.7.0
WARNING: Some of the available workflows use functionality
WARNING: only available in version Python 2.6.0 or greater
WARNING: and will not work properly with the installed version.
WARNING: Additionally, python 3.x is not yet supported.

Eventhough I have both Python 3.7.0 and 2.7. Python 2 is installed in /usr/bin/python2 and Python 3 is installed in /home/USER/miniconda3/bin/python3. How can I make the script "know" I have python 2?



Answer



From Ubuntu version 18.04, python 3 is the default python version (link). This means that /usr/bin/python is symlinked to /usr/bin/python3. You can check this by running python —version.


To default to python 2 in scripts (as your install script requires), you need to install the python 2 version (apt-get install python2). And tell Ubuntu to use that python version.


It is not recommended to change the /usr/bin/python symlink, because it is part of the distribution maintained configuration. Instead you should use the alias command (link): alias python=python2. This (locally) points python to python2, which is found in /usr/bin. You could use this command once in the terminal before running your install script. To change it more permanently, add it to your .bash_profile.


Why isn't Excel updating formulas automatically?

Excel is not working correctly for me. When I change the input of a formula, the output is not automatically updated. Could this be due to a virus? How do I get Excel to update formulas automatically again?

macos - Weird symbols on Mac


Since I've had my mac, I keep seeing this weird symbol. Till today, it had been only in the place of bullet points in OpenOffice.org. The first pictures shows this in a .doc file created on a Windows system.


I thought nothing of it - just an annoyance. It appears no matter what the font. Real bullets appear if I delete the text and insert a bulletted list using the toolbar.


Then, today I noticed in in iTunes - which seemed strange.


Image 3 is a zoom of the character. It says on it: Private Use E000 F8FF.


What is it (unicode related?), and how do I get the bullets working properly?


openoffice iTunes alt text


Edit: The plot thickens... If I boot in Safe Mode, the symbols look like little snap boards like you'd have at the beginning of filming a scene in a film...



Answer



(Err, yes, this answer is way too long. And there's no happy ending for the bullets! Highlights in bold...)


The images from the question are defined in Apple's Last Resort font, which holds 236 different funny symbols. I guess the name says it all, but according to Wikipedia:



LastResort is a Mac OS font that is invisible to the end user, but is used by the system to display glyphs that are not available in any other font. The symbols provided by LastResort place glyphs into categories based on their location in the Unicode system and provide a hint to the user about which font or script is required to view the unavailable characters.



And Apple explains:



Examplar glyphs were chosen in a number of ways. Almost all of the Brahmic scripts show the initial consonant ka. Latin uses the letter A because it's the first letter, and because in each Latin block there is a letter A so they can be easily differentiated. Greek and Cyrillic use their last letters, omega and ya, because they are so distinctive. Most other alphabets and syllabaries use their initial letter where distinctive.



(I like the Unicode BMP Fallback font, like used in Firefox, much better as it shows the exact 4-character Unicode code.)


So, your Mac does not know what to display, and uses the Last Resort font to provide some information.


My first guess was: Microsoft Office uses some proprietary symbol font, in which it uses character codes from the private use area (PUA) to define what the bullets look like. (Or maybe the author has some odd font installed from which some funny bullet has been used.) Your Mac neither knows that font, nor has any other font in which the same Unicode character code happens to be defined. And even if another font did define some character for that code, it would not help either, as characters from the private use areas may by definition have a totally different meaning in different fonts. Installing Office on the Mac might also include the font, probably making the bullets show fine in OpenOffice.org as well. (In fact, installing a trial of Office might already install the missing proprietary font.)


Well, no.


While the above would be true for any sane usage of Unicode, some further investigation learns that in old applications Microsoft uses the range U+F020..U+F0FF to display symbols using another font. When displaying characters from that range, it then automatically switches to another font for those characters. Some organisation named SIL International figured out:



One of the mysteries of text formatted with symbol fonts (at least, in certain Microsoft applications) is that characters appear to be encoded in terms of 8-bit code points even if a document is otherwise encoded in Unicode. When U+F021 was inserted into WordPad from the clipboard, not only did WordPad (more precisely, the Rich Edit control) apply the Wingdings font, it seems that it also changed the code point to 0x21. When the character was reformatted to a non-symbol font, this became U+0021.



Or, as Microsoft explains it, for Microsoft Platform Software Development Kit-January 2000 Edition:



Richedit 4.1 maps the range of characters between U+F020 and U+F0FF in the PUA to symbol fonts. Therefore, when you map any character in this range, Richedit 4.1 shows the symbol character instead of the end-user-defined character (EUDC).



I think that meanwhile Microsoft has added the symbols to many Microsoft versions of fonts, to allow more recent Microsoft software to display those characters without switching fonts. For example, U+F020 shows a bullet in most fonts, but not in Arial on your Mac. Installing a Microsoft-version of Arial might help. But that might surely get you into other problems when you're using Arabic...


I doubt any non-Microsoft software will handle the above exceptions.


Still, in general:


One way to determine the name of the font: when printing from Word to PDF one can choose to include the font (or: the subset of characters that are used) in the PDF, to ensure it prints fine on systems that do not have that font installed. So, peeking into the PDF's properties might then reveal the name of that font. And maybe simply selecting the character in OpenOffice.org will already reveal its name in the font list. (However, given the automatic displaying of symbols like described above, both methods will probably not work for bullets at all.)


One way to determine the exact character code: copy it (for Pub Quiz , copy it from the auto-suggest in the search of iTunes) and paste into some Unicode code converter. This reveals that the Pub Quiz character is U+E047, which could be some odd double-quote. But well, as this is from a private use area, and we don't know which font the developers had in mind when they typed that name in the iPhone app-store, I guess only the developers can tell us what they hoped it would look like...


(Fileformat.info has a neat utility to show the character using all fonts on your computer.)


How to set date format when manually inserting date on excel, without changing regional settings?


In my locale, date is inserted as dd/mm/yyyy or variations of that (including dd-mm-yy). I made an Excel form (in normal Excel file), already formatted to show date as dd/mm/yyyy, but when I typed "05/04/2015" it will be shown as "04/05/2015". I know this can be solved by changing the regional setting to my local setting, but I need to distribute this form to a lot of people with no knowledge of changing regional setting, and assuming no one can teach how to, hence my question :


Is there any way to input "05/04/2015" and be recognized as "5 April 2015", without having to change regional settings ?


Additional note: When I mean "4 May 15" (typed in 4/5/15), Excel will recognize this as "5 April 15" because Excel takes input as "mm/dd/yy" format. I need to change the default behavior of Excel to take as "dd/mm/yyyy" as this is the way the users will input.


If possible, the setting should also included/embedded on the file to allow end-users use the form without even changing setting.


I'm not familiar with macros and VBA, but willing to try those :)


EDIT : this is related to my question : How to change date format from dd-mm-yyyy to dd-mm-yy in formula bar of MS-EXCEL?


but I don't need to change the whole formula bar, as long as Excel recognize that I'm typing in dd/mm/yy format.



Answer



The Worksheet_Change event could essentially accomplish what you're asking for, but you need to be sure the user intends things to change. I've added a 'Yes/No' choice box to my solution to prevent any accidental changes. Doing this without a choice box is risky because if you tried to edit an existing value the it would change back to the original formatting.


This code should 'live' inside the VBA code for the sheet you're wanting it to act on:


Private Sub Worksheet_Change(ByVal Target As Range)

Dim iDay, iMonth, iYear As Integer
Dim solutionRange As Range

'the cells you want the date to change for
Set solutionRange = Range("D4:D12")

'only triggers if the user's changing one cell
If Target.Count = 1 Then
If (Not (Intersect(solutionRange, Target) Is Nothing) And (Target.Value > 0)) Then
'disable application events so this change doesn't trigger itself
Application.EnableEvents = False

iDay = Left(Target.Value, 2)
iMonth = Mid(Target.Value, 4, 2)
iYear = Right(Target.Value, 4)

' Give the user a choice to say whether they need the date changed. You *can* remove both the 'If' and 'End If' if you really need to, but I'd strongly suggest keeping them.
If (MsgBox("Have you entered your date in the format 'MM/DD/YYYY'?", vbYesNo) = vbYes) Then
Target.Value = DateValue(iMonth & "/" & iDay & "/" & iYear)
End If

Application.EnableEvents = True
End If
End If
End Sub

video - FFmpeg - Trim and overlay - Freeze on frame


I am trying to merge two videos together (and some other effects) using FFmpeg. The command I am using used to work with an older version of FFmpeg. I have now built FFmpeg with the latest snapshot and the output video has started freezing part way through.


ffmpeg -y \
-i bunny_320x180.mp4 \
-i bunny_320x180.mp4 \
-f lavfi -i color=black \
-filter_complex "
[0:v]trim=0:6[v0];
[0:a]atrim=0:6[a0];
[1:v]trim=10:18[v1_trim];
[1:a]atrim=10:18[a1_trim];
[v1_trim]setpts=expr=PTS-STARTPTS+7/TB[v1];
aevalsrc=0:d=7[na1];
[na1][a1_trim]concat=n=2:v=0:a=1[a1];
[a0][a1]amix=inputs=2[amixed];
[2:v]scale=320x180,trim=duration=15[over0];
[over0][v0]overlay=eof_action=pass[over1];
[over1][v1]overlay=eof_action=pass[over2]
" \
-vcodec libx264 \
-map [over2] \
-map [amixed] \
-c:a libfdk_aac \
output.mp4

I have tried to reduce my command to the simplest state whilst still keeping the error. The input videos don't seem to matter, so I am using big buck bunny. My fade transitions have been removed and I just leave a black gap instead. I have played with various trim lengths and offsets, but not seen a pattern. The output video seems to freeze 10s in.


The output from FFmpeg is:


ffmpeg version N-82183-g6089c44 Copyright (c) 2000-2016 the FFmpeg developers
built with gcc 4.9.2 (Ubuntu 4.9.2-10ubuntu13)
configuration: --prefix=/home/jon/ffmpeg_build --pkg-config-flags=--static --extra-cflags=-I/home/jon/ffmpeg_build/include --extra-ldflags=-L/home/jon/ffmpeg_build/lib --bindir=/home/jon/bin --enable-gpl --disable-doc --enable-yasm --disable-decoders --enable-decoder='mpeg4,aac,h264,mpegvideo,mpeg1video,mpeg2video,png,mjpeg,rawvideo,mp3,pcm_s16le,pcm_u8' --disable-encoders --enable-encoder='mpeg4,aac,h264,libx264,mpeg1video,mpeg2video,png,mjpeg,libfdk_aac,rawvideo,pcm_s16le' --disable-parsers --enable-parser='aac,mpeg4video,ac3,h261,h264,vc1,mpegvideo' --disable-demuxers --enable-demuxer='aac,h264,mpegvideo,m4v,mov,vc1,mp4,concat,image2,mpegts,mp3,pcm_s16le' --disable-muxers --enable-muxer='h264,mpeg1video,mpeg2video,m4v,mov,vc1,md5,mp4,image2,mpegts,segment,null' --enable-protocols --disable-filters --enable-filter='aresample,scale,movie,overlay,color,fade,afade,pad,asetpts,amerge,aevalsrc,concat,amix,eq,colorchannelmixer,setsar,hue,atempo,crop,hflip,vflip,transpose,lut3d,volume,anullsrc,drawtext,streamselect,sendcmd' --enable-avfilter --disable-indevs --enable-indev=v4l2 --enable-indev=lavfi --disable-outdevs --enable-hwaccels --enable-ffmpeg --disable-ffplay --disable-ffprobe --disable-ffserver --disable-symver --enable-network --enable-libx264 --enable-zlib --enable-nonfree --enable-libfdk-aac --enable-pthreads --enable-libmp3lame --enable-openssl
libavutil 55. 35.100 / 55. 35.100
libavcodec 57. 65.100 / 57. 65.100
libavformat 57. 57.100 / 57. 57.100
libavdevice 57. 2.100 / 57. 2.100
libavfilter 6. 66.100 / 6. 66.100
libswscale 4. 3.100 / 4. 3.100
libswresample 2. 4.100 / 2. 4.100
libpostproc 54. 2.100 / 54. 2.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'bunny_320x180.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
title : Big Buck Bunny
artist : Blender Foundation
composer : Blender Foundation
date : 2008
encoder : Lavf56.25.101
Duration: 00:01:30.02, start: -0.012000, bitrate: 315 kb/s
Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 320x180 [SAR 1:1 DAR 16:9], 182 kb/s, 24 fps, 24 tbr, 12288 tbn, 48 tbc (default)
Metadata:
handler_name : VideoHandler
Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 128 kb/s (default)
Metadata:
handler_name : SoundHandler
Input #1, mov,mp4,m4a,3gp,3g2,mj2, from 'bunny_320x180.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
title : Big Buck Bunny
artist : Blender Foundation
composer : Blender Foundation
date : 2008
encoder : Lavf56.25.101
Duration: 00:01:30.02, start: -0.012000, bitrate: 315 kb/s
Stream #1:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 320x180 [SAR 1:1 DAR 16:9], 182 kb/s, 24 fps, 24 tbr, 12288 tbn, 48 tbc (default)
Metadata:
handler_name : VideoHandler
Stream #1:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 128 kb/s (default)
Metadata:
handler_name : SoundHandler
Input #2, lavfi, from 'color=black':
Duration: N/A, start: 0.000000, bitrate: N/A
Stream #2:0: Video: rawvideo (I420 / 0x30323449), yuv420p, 320x240 [SAR 1:1 DAR 4:3], 25 tbr, 25 tbn, 25 tbc
[libx264 @ 0x182b2e0] using SAR=3/4
[libx264 @ 0x182b2e0] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 AVX2 LZCNT BMI2
[libx264 @ 0x182b2e0] profile High, level 1.2
[libx264 @ 0x182b2e0] 264 - core 148 - H.264/MPEG-4 AVC codec - Copyleft 2003-2016 - http://www.videolan.org/x264.html - options: cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=6 lookahead_threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=crf mbtree=1 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
Output #0, mp4, to 'output.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
title : Big Buck Bunny
artist : Blender Foundation
composer : Blender Foundation
date : 2008
encoder : Lavf57.57.100
Stream #0:0: Video: h264 (libx264) ([33][0][0][0] / 0x0021), yuv420p, 320x180 [SAR 3:4 DAR 4:3], q=-1--1, 25 fps, 12800 tbn, 25 tbc (default)
Metadata:
encoder : Lavc57.65.100 libx264
Side data:
cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1
Stream #0:1: Audio: aac (libfdk_aac) ([64][0][0][0] / 0x0040), 48000 Hz, stereo, s16, 139 kb/s (default)
Metadata:
encoder : Lavc57.65.100 libfdk_aac
Stream mapping:
Stream #0:0 (h264) -> trim
Stream #0:1 (aac) -> atrim
Stream #1:0 (h264) -> trim
Stream #1:1 (aac) -> atrim
Stream #2:0 (rawvideo) -> scale
overlay -> Stream #0:0 (libx264)
amix -> Stream #0:1 (libfdk_aac)
Press [q] to stop, [?] for help
[Parsed_overlay_11 @ 0x1827040] [framesync @ 0x1827168] Buffer queue overflow, dropping.
Last message repeated 118 times
frame= 375 fps=0.0 q=-1.0 Lsize= 456kB time=00:00:15.01 bitrate= 248.7kbits/s speed= 22x
video:187kB audio:257kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 2.760969%
[libx264 @ 0x182b2e0] frame I:4 Avg QP:17.13 size: 10993
[libx264 @ 0x182b2e0] frame P:120 Avg QP:20.45 size: 963
[libx264 @ 0x182b2e0] frame B:251 Avg QP:24.37 size: 124
[libx264 @ 0x182b2e0] consecutive B-frames: 7.5% 7.5% 7.2% 77.9%
[libx264 @ 0x182b2e0] mb I I16..4: 33.6% 23.5% 42.8%
[libx264 @ 0x182b2e0] mb P I16..4: 4.6% 5.3% 2.0% P16..4: 28.1% 5.9% 3.4% 0.0% 0.0% skip:50.7%
[libx264 @ 0x182b2e0] mb B I16..4: 1.4% 1.0% 0.2% B16..8: 14.9% 0.5% 0.1% direct: 2.0% skip:79.8% L0:45.0% L1:49.2% BI: 5.7%
[libx264 @ 0x182b2e0] 8x8 transform intra:39.8% inter:56.9%
[libx264 @ 0x182b2e0] coded y,uvDC,uvAC intra: 22.2% 51.1% 21.4% inter: 5.4% 9.6% 1.3%
[libx264 @ 0x182b2e0] i16 v,h,dc,p: 52% 22% 20% 6%
[libx264 @ 0x182b2e0] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 20% 18% 55% 1% 1% 1% 2% 1% 2%
[libx264 @ 0x182b2e0] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 56% 9% 10% 4% 4% 4% 5% 4% 5%
[libx264 @ 0x182b2e0] i8c dc,h,v,p: 59% 21% 16% 3%
[libx264 @ 0x182b2e0] Weighted P-Frames: Y:15.0% UV:10.8%
[libx264 @ 0x182b2e0] ref P L0: 76.6% 7.8% 11.2% 4.4%
[libx264 @ 0x182b2e0] ref B L0: 90.7% 7.9% 1.4%
[libx264 @ 0x182b2e0] ref B L1: 96.5% 3.5%
[libx264 @ 0x182b2e0] kb/s:101.72

Is this an FFmpeg bug or a misuse of complex filters?



Answer



Try


ffmpeg -y \
-i bunny_320x180.mp4 \
-i bunny_320x180.mp4 \
-f lavfi -i color=black:s=320x180:d=15 \
-f lavfi -t 7 -i anullsrc
-filter_complex "
[0:v]trim=0:6,setpts=PTS-STARTPTS[v0];
[0:a]atrim=0:6[a0];
[1:v]trim=10:18,setpts=PTS-STARTPTS+7/TB,fifo[v1];
[1:a]atrim=10:18,asetpts=PTS-STARTPTS+7/TB[a1_trim];
[3][a1_trim]concat=n=2:v=0:a=1[a1];
[a0][a1]amix=inputs=2[amixed];
[2][v0]overlay=eof_action=pass[over1];
[over1][v1]overlay=eof_action=pass[over2]
" \
-vcodec libx264 \
-map [over2] \
-map [amixed] \
-c:a libfdk_aac \
output.mp4

Usually, if a single input is to be used in parallel, it's better to feed it once and then split it within the filtergraph. I've added a fifo filter to the 2nd trimmed segment to keep frames alive when the 2nd overlay occurs.


Unattended Windows 8.1 installation ISO


I want to make an unattended install of Windows 8.1 with the following features:



  • It has to be actived

  • It metro apps removed from the system

  • Some freeware applications installed such as CCleaner

  • Registry modifications to boot up directly to the desktop


Problems


When I have an ISO file and load it up into the Windows System Image Manager I can only modify registry settings and not install or remove software wich is automatticly getting installed by Windows.


I saw i can pre-install software with the Microsoft Deployment Toolkit 2013 program, but I dont like that because its not unattended.


Question


How can I make an unattended installation (with already software removed and installed) ISO file of Windows 8.1 without using the Microsoft Deployment Toolkit?



Answer



What you are trying achieve is creating a custom image.


You don't have to use Microsoft Deployment Toolkit for this purpose. Thing is, you could do this with MDT easily if you knew how to use it. Otherwise, it is quite confusing at the beginning. (With all those task sequences and stuff.) I found that creating custom images manually gives you more understanding about the imaging process.


With that said, there are guides on the internet about how to do this. This one is a really good example. One thing that is not mentioned in this guide that if you want a fully unattended installation, you would want to skip computer name dialog. To do this, use an asterisk for computer name in unattend.xml.


Please note that some 3rd party programs such as antiviruses (in my case it was NOD32) may prevent sysprep process and fail when you are deploying the OS.


After you are done sysprepping and machine is shut down, boot with Windows installation media and once you are at setup screen, press Shift + F10 to open up command line. Here you can use dism to capture an image. For example:


Dism /Capture-Image /ImageFile:E:\my-windows-partition.wim /CaptureDir:C:\ /Name:"My Windows partition"

Where E: could be an external HDD or something else, while C: being Windows installed partition. (If you don't have an external HDD you can simply create this file in C: drive too.)


Then you will replace that my-windows-partition.wim with install.wim in Windows 8.1 media.


To do that, copy contents of an 8.1 ISO to a folder. Replace install.wim in sources folder with your customized my-windows-partition.wim It has to be named as install.wim though.


Then you can use a 3rd party tool to create an ISO from that content.


While all these things may require quite some effort to do, you will achieve exactly what you want.
By the way, for having an easier and more fluent process, you should use virtual machines if you are able to.


I would like to explain all the steps that you are going to do but this is impossible due to how this subject is really extensive. So here are some references:


How to Create a WinPE ISO
How to Capture an Image
How to Create a Bootable ISO From Files and Folders
Also: How to Bypass Metro Start Screen


Edit Here:


I felt this post was not so explanatory to beginner users. So, i will explain like this:
Let's say you are replacing your computer. But you want to transfer everything exactly in its current state. Can you do that? Well, yes. You would sysprep your computer so your OS would be hardware free. Meaning you could install your OS on other computers. But how can you transfer it? Well, you could make images of your partitions. Let's say, whole C: drive to a single wim file. Then you could restore everything, using this wim file, on another computer. So it will work just like how it was working on the old computer. Cool, right? Yeah, but, what if i said that you could replace that wim file with the one in Windows 8.1 DVD? What would happen? You could install Windows with that image file to every computer, lol. Yes, you can do that. Basically, Windows installation uses a base image file in Windows 8.1 DVD to install Windows. What you have done here is, changing that wim file with your customized one.


So, i tried to explain the logic behind windows installation to clarify my answer. There are more things to consider about wim files, sysprep and windows installation but, i don't want to make this post any longer, cause it is already very long.


operating systems - how to right click a window title bar from a surface 3 tablet?

how do I right click the title bar for a window on a surface 3 tablet? There's no mouse, but there is a keyboard with mousepad.

cpu - In which direction should an extra case fan be fixed?


Possible Duplicate:
Optimal Fan Placement and Direction for Air-Cooling a Computer



This may sound dumb but this is a genuine question.


I just bought an extra fan for the case and installed it. It's working fine. I would like to know the orientation of the fan placement.


Currently, it is blowing air out of the case. Is this the correct placement?


Apologies for not including a picture earlier. Here it is:


enter image description here


The fan is blowing air to the other side of the case. The side which is not shown in this photo.

windows 7 - Is having a Firefox profile in the Dropbox a good combination?


I was pretty excited to see sites as Lifehacker and such say how Dropbox can also do synchronisation for Firefox for us. It would also allow me to sync extensions and configuration settings.


After moving the profile directory, it turned out that the bandwidth produced was just massive. It turned out my .Dropbox.cache folder became 5GB after a day and often 1200 files were in queue to be uploaded.


Why do many sites promote Firefox with Dropbox? It seems highly unworkable. Are there any users here? It keeps saying lock.file cannot be synced and 24/7 trying to upload/download lots and lots of files while browsing. It's hardly effective.



Answer



You could move the cache by going into the FF config page. Type about:config in the address bar and click the warning button. Right click somewhere on the about:config page and select New string in the context menu. In the first dialog box type browser.cache.disk.parent_directory and click OK. In the next box type the folder where you want to store your cache, e. g. c:\ (FF places the cache folder under the path you enter, in this example the cache folder would be c:\cache). Now you can sync to Dropbox without having to sync the cache folder. It is strange though that your cache folder isn't under Appdata\Local where it should be. Using my above method you could force it to be placed there.


microsoft excel - Apply VLOOKUP formula to multiple sheets

How can I apply a VLOOKUP formula to multiple sheets in Excel 2010?


Our formula is written and it is working on our Sheet 1, but we need to search 3 Sheets (within the same Workbook), preferably simultaneously.

Is an idle temperature of 66°C for the A10-6800K CPU normal?

I have an A10-6800K CPU and Piriform Speccy says that my CPU temp is 66 celcius in idle, the same goes for HWMonitor.


Is this normal/ideal? I have a Coolermaster V10 with a HAF 932 case.

Can I Transfer The Windows 8 License of My Laptop to My Desktop?



My sister asked me to fix her Sony Vaio VPCCW23FX which she had recently installed Windows 8 Pro. However, that model is not compatible with Windows 8 and is having problems. We restored it to the pre-installed Windows 7 Home Premium. Now, I am wondering if I can use her Windows 8 license on my desktop?



Answer



Yes, you can. But you can only use the license on one machine at a time.


Once the license has been added to a certain computer it will bound there. The next time you register another machine with the same code it will give you an error.


But of course if you are not using the license on the old computer anymore. You can just give Microsoft a phone call (phone activation). Where someone will walk you through to some procedures and ask you some questions then release the license allowing you to reuse it on the new computer.


But phone activations are only available on weekdays. So you can try these steps, it might work:


Press Windows key + X
Click Command Prompt (Admin)
type: slmgr.vbs -upk
Enter

This will uninstall the product key from the computer. You can now use it on another machine.


Tuesday, 30 October 2018

linux - Disable automated updates (and notifications) in Kde Debian


I am using Kde 4.5 in Debian and I get some notifications after start that I need to update something. How can I disable it (I often don't want to waste bandwidth for such things)?


I am using Debian Wheezy and Kde 4.5



Answer



Open the KDE System Settings application. (I find the easiest way is to press Alt+F2, type in systemsettings, and press Enter. But you can also launch it from the K menu if you like.)


Choose Software Management under System Administration:


systemsettings System Administration section with Software Management highlighted


Then select Settings from the left panel, and under Check for updates, choose Never:


Settings panel from Software Management KCM applet


Finally, click Apply. KPackageKit will no longer bother you about updates. But, remember to use apt-get or your favorite package manager to download updates periodically so you aren't exposed to security vulnerabilities.


Automatically testing all parts of a new computer

What would be the best way to run tests on all parts of a new computer after first putting it together?


I'd want to test the RAM, the CPU and the hard disks. (I assume there's nothing else worth testing)


The best thing would be to run something that would automatically do tests on all those parts and give a report at the end so you could easily see if there are any dodgy parts that need to be sent back and replaced.


Is there a program that achieves what I want already? Maybe even a live CD?


Or do I need to pick the tools I want to use and somehow automate them? MemTest for the RAM, manufacturer's tool for the hard disk etc?

emacs - Aquamacs overrides my custom-set-faces options

I've just installed Aquamacs on my Mac.


I have a .emacs file in my home, which contains all my customizations. Among these, I have:


(custom-set-faces
'(default ((t (:stipple nil :background "black" :foreground "grey70" :inverse-video nil :box nil :strike-through nil :overline nil :underline nil :slant normal :weight normal :height 140 :width normal :foundry "apple" :family "Monaco"))))
'(font-lock-builtin-face ((t (:foreground "grey50"))))
'(font-lock-comment-face ((t (:foreground "darkgreen"))))
'(font-lock-constant-face ((t (:foreground "grey50"))))
'(font-lock-doc-face ((t (:foreground "grey50"))))
'(font-lock-doc-string-face ((t (:foreground "yellow2"))))
'(font-lock-function-name-face ((t (:foreground "SteelBlue"))))
'(font-lock-keyword-face ((t (:foreground "red"))))
'(font-lock-preprocessor-face ((t (:foreground "SteelBlue"))))
'(font-lock-reference-face ((t (:foreground "LightSkyBlue"))))
'(font-lock-string-face ((t (:foreground "yellow2"))))
'(font-lock-type-face ((t (:foreground "violet"))))
'(font-lock-variable-name-face ((t (:foreground "orange"))))
'(font-lock-warning-face ((t (:foreground "grey50"))))
'(isearch ((t (:background "yellow4" :foreground "black"))))
'(mode-line ((t (:background "grey90" :foreground "black"))))
'(text-mode-default ((t nil)))
'(zmacs-region ((t (:background "grey70" :foreground "black")))))

This block seems not to be applied automatically.


If I select the lines from the .emacs and manually evaluate them, everything works fine. My guess is that these options are overridden in some other place.


How can I debug this? Where should I set my custom faces?


UPDATE:


According to this, preferences should be loaded in the following order:


 ~/.emacs  (deprecated -- meaning 'should not be used
for new installations, but will continue to be supported' -- in Aquamacs on OS X)
customizations saved by request or automatically by Aquamacs in customizations.el
/Library/Preferences/Emacs/Preferences.el
/Library/Preferences/Aquamacs Emacs/Preferences.el
~/Library/Preferences/Emacs/Preferences.el
~/Library/Preferences/Aquamacs Emacs/Preferences.el

My ~/Library/Preferences/Aquamacs Emacs/Preferences.el looks like (by default):


 (load "~/.emacs")

So this doesn't really make sense to me...

netsh wifi hotspot config max clients

I've set up a wifi hotspot on my computer using netsh commands.


I would like to know if it is possible to change the max number of clients ("netsh wlan show hostednetwork" shows maxclients=100).


I suppose it is using the command "netsh wlan set profileparameter" but I do not manage to use it.


Thank you for your help.

Virtualbox 6 doesn't run with Hyper-V enabled on Windows 10 1903

As explained in the Virtualbox documentation, starting from version 6, Virtualbox supports running VMs un Windows with Hyper-V enabled. It should use Hyper-v in automatic way to run the VMs. https://docs.oracle.com/cd/E97728_01/F12469/html/hyperv-support.html


The issue is it appears to not be true. I'm running a Virtual Box 6 VM, and I get the typical error "VT-x is not available (VERR_VMX_NO_VMX).".


Why?

linux - command not found when using sudo


There are a few question on the site that seem related to my problem but I could not find a solution in any of them.


My operating system is Ubuntu 12.04. I have mvn installed in /tools/noarch/apache-maven-3.1.1 and I have added the following lines at the end of my /etc/profile:


export M2_HOME=/tools/noarch/apache-maven-3.1.1
export PATH=$M2_HOME/bin:$PATH

After that I execute source /etc/profile.


Now my problem is: when I run mvn --version the command succeeds and mvn executable is found, while if I execute: sudo mvn --version I get the output: sudo: mvn: command not found. I know that PATH may be different when I execute a command with sudo and that is why I tried this:


$>sudo echo $PATH
/tools/noarch/apache-maven-3.1.1/bin:... some other stuff ...

Another thing I tried is to execute sudo su - and then type mvn --version. In this case mvn is successfully found and the command succeeds. What is going on here?



Answer



$PATH is evaluated by your shell, so your check doesn't work as you expect it to.


/etc/sudoers is configured to replace your PATH with a default one.


sudo does not load a login shell environment before executing the command, so the default PATH from /etc/sudoers is used. su - does open a login shell, which involves loading /etc/profile. See man bash, section INVOCATION.


Just remove the PATH reset in /etc/sudoers. It's likely a rule called secure_path.




CentOS


In CentOS you can add PATH to the Defaults env_keep section:


Defaults    env_keep = "COLORS DISPLAY HOSTNAME HISTSIZE INPUTRC KDEDIR \
LS_COLORS MAIL PS1 PS2 QTDIR USERNAME \
LANG LC_ADDRESS LC_CTYPE LC_COLLATE LC_IDENTIFICATION \
LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC \
LC_PAPER LC_TELEPHONE LC_TIME LC_ALL LANGUAGE LINGUAS \
_XKB_CHARSET XAUTHORITY PATH"

windows 7 - File and Printer Sharing will not stay on after enabling

I'm having the same problem I've seen many people post on here and elsewhere on the web, sometimes resulting in dead-ends or very obvious answers.


Mine is one of those dead ends - every time I try to enable file and printer sharing in my Windows 7 Professional 64 bit PC, I click apply, it closes, and then I click on the advanced settings to check and see, and sure enough, it's disabled again.


All the correct services are running, I even went as far as resetting the firewall to default, and ensuring nothing was tampered with in msconfig and services.msc, as I mentioned before. In other words, I've tried everything I can think of, and everything everyone else seems to be able to think of, but file and printer sharing will stay turned off under any type of network setting or homegroup setting.


I've been able to use file and printer sharing on my other Windows 7 Professional installs that have mostly the same software installed as on that is being "difficult."


I'm stumped. I don't think I've ever been so lost that I had to myself post a question on a forum for a windows related issues, and I've been working in this field 15 years! (that's how baffled I am, :)

NTFS partition is lost, but data (should be) there, how to recover?

Shortly: I've got troubles with a lost partition and Testdisk is not able to solve my problem. Everything makes me think that files are on the disk, but I don't know how to get them back. Also, I'm not an english native speaker, so I apologize for eventually doing some mistakes.


Details


I tried to resize a NTFS partition on my drive with gparted (linux was running), but the operation failed and I lost the filesystem.


This was the disk BEFORE:


125 GB - primary - NTFS (windows)
3 GB - primary - linux swap
21 GB - primary - ext4 (linux)

This is what I meant to do: shrink the NTFS partition FROM THE LEFT in order to make free space at the beginning of the disk. In gparted I edited the partitions like this:


60 (more or less) GB - unallocated
60 (more or less) GB - primary - NTFS (windows) (shrink)
swap and ext4 same as before (unchanged)

and clicked "Apply". During the process I was reading what was going on: it was transferring 30 GB of data from the first part of HD to the new smaller NTFS partition. This part was succesful (you know, shrinking process is made of several parts, and this files transfer was ok). Then I guess gparted tried to create the new MFT and update MBR but it failed. My biggest mistake of the day was that I didn't save the logs (does gparted automatically save logs?) but as far as I remember the error was something like "free clusters more than expected". Well, the result is the following:


67 GB - primary - NTFS (gparted says: "Failed to load runlist for $MFT/$DATA. highest_vcn = 0xc747, last_vcn - 1 = 0x1633b . Failed to load $MFT: Input/output error . NTFS is inconsistent")
57 GB - unallocated
swap and linux are unchanged

I run Testdisk from a bootable USB, I did quick scan but it didn't find anything new. With deep scan it found an additional NTFS partition:


NTFS 0 32 48 16305 55 6 261941233

but when I type "enter" or "p" to view files it says "partition is corrupt".


Some notes:


1) it's strange that my instructions were to create free space BEFORE NTFS, but what gparted sees now is unallocated space AFTER NTFS. And NTFS is inconsistent. Maybe gparted created the new MFT in the first partition and failed to copy to the second?


2) from what I read during the operation, the files should be all in the unallocated space.. how can I find them? I would try to recover them in an ordered way, since if I use PhotoRec I would loose any directory structure.


What should I do? please help or my girlfriend will kill me! (it's her computer.. :O )

linux - How do I efficiently move a large, empty disk image to another system


I'm currently trying to move a fairly empty, fresh qcow2 image from one system to another that's far away. I've basically got a fresh install of ubuntu LTS (real size 6gb, apparent size 200gb). Most file transfer methods (rsync over ssh) and sftp with duck attempt to transfer over 200gb.


This is inefficient since the disk image isn't actually using 200gb (just that it might, eventually). What would I need to do to transfer only what's used by the VM?


Both ends of the transfer run fedora 22, and I'd ideally not want to switch disk image formats, tho that would an option. Speed would be nice - I don't want to trade off transfer time for processing time.



Answer



rsync actually handles sparse files. When you say real size of 6GB and apparent size is 600GB, do you mean that du -h IMAGE.qcow2 shows "6G" but du -h --apparent-size IMAGE.qcow2 shows "200G"?


If so, you can add the -S flag to rsync to make it transfer files sparsely, meaning that you'll be sending over 6GiB of data instead of 200GiB.


It also sounds like your qcow2 image is not compressed. If you have the CPU resources to spare and your bandwidth is less than how fast your CPU can gzip, you can also pass the -z flag to rsync, which has rsync compress its file transfer as well.


I've got a fire-and-forget hotkey for rsync based off of this Super User question and it makes efficient and preservative file transfers most of the time: rsync -avzHXShPs


audio - What is the cause of interference noises in my PC speakers and how can I get rid of them?


My PC's desktop speakers are periodically producing interference noises induced by my cellphone.


Even if I move my phone away from the actual speakers, the noises are still present with the same intensity. I have to completely move the phone away from my desk to get rid of the noises.


I know many different speakers and phones are affected by this as this has been an issue for me ever since I owned a mobile phone.


Why is the phone causing these noises even though it's far away from the actual speaker? What can I do to get rid of the noises (while keeping my phone on the desk)?



Answer



The cause of these noises is electromagnetic interference. Common phone radio frequencies can generate a signal in unshielded audio wiring through electromagnetic induction. This undesired signal is amplified by the speakers, producing an audible (and nasty!) noise.


An easy way to stop this noise is to use a ferrite choke on the wiring, to block higher frequencies.*


These should be placed close to the speaker for maximum effectiveness. There are two main types that are easy to apply:




  • Snap on ferrite beads


    These typically come in a plastic casing that splits in half, and can be snapped around your wiring. They are easy to apply.




  • Toroidal ferrite cores


    These come in a toroidal ('doughnut') form. Just loop the wiring through a few times.


    enter image description here




There is no set number of turns, just add more until the interference stops.


Ferrite chokes/beads/cores are easily and cheaply available from many sources. If you have an old USB cable or similar, there are often bulges near the ends. You can rip a ferrite bead off of that. PSUs and computer motherboards also often contain ferrite cores, which can again be ripped off for this purpose. Alternatively, many hobby/electronics/online stores carry them.




*As a side note, higher quality speakers will often include these filters. It's normally the cheaper speakers, especially those sold with/for desktop computers, that get effected.


linux - Why is a failing hard disk slow?

From my currently failing hard drive, I know that I'm erasing it with a write speed of around 300kB/s cause of at least of few bad sectors


I'm curious about what exactly causes this slow write speed? For example, given the linux programm dd to write to a disk one usually gets at least 75MB/s assuming a 4kB sector size would result that one 4kB sector gets written in around 0.05 milliseconds (if my calc is corrent ^^). If I write with 300kB/s to a failing disk it means that 4kB is done in about 13 milliseconds.


So given a well written userspace application able to write with 75MB/s what causes a drop to 300kB/s? I don't assume that the linux kernel has some kind of "sleep" or such high retry attempt that it takes so much longer to notice a failed write? Or does the disk itself slow everything down? If yes, why? I would assume that the physical disk knows immediately if the data could have been written or not? Why does a failing disk get slow?

colors - How to colorize specific strings in powershell textbox

How to colorize specific strings in text box in powershell forms. I don't use any "studio" applications.


Output for example:


Searching...
a - found
b - Not found
c - found

Expected result:


Searching...
a - found
b - \red\Not found\red\
c - found

I heard about RichTextBox, but when using the code bellow it doesn't print anything, just an empty string(no errors appeared from code)


$StatisticsBox = New-Object System.Windows.Forms.RichTextBox 
$StatisticsBox.Location = New-Object System.Drawing.Size(170,30)
$StatisticsBox.Size = New-Object System.Drawing.Size(150,320)
$StatisticsBox.MultiLine = $True
$StatisticsBox.ScrollBars = "Vertical"
$StatisticsBox.ReadOnly=$True
$Form.Controls.Add($StatisticsBox)

$StatisticsBox.SelectionColor = 'red' <---- also tried "color.red"
$StatisticsBox.text = "`r`nNot Found:`r`n" + $StatisticsBox.AppendText("colored stirng") + "`r`n" +$StatisticsBox.text

windows 8.1 - Where is the offline copy of my onedrive synced Onenote file?


I have moved from Windows 7 and OneNote 2010 to Windows 8.1 and OneNote 2013. I backuped my OneNote book to a external drive and then opend it on Windows 8.1 again and (because i wanted to sync my Notebook with my Windows Phone 8.1 OneNote) I made it stored in my OneDrive as suggested by OneNote. This works pretty fine, everything is sycned properly and so on.


But I do not see where the local backup of my OneNote is stored on the PC? And this confuses me, as all my OneDrive files are made offline available on my PC. Under C:\users\\Documents\OneNote\ there is no OneNote (or related) file. Under C:\users\\Documents\OneDrive\Documents\ there is a shortcut/link to (apparently) my OneNote file on Onedrive. So nowhere on my PC I can find my 1.3GB OneNote file, although it is made offline available.




My final question after this long introduction: Where is my OneNote file stored on my PC?



Answer



The OneNote offline cache is stored in C:\Users\\AppData\Local\Microsoft\Onenote a hidden file.


windows xp - why does "program not responding" freeze shut down on one machine but not on another?


I often get "program not responding" issue on my Windows XP Pro machines during shut down. However, one machine just ignores it and shuts down. But the other essentially freezes until I manually say "end task", and that is very inconvenient.


Is this a known issue? Is this a matter of user specified OS settings, or hardware peculiarities or basically why would something like that happen?



Answer



This is configurable via a registry setting.



  • Go to Start -> Run and type regedit in the box then press Enter

  • Expand the treeview to:


HKEY_CURRENT_USER\Control Panel\Desktop

If the value AutoEndTasks isn't there already, you can create it. It should be a string value (REG_SZ).



  • Setting it to 0 will disable it (tasks will have to be ended manually)

  • Setting it to 1 will enable it (it will automatically end the programs for you)


windows 7 - How can actually fit the page size to the drawing in Microsoft Visio 2013?


I want to fit the page size to the drawing in Microsoft Visio 2013.


When I do design → Page setup → size → fit to drawing, they are still some margins:


Screenshot
(Click image to enlarge)


There doesn't seem to be any way to change the margin in the page setup either:


enter image description here


How can actually fit the page size to the drawing? My goal is to export the figure as a PDF with all the surrounding white spaces cropped out.


I use Microsoft Visio 2013 Professional on Windows 7 SP1 x64 Ultimate.



Answer



To remove all margins:



  1. On the File tab, click Options, and then in the navigation pane, click Customize Ribbon.


enter image description here



  1. In the Main Tabs pane, click to select the Developer check box, and then click OK.


enter image description here



  1. On the Developer tab, click Show ShapeSheet, and then click Page.


enter image description here




  1. In the Print Properties section of the ShapeSheet, set the following values to 0: PageLeftMargin; PageRightMargin; PageTopMargin; PageBottomMargin


    Otherwise, just set 0 to PageLeftMargin, and value PageLeftMargin for the rest i.e. PageRightMargin; PageTopMargin; PageBottomMargin




enter image description here



  1. Use the Fit to Drawing command again. The page now resizes to fit the same dimensions of the drawing, and there is no margin.


Demo: http://youtu.be/3zmVUyg0tMI


Monday, 29 October 2018

bash - Need to expand a variable in a HEREDOC that is in quotes


Is it possible to use a HEREDOC and get variable expansion to happen when the variable is in quotes?


Example: $package is an environment variable that is set before the script runs


#!/bin/bash

cat > out.json <<'EOF'
{
"apps": [
{
"cwd":"/usr/local/$package"
}
}
EOF

Expected output if $package="www"


{
"apps": [
{
"cwd":"/usr/local/www"
}
}

Answer



TL;DR


Use < instead of <<'EOF'.




This is what POSIX says about here-documents [emphasis mine]:



[n]<    here-document
delimiter

[…]


If any part of word is quoted, the delimiter shall be formed by performing quote removal on word, and the here-document lines shall not be expanded. Otherwise, the delimiter shall be the word itself.


If no part of word is quoted, all lines of the here-document shall be expanded for parameter expansion, command substitution, and arithmetic expansion. […]



In you case word is 'EOF' (quoted!), so $package inside the here-document is not expanded. Drop these quotes and you will get the desired result.


cat > out.json <{
"apps": [
{
"cwd":"/usr/local/$package"
}
}
EOF

Note this has nothing to do with quotes that surround the variable inside the here-document.


Use all 5.1 speakers with a 2.1 audio source


I just bought a 5.1 surround sound speaker set for my computer in my bedroom. The rear speakers are next to me in bed while the front speakers are at the other end of the bed at my feet. While I enjoy the surround sound during movies that support 5.1 sound, I would like to have my rear speakers working when listening to podcasts, or other 2.1 channel sound. How can I do this? When I enable "Speaker Fill" in the Realtek Hd Audio manager the sound only comes out of the front and center speakers with a few background noises that come out the rear ones. But since my ears are closer to the rear speakers, I'd rather have the sound come out of them.


Let me know of any ideas!


Hmm seems like the only option is to set the rear speakers to "Front Speakers" and change it to stereo in the Realtek HD audio. But still that take alot of steps and it doesnt not use the center speaker Thanks



Answer



This might not be exactly what you're after, but there is a Winamp plugin for Windows Vista/7 that provides various options for upmixing stereo signals to 5.1 (and higher), you might just be able to make out the configuration options from this blurry screenshot:


VL Sound 5.1 Setup


centos - Xserver doesn't work unless DISPLAY=0.0


Using CentOS. I cannot connect remotely and I believe it is related to fact I can only connect locally if DISPLAY is set to :0.0. Something is misconfigured but I can't figure out what.


>xhost +

access control disabled, clients can connect from any host

>emacs -d :0.0

#works

>emacs -d 127.0.0.1:0.0

Cannot connect to X server 127.0.0.1:0.0.

>emacs -d localhost:0.0

emacs: Cannot connect to X server localhost:0.0.

Answer



This is because Xserver is refusing TCP connections


run gdmsetup as root and uncheck "Deny TCP connections to Xserver"


windows 10 - Win10 OEM key extraction. No MSDM tab

I just bought a new Dell XPS 13 with win10 pre-installed. I want to completely wipe the drive and install Ubuntu 16.04. But before I do that I would like to extract the oem product key. I've tried using neo-smart tools and rw-everything as well as booting into a linux live cd and extracting it via cat /sys/firmware... but nothing works. I don't have an MSDM tab. How can I get my product key?


#

I downloaded and ran showkeyplus and have a field called "installed key". I just want to clarify that if I want to re-install win10, that product key will work.

Windows disk info shows used space that I can't find


I have a 250 GB SSD installed as my primary disc on which I have Win 10 installed. I just recently realized that the explorer overview & the windows disc property dialog stated, that there are 200 GB used & only 31 GB free on that disk.


Since I was curious on where that much used space came from, I started the free application WinDirStat which told me that there were only 62 GB used on C.


Also if I select everything under C with hidden files & system folders shown in the explorer, the properties dialog states that those are only 62,5 GB in sum.


Where do the 200 GB used space come from which are shown in the disc overview?


enter image description here



Answer



Selecting all files and showing properties skips files where your user accound doesn't have access to while showing the disk pproperties reads the NTFS meta data and always shows the correct usage.


Run TreesizeFree (as admin) to see a better view of the disk space usage. Running as admin shows hidden folder like System Volume Information where system restore points and chkdsk logs are stored.


enter image description here


enter image description here


Windows 7 Keyboard shortcuts switch unexpectedly


Does anyone know why my keyboard would suddenly start mapping the "D" button to the "WINDOWS+M" shortcut, and do a bunch of other different keyboard mappings? The only thing that seems to resolve this is a reboot of my computer.



Answer



Win+M and Win+D have very similar results. Your D may be remapped to Win+D.


I have seen many times various modifier keys getting stuck. If there's a lot going on on your computer, keys can become stuck, not physically but mentally as far as the compter remembers. It remembers you pressing the key, but missed the point where you released the key, so it thinks it's still pressed.


Press each Alt, Ctrl, Shift and Win once each to reset their state. I've also had to do the same for Arrow keys in the past, particularly when playing games.


linux - What this command :(){ :|: & };: does?



What does this shell command do in Linux


:(){ :|: & };:

How can it be used in Denial of Service attacks?



Answer



It's a fork bomb. I actually have that written on my whiteboard (as a joke) as I speak. Don't run it.


:()         # define a function named :, () defines a function in bash
{
: | :; # the pipe needs two instances of this function, which forks two shells
}
; # end function definition
: # run it

So, the first run makes 2 subshells, which then each runs 2 more subshells...


: is a built in command in bash. It's kind of a "null" no-op command. It used to be the comment character, before there was a comment character. Now, it's got a small use as a no-op, but really used here because it's more cryptic, you look at :() and think WTH is that?


Sunday, 28 October 2018

microsoft excel - How to group count by week date in PowerPivot

I have a table of data in PowerPivot connected to a sharepoint list. Each row has a date that I need to group by week and count the rows in that week. Is there a DAX formula or other approach to make this happen? I have not found a straight forward solution to this issue. Seems simple enough that there should be a way.

hardware failure - No black ink printing for MFC 490CW Brother printer?


I have a Brother model MFC 490CW color printer than has three color ink and one black ink cartridge.


I've replaced the black ink cartridge, but I still get no black ink being printed, the three color inks are printing correctly. What could be going wrong and how might I fix this? The printer had been idle for about nine months, could there be some kind of clogging? The printer's clean utility did not help.



Answer



I cleared the ink jets on a brother MFC-490CW on the first try.



  1. I had no black after 3 or 4 Power_P ALL cycles.

  2. I took the alcohol injection route.

  3. I removed all 4 ink cartridges.

  4. Using a flashlight,I found the inlet tube for the black ink.

  5. Using the thin rubber tube from an antifreeze tester which fit snugly over the black ink inlet tube,I injected about 1/4-1/2 oz. of Everclear(90% ethyl alcohol) into the tube under pressure.

  6. replaced ink cartridges.

  7. I ran the Power_P cycle once more.

  8. Black functioned 99% on first test page and 100% on second.


user interface - How to adjust UI scaling for Chrome?


For some reason when I opened chrome this morning I noticed that the entire UI has been scaled up slightly. Everything (buttons, text, webpages, etc.) is about ~10% larger than it used to be. This is really annoying since now less fits on my screen (particularly now my bookmarks bar doesn't fit as many bookmarks).


I can't find any kind of UI DPI scaling option in the settings. How can I change it back to what it used to be?




Notes:



  • This isn't a problem in the Windows DPI scaling settings since this didn't happen with any other programs.

  • I know how to zoom in and out of webpages, but that's definitely not the problem as the entire UI is scaled up, not just the webpage.



Answer



With the Chrome 54 update they made it so Chrome can detect the DPI setting on your computer so that the web browser will be scaled accordingly.


Google Chrome didn’t used to pay attention to your Windows DPI setting. Now it does, and that’s the root cause of the large interface issue.


If you have the DPI scaling set to 125% or greater on your Windows computer, then the Chrome browser will scale differently depending on that setting.


Option #1



Have Windows specifically tell the Chrome program not to do DPI scaling by:


Right-click the Chrome icon > Properties > Compatibility > and CHECK "Disable display scaling on high DPI settings"



enter image description here


Option #2 (Seems to be most successful)



The obvious fix is to just set your computer’s DPI scaling back to 100%. That will make Chrome appear how it used to but everything else will be smaller, so it’s not a very good fix.


Just type “dpi” into your Windows search bar and open the top result, “Make text and other items appear larger and smaller” (at least that’s how it is on Windows 7).



Option #3



Right-click on the Google Chrome shortcut or start menu icon and select >properties > shortcut tab


Enter the following code at the end of the text in the Target field:


/high-dpi-support=1 /force-device-scale-factor=1


Make sure there’s a blank space between the .exe” part and the first forward slash.


Hit Apply and then restart Chrome.



If the scaling isn’t back to normal, make sure to launch Chrome from the location specified above. If Chrome is on your taskbar, don't forget to unpin Chrome and repin it. This isn't a permanent fix anyway because other links to Chrome (like hyperlinks in PDFs) can trigger the larger UI as well.


linux - Notebook's Battery is not calibrated. Operates at 0% for an hour

My problem is that even if the battery percentage is 0 the notebook can stay on around an hour. I have disabled "critical battery action" on my operating systems to use more time my notebook. The designed capacity is 66 Wh, the battery currently reports 9 Wh when battery is full.


I tried to fully charge the battery (around 5 hours) and then let the battery drain completely. That increased the full energy value from 3 Wh to 9 Wh.


Is there any way to trully fix the full capacity value of the battery?


I think that the battery's problem occured from my previous faulty power supply.


My notebooks is Dell Inspiron 3521. Operating Systems: Ubuntu 14.04 based & Windows 8.1


Battery Details:


Vendor : Simplo
Model : DELL 4DMNG31N
Energy : 9,2 Wh
Energy When Full : 9,2 Wh
Energy (design): 66,6 Wh
Voltage : 12,2 V

More Info Requested:


The battery is 1.5 years old, the previous battery after a year was dead ("Battery has experienced permanent failure" message at boot) and Dell send me a new one. The power supply some times couldn't charge the notebook and sometimes gave less watt than 90 that my notebook needed (problem with the cable, just received a new one from Dell too) Bios doesn't have any utility for the battery.

Use an old laptop as a monitor?


Possible Duplicate:
Can I use my laptop as a second monitor for my desk computer?



I have an old Acer laptop P-II whose LCD I want to use like a standalone analog monitor or LCD TV -- is this possible?

Prevent "mysterious" folders in drive root from appearing without disabling Windows Update



In this question it is asked and answered why mysterious folders appear at the root of my D-drive periodically, named e849ad3686d570a415, 57431c392d6db70ad5bfcd1a6676a241, etc, containing folders like i386 and amd64: they're leftovers from Windows updates. It is also explained there that it is safe to delete those folders.


In fact, there are more similar/related questions:



None of these questions or their answers explain how to prevent it from happening, apart from the obvious conclusion to just disable the root cause (Windows update) entirely.


So my specific question then is: How can I stop this from happening, without resorting to rigorous solutions such as disabling Windows Update, moving over to Linux, etc., and without resorting to creating an after-the-fact solution (e.g. a scheduled task to delete these folders)? Is that possible?


What I've tried so far is looking for a way to find out what specific process generates these folders so I can narrow my search for a solution. I've found this question on ServerFault about a general way to find out such things, but it isn't very helpful. I've tried checking who the owner of those folders is, but MY-PC\Administrators doesn't tell me much either. I've tried dir e849ad3686d570a415 | format-list * in Powershell, but it tells me nothing of interest. I've Googled around but that mainly leads to aforementioned question.


Bottom line:
How can I stop these folders from appearing? Removing them by hand is getting pretty old and writing a script or task to do this periodically "feels dirty".



Answer



Some redistributable installers and/or updates from Microsoft extract their files to a subdirectory (or even root directory!) of the drive with the most free space or your system drive. You cannot do anything to stop this, because it’s the installers’ fault. The only “workaround” would be not to install or update anything.


usb - Certain thumbdrives keep a system from going out of the boot screen

I have an old r51 which I boot off USB. Apparently, if I have a Toshiba 2GB thumbdrive similar to this plugged in:


enter image description here


... or an old imation 1GB drive plugged in, it won't boot at all - it freezes in the BIOS loading screen until it's unplugged. I need to try it on another system but I'm wondering what could be causing it - since I suppose this is at a lower level than filesystem, and the drives work fine otherwise - even being readable if inserted after the system is booted from another source, with neither drive plugged in.

Transfer image clipboard between host and VirtualBox guest?


Is there anyway to transfer clipboard content of image format, JPEG, bitmap or whatever, to or from the VirtualBox guest instances?



Answer



VirtualBox support for clipboard sharing is indeed still lacking a formal support for graphics. Officially it only supports text at this time. But if you are under a Windows host, and only under a Windows host, it will support images.


See: Shared Clipboard and Graphics


data recovery - Can I repair a physically broken USB drive?

My friend just wrote to me, all in panic, that he had broken his USB with his math homework for tomorrow. (Yes, no other backups, just that.) It looks like this now:



Is there any way that I could fix this? My thinking is soldering it together but I want to hear if anybody has experience with this or any tips?


Another option would be to see if Word has saved the file as a temporary file, but in the places my friend has looked there was nothing.

windows - How to copy ONLY those files that are not in the destination?

Is it possible to use robocopy to copy only the files that do not exist in destination?


robocopy has a /is (include same files) switch. What I am looking for is an /xs switch. If a file exists in both the source and the destination I don't want it to be copied. The criteria is file name only, regardless of modified day, size, etc. For example, even if the source has a newer file (based on modified date) than the same file in the destination, I don't want it to be copied. Possible to do this? Thanks.

Running iOS app on Windows NT4




Possible Duplicate:
Using Apps on non-IOS devices?



Are there any emulators or such thing to run an iOS app on windows?


Anything like that available NT4?


(I don't make up the requirements, I just analyze them.)


EDIT


NT4 is a very hard requirement. This is a common restriction for on-board avionics software. It's not in my power to overhaul a whole industry.



Answer



iOS itself is not available for development on Windows even. It is restricted to OS X and requires a licensing fee per year.


That being said, there are no fully functioning and updated Emulators available currently. The best way to use iOS would be to purchase a device running it, or use the iOS Simulator that is part of the developers package, for OS X only.


Also NT4 is VERY old. I think you may want to consider upgrading your computer hardware and operating system soon.


Emulate middle mouse click on a two button mouse in Windows 7

I have a mouse with only two buttons but I still need to use the middle mouse click for some programs. Is there a way to emulate the middle mouse click (e.g. by adding a keyboard shortcurt) in Windows 7?

network adapter - Realtek NIC running at 100Mb/s rather than 1000Mb/s


My Realtek NIC in my Windows Home Server (essentially w2k3) box refuses to run at 1000Mb/s even if I change the driver settings from Auto Negotion to 1000Mb/s full duplex. I've installed the latest driver and tried changing the speed setting but I'm having no luck. Not sure what to try next. Any ideas?


I have a Netgear GS605 v2 Switch supports 10/100/1000 D Link DIR 655 router.


All my machines bar one/2 have 1000Mb/s NICs (Old laptop/Xbox being the exceptions)


The reason I noticed the problem was because I was copying files between two machines and maxing one NIC out and only seeing 10% on the other machine. I do have a fairly lengthy cable between the switch and the router (maybe 20m) could that be the issue?



Answer



As others have already noted you need to be connected to a gigabit switch and, of course, there will need to be other gigabit enabled computers connected to that switch to get any practical benefit.


Note that if you are using a garden variety router/modem/switch it is almost certainly going to only be 100Mbit.


The other thing to be wary of is the cables being used. Yesterday I tracked down a similar problem in my own network where one of the computers would only connect at a slow speed. It turned out to be a dodgy Ethernet cable. You will need cables marked as Cat5E or, preferably, Cat6.


Clarification of the difference between PCI memory addressing and I/O addressing?


Could someone please clarify the difference between memory and I/O addresses on the PCI/PCIe bus?


I understand that I/O addresses are 32-bit, limited to the range 0 to 4GB, and do not map onto system memory (RAM), and that memory addresses are either 32-bit or 64-bit.


I get the impression that memory addressing must map onto available RAM, is this true? That if a PCI device wishes to transfer data to a memory address, that address must exist in actual system RAM (and is allocated during PCI configuration) and not virtual memory.


So if a PCI device only needs to transfer a small amount of data at a time, where there is no advantage to putting it into RAM or using DMA, then I/O addressing is fine (e.g. a parallel port implemented on a PCI card).


And why do I keep reading that PCI/PCIe I/O addressing is being deprecated in favour of memory addressing?


Thanks!



Answer



The physical address space is huge nowadays due to 64 bit addressing. Many devices, for example AHCI-compliant disk controllers, require quite big chunks of address space to be mapped to the device registers.


Also, the IO address space is not accessible with usual assembler instructions. It is accessible only with special instructions that can read from and write to the IO ports. This is not really convenient and inefficient in many cases.


For example the above mentioned ACPI compliant controller has some functionality that requires the processor to execute locked read-modify-write operation to change a single bit in a device register provided no other cores will be able access and modify the same register in between. With IO address space this is not possible at all.


One more point we should take to account is that the PCI bus is not unique to the x86 architecture. There are other architectures exist that has no special IO bus at all. So the device vendors prefer not to use IO addresses to stay compatible with most systems. Thus no one is using the IO address space. Then why not make de-jure the thing that is de-facto for a long time already?


Why can't I connect to my Windows 7 via Remote Desktop?

I am unable to connect to my Windows 7 machine via RDP. I also can't ping it.


Is there something special I need to configure?

nvidia graphics card - Is it possible to get the serial number of a GPU without opening the case?


I have an Nvidia GPU GTX 470 - Can I get it's serial number with out opening the case?


EDIT Thanks for all the comments: I tried the Device path as well as the WMIC command (which are the same actually) Value returned from the WMIC command


NVIDIA GeForce GTX 470  PCI\VEN_10DE&DEV_06CD&SUBSYS_079F10DE&REV_A3\4&2F1C4782&0&0018

The WMIC (device path is) 2F1C4782 which is translated to: 790382466 (converted to decimal).


My card SN is: 101500021088 - I think this does not get the correct values.



Answer



Note: Note that this technique only works if the hardware manufacturer implements it. I can't give a percentage of accuracy, but I would guess the big players would implement it. If it's not implemented, Windows will generate a unique number instead.


Method 1 - Device Manager


Open the Windows Device Manager. Find your video card under Display Adapters. Double-click on it. Under the "Details" tab, select the "Device Instance Path" property.


Method 2 - WMI


Using WMI, at the command line, run the following command.


wmic PATH Win32_VideoController GET Description,PNPDeviceID

Method 3 - Use a Tool


A program like SIW will grab the PNP Device ID for you, but it won't do the parsing for the serial number.


Parsing It


Looking at the PNPDeviceID value, break it up by "\".



  • The first piece it the bus type. For me, it is PCI.

  • The second section describes the card. There's a vendor code, model number, etc.

  • The last section contains a number separated by ampersands. The serial number is the second number in that list, formatted in hex.


wireless networking - What is the easiest way to turn off the wifi connection in my home at night?


Possible Duplicate:
How to disable internet access at night on the router?



I have teenagers who stay up all night and skype with their friends on their laptops.


Is there a way I can turn this off at a certain time every night without having to physically unplug my AT&T Gateway modem? I am not very computer savvy. Sorry if this sounds silly....

Customizing Firefox Shortcuts

I would like to be able to define arbitrary keyboard shortcuts in Firefox, including overriding some of the already built-in shortcuts (such as Ctrl + W to close a tab).


How can I accomplish this? I've found a few plug-ins that add specific additional short cuts, but none that are fully editable. I also couldn't find anything in any of the options menu to do so, though I'd be surprised if this was a feature that was built-in.


For reference (if needed): Firefox 3.0.12 CentOS 5.2

macos - What's the equivalent of Linux's updatedb command for the Mac?


If I want to use the locate command on a Linux machine, I usually run sudo updatedb first to update the database. I can run the locate command on OS X 10.5 but I can't find updatedb. What's the corresponding updatedb for the mac?



Answer



It's locate.updatedb on Mac.


sudo /usr/libexec/locate.updatedb

For more information see the locate.updatedb man page.


Why do I get an internal stack overflow error when minimizing and restoring an MS-DOS virtual machine window?

I am using Windows Virtual PC on a Windows 7 machine. I have created an MS-DOS 6.22 virtual machine with 16 MB RAM and a 2 GB hard disk. Whenever I minimize or otherwise deactivate the window, and then restore or reactivate it, I get an error message, the PC speaker beeps for a second, and the virtual machine completely stops working until I forcefully reboot it:


Internal stack overflow
System halted

(Interestingly, the problem does not occur when I am running Windows 3.1, which runs on top of MS-DOS. I get the error immediately when I try to exit to MS-DOS from Windows.)


I also got a similar error when I tried to install Windows 9x-based operating systems during the first (text-based) phase of installation and performing the same actions, and when attempting to boot such an OS (in this case, Windows 98) into real-mode MS-DOS mode (though in that case I get the error immediately and do not have to perform the actions above to get it):


An internal stack overflow has caused this session to be halted.
Check the STACKS setting in your CONFIG.SYS file, and then try again.

Why does this error occur, and is there any way to fix it?

Saturday, 27 October 2018

windows 8 - UEFI USB only boots when formatted FAT32


I am trying to create UEFI bootable USB sticks of Windows 8. What I do is the following:


diskpart
select disk 1
clean
convert gpt
create partition primary
format quick fs=ntfs

I then just dump the contents of the ISO into the USB. It does not boot but when I format to fat32 it works. Is this normal, or is it just my laptop that's not able to locate NTFS UEFI partitions?


FAT32 is really old and will essentially limit OS image sizes to 4GB (the WIM can't be bigger than that in a fat32 system).


I tried doing "create partition efi" to create a EFI system partition but I was unable to access it. Could I theoretically create an EFI system partition in linux, dump the contents of /efi/ into it, then create a primary NTFS partition and dump the rest of the stuff onto that partition?


This isn't a question pertaining to an issue since I solved it (formatting to fat32). I just want to know what's going on.


EDIT: Also as a bonus question. All the blogs and articles relating to "Create Windows 8 Bootable USB" do not mention "convert gpt" and just say to dump the contents of the ISO onto the disk. Some say to run bootsect.exe, others don't (doesn't make sense since UEFI doesn't use boot sectors). I don't see how this would work since UEFI needs a GPT disk to boot from. Is my laptop just very strict while others are lax on the standard?



Answer



On a normal hard disk installation of most any EFI-based OS, you'll have, at a minimum, one FAT EFI System Partition (ESP) and one partition for the OS itself. The ESP holds a boot loader for the OS, possibly along with files to support the boot loader (fonts, configuration files, drivers, etc.), and possibly even the OS's kernel. The OS partition holds more-or-less the same OS files you'd find on a BIOS-based installation of the same OS. Depending on the OS, you might have additional partitions, too -- data partitions, a swap partition, etc.


There can be exceptions to this rule, particularly for installation media or emergency disks. For instance, you could put the whole OS in the ESP. Also, most EFIs are happy to boot from partitions that are not ESPs, so you could just have one big non-ESP FAT partition, as you've got. This can work fine for an emergency disk, but I wouldn't recommend setting up a regular OS installation in this way; I'd use a separate ESP and OS partition.


Note that a standard EFI can read FAT, but cannot read NTFS, ext2/3/4fs, HFS+, or any other filesystem. (Apple's EFI can read HFS+, and so can read its boot loader from a Mac OS X root partition rather than from the ESP, but Apple's EFI is the exception rather than the rule. A few EFIs also have ISO-9660 filesystem drivers -- but again, they're exceptions to the rule.) Because FAT is the only filesystem that's guaranteed to be readable by EFI, an attempt to build a boot disk that does not include a FAT partition is doomed to failure, except of course when used on those unusual EFIs that support additional filesystems.


I can't provide a procedure to set up a Windows emergency disk to use separate EFI and Windows partitions, since I'm more of a Linux person than a Windows person. Unless you run into a specific problem with your approach, though, I'd just stick with it; at least you know it works.


windows 7 - How to map an IP adress to localhost?


I want to map the IP address 192.168.1.222 to 127.0.0.1 so that if I use 192.168.1.222 in the web browser or ping command I get the response (and that from my 127.0.0.1).


Is this possible via routing tables or do I have to add some sort of virtual network adapter?


I try to deal with this problem on a Windows 7 machine and have no other options than a Windows XP maybe.


I'm stuck right there.



Answer



You would have to assign the IP address 192.168.1.222 to one of your network interfaces. Merely altering the routing table will not have the desired result; traffic would indeed arrive at the localhost, but your computer will then conclude the message has not yet reached its destination. Lacking any further options of passing the message along, it will then be dropped.


Assigning 192.168.1.222 to one of your physical interfaces would be the simplest solution, but if you do not have a spare interface and do not want your changes to affect the rest of the network, you can create another loopback interface, similar to the one at 127.0.0.1.


The procedure has changed somewhat since Windows XP. Open the device manager via the control panel and in the Action menu, click 'Add legacy hardware'. If this option is missing, the wizard can be started via the executable 'hdwwiz.exe'.


Device manager


When asked, select hardware manually from a list rather than installing it automatically. In the following menus, select 'Network Adapter', 'Microsoft' as manufacturer and look for the 'Microsoft Loopback Adapter'. If the device has been installed correctly, a new network adapter will have appeared in the device manager.


Open the Network and Sharing Center via the control panel and click 'Change adapter settings' in the left bar. The following window will appear, including our newly installed adapter.


Network connections


Open its properties. From the Networking tab, select the IPv4 item and click the Properties button. Enter the IP address you wish to assign to the loopback interface. Because it will be the only interface on its network, we enter '255.255.255.255' as the subnet mask.


IP addresses


Voila.


C:\Users\Marcks>ping 192.168.1.122

Pinging 192.168.1.122 with 32 bytes of data:
Reply from 192.168.1.122: bytes=32 time<1ms TTL=128
Reply from 192.168.1.122: bytes=32 time<1ms TTL=128
Reply from 192.168.1.122: bytes=32 time<1ms TTL=128
Reply from 192.168.1.122: bytes=32 time<1ms TTL=128

Ping statistics for 192.168.1.122:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 0ms, Maximum = 0ms, Average = 0ms

macos - How can I add a new partition to my HD without reformatting?


I have a 640GB external HD that has one partition formatted as HFS+. It's attached to a machine running OSX 10.6.6. Now I want to split some of the HD's free space into a new FAT32 partition, without having to reformat the whole HD and losing all my data. I read that I'm supposed to be able to add new partitions in the Hard Disc Utility by clicking the "+" sign, without any loss of data. But in my case the "+" is not clickable and utility says that the partition cannot be altered.


Can I do this without reformatting the whole disc? If so, how?



Answer



Select the hard drive (not a partition; the whole hard drive) in Disk Utility and look at the info at the bottom of the window. If it says that your hard drive uses the GUID Partition Table (GPT) then volumes should be resizable. If it says it uses the (Intel PC legacy) Master Boot Record (MBR) format, or the (68k/PowerPC Mac legacy) Apple Partition Map format, then you will not be able to resize the volumes without reformatting/repartitioning the drive to switch it to GPT.


Where does Skype save my contact&#39;s avatars in Linux?

I'm using Skype on Linux. Where can I find images cached by skype of my contact's avatars? Answer I wanted to get those Skype avat...