Tuesday 31 October 2017

batch - How to make 7-zip do a whole bunch of folders


I got a bunch of pictures that I had to crop into 800x600 pixels. That was easily done, but now I have to upload them so the family can see them all.


Thing is, this is 500MB in pictures. I decided to simply zip the separate folders, which each contain an almost equal amount of pictures. This way I can upload a couple each day. Doing this manually is a very long and hard job. I wonder if there is a way to make 7-zip handle each folder individually?


I think I'll need a batch file to do it, but I'm not good with that. I've put everything under one folder. In the various subfolders is where the pictures are located. What I need is for the contents of that folder to be zipped. I'm not sure if I can just zip the folder along with it. I know PHP has a zip module, I've just never worked with it, so I'm not sure whether it can handle the fact that the content of the zip is a folder which contains the items, instead of just the items.



Answer



Run from a command prompt whose working directory is your My Pictures directory, this command will create a zip file of the contents of each subdirectory, leaving all of the zip files in your My Pictures directory.


Edit: I have added the quotation marks necessary to allow for directories with spaces in their names.


for /D %%d in (*.*) do 7z a -tzip "%%d.zip" "%%d"

Also: The following version will not put files in a subdirectory inside of the zip file, but instead in its root:


for /D %%d in (*.*) do 7z a -tzip "%%d.zip" ".\%%d\*"

In Windows 7 and above


for /D %d in (*.*) do 7z a -tzip "%d.zip" "%d"

or


for /D %d in (*.*) do 7z a -tzip "%d.zip" ".\%d\*"

rs232 - Is DB-25 port Serial or Parallel?


I would like to know whether the DB-25 port is a serial or parallel port. These ports are otherwise known as printer ports, aka LPT port.


I'm very confused about this since, according to Wikipedia, this port is considered part of the D-Subminiature connectors, which are mostly used for RS-232 serial communication.


On the other hand, we know that this port is known as the parallel printer port. So, why all this confusion? Is this confusion only associated with DB-25 ports on computers? Then how about other devices that have DB-25 connectors (mostly male DB-25)?



Answer




Is DB-25 port Serial or Parallel?



A DB-25 connector could be serial port or parallel port or something else.
A DB-25 connector is a generic connector.
It is not exclusively used by just one interface (like HDMI or USB connectors are).


On a modern PC, a DB-25 (especially a female connector) is typically associated with a parallel (aka LPT) port.
On older computer and telecommunication equipment, a DB-25 connector is typically a RS-232 serial port.


Prior to the mid-1980s, RS-232 ports typically used DB-25 connectors.
Printers used RS-232 interfaces and/or custom interfaces.
One of those interfaces, a parallel interface using a 36-pin connector developed by Centronics, became an industrial and then an IEEE standard.


When IBM introduced its PC, it substituted the large Centronics connector with a slimmer female DB-25 for the LPT port. The female DB-25 connector was typically used for DCE RS-232 ports (e.g. a phone modem), and this was a new application for that connector. The RS-232 port(s) on the IBM PC used male DB-25 connector(s).


When IBM introduced its second-generation PC/AT, in 1984, IIRC it substituted the large male DB-25 connectors for RS-232 ports with "DB-9" (actually a DE9) connectors that today's users associate with "serial" ports. The parallel LPT port continued to use the female DB-25 connector.


network shares - how can Windows 7 provide Internet connection?

I connect my Windows 7 to the Internet via USB tethering to my Android.


How can I connect my Linux box to the internet.



  • the Linux box has only NIC.

  • I have a 4 port hub available.

linux - unexpected behaviour of Ctrl-a x and Ctrl-a X in screen?! regions, locking

According to the screen manual (version 4.0.2.)


C-a x
C-a C-x (lockscreen) Lock this terminal.
C-a X (remove) Kill the current region.

But what actually happens when I use it (Screen version 4.00.03 (FAU) 23-Oct-06):


C-a X   locks the terminal and asks me for the password. When I enter the correct passwword, I am back in screen but the region is killed (wtf)
C-a x does nothing apparently

Please note the differences between x (lowercase) and X (uppercase).


Why is there a mixup between the functionalities of C-a X and C-a x? How can I fix this?


I am on CentOS release 5 (Final).

usb - Windows refuses to detect mouse/keyboard input


I was away for the weekend and when I came back this morning my PC booted up just fine but I couldn't input anything via mouse or keyboard in Windows. I've already tried rebooting, different usb ports and changing usb settings in the BIOS - but neither has helped. In my BIOS screen both mouse and keyboard work just fine.


I'm on Windows 7 64bit and I have a wireless Microsoft Keyboard/Mouse-Set with a usb dongle (both use the same dongle). My mainboard is an ASUS H81-T. My Setup has been the same for over three month and I've never had any problem nor did I install new software recently. I even updated my BIOS because there was a newer one out and I hoped it maybe will fix the issue but sadly it didn't.


What could be the reason for this behaviour? Has anyone faced similar problems?


EDIT: Just tried another usb keyboard but it also did not work.



Answer



I was able to remotely log in onto my machine using Microsoft Remote Desktop (RDP). The Device Manager was showing two exclamation marks for two USB Root Hub. I deleted those two and rebooted. Windows then reinstalled the USB drivers and my mouse and keyboard are working again.


io - Cost of disc I/O read versus write



Is writing to a disc more costly operation then reading from a disk. For example - writing a 1 GB file of records as compared to reading the whole file.



Answer



At the drive level, a read sector operation would take about the same (or a bit longer) time as a write sector operation. For a read sector, the command has to arrive over the drive interface (e.g. SATA), the command decoded, seek issued, scan Address Marks and record IDs until sector is found, read sector data into a buffer, validate the sector using ECC (error correction code), and then finally send out the sector data. (Note that there is a widespread misconception that sector data can be transferred directly from the read head to the interface. Absolutely false: the sector data is always fully buffered, and is always transmitted at full interface speed only after the entire sector has been read and validated.) If read-ahead is performed and cached, then a subsequent sequential read will not have the seek and rotational delays. For a write sector, the command and sector data has to arrive over the drive interface, the command decoded, seek issued, scan Address Marks and record IDs until sector is found, write out sector with ECC, and the host is notified of completion.


At the OS or filesystem level, writes are more complex when a new file is being created. Reading a or rewriting an existing disk file only requires lookup of where the data sectors (or clusters) are located. Writing a new file or appending to a file will require first allocating sectors/clusters from the free list, assigning those sectors/clusters to the file (directory entry update?), and then writing the data out. Note that the disk allocation table(s) will typically be updated (i.e. written to disk) as soon as possible, maybe even before the file data, in order to maintain filesystem integrity. If you've ever noticed/heard a lot of disk seeks while creating a file, you can assume the heads were moving between the allocation table and the new file.


macos - How do I replace or repair a broken OS X install disc?


First things first: I don't appreciate software piracy and I really want to spend money on software that I use and that I work and make money with. I don't want this question closed just because I consider downloading software, I only want honest opinions and alternatives.


Here we go: So I have my OS X Snow Leopard Upgrade DVD, but it's horribly scratched and won't boot anymore. It endlessly loads and at some point I have to force pull it out of the disc slot.


How can I reset my Mac then?



  • Can I take my original disk to an Apple Store and ask them for a replacement? Will they believe me, even if I don't have the receipt anymore?

  • Would owning the original disk make it okay for me to look somewhere on the internet and download it? I don't even know if that will work without hassles.

  • Could I try to read the disk to an image with some error correction methods? Maybe during boot it can't read some files, but some other program can?

  • Is there any other way of resetting the Mac? Mine's now over 3 years old an I seem to have misplaced my original discs that had 10.4 on it.

  • Or should I just buy a new 10.6 upgrade disk? (Which is not really what I want to do)


Answers and opinions would be much appreciated.



Answer



In general you purchase a license to use the operating system on a pre-defined number of computers. You're not buying the media per se. It is perfectly legal to install a pirated version of an operating system as long as you have your own license to use that version of the operating system.


As you have the original disk, you have the license to use the software. Where you source the software from is neither here nor there, so don't feel guilty about downloading it.


It only becomes illegal if you don't have a license.


Google Chrome Plugin for JSON Reading


Is there a Chrome plugin that renders JSON files in Chrome? Currently Chrome just tries to download them, and that's kind of boring.



Answer



JSONView for chrome



  • In-browser viewer

  • Expand and contract JSON items

  • Format validation

  • Doesn't require .json ending


Enable:


Chrome wrench button >> Tools >> Extensions >> "Allow access to file URLs"


routing - What routes must be set (in Linux) to allow Internet access through given interface without setting it default?


I am trying to solve a task with routing and OpenVPN's configuration.


After setting the connection, I don't want it to become defaut route to anything, but rather want to use its interface for this kind of activity: curl --interface tun20 http://someaddress.


However, without default route configured, it seems that the host system is unable to send/receive packets (I think it can't receive them back from VPN, because the sniffer at someaddress somehow receives the tcp connection attempt packet which is never continued by data).


With default route set, VPN works OK - tested that.


ifconfig:


tun20     Link encap:UNSPEC  HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00  
inet addr:10.200.2.236 P-t-P:10.200.2.236 Mask:255.255.252.0
UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1500 Metric:1
RX packets:2 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
RX bytes:258 (258.0 B) TX bytes:0 (0.0 B)

With default route from server:


route -n:


Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0 10.200.0.1 128.0.0.0 UG 0 0 0 tun20
0.0.0.0 192.168.0.1 0.0.0.0 UG 0 0 0 wlan0
10.200.0.0 0.0.0.0 255.255.252.0 U 0 0 0 tun20
66.187.67.130 192.168.0.1 255.255.255.255 UGH 0 0 0 wlan0
128.0.0.0 10.200.0.1 128.0.0.0 UG 0 0 0 tun20
192.168.0.0 0.0.0.0 255.255.255.0 U 0 0 0 wlan0

When the default's route is discarded by route-nopull directive, I get this:


route -n:


Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0 192.168.0.1 0.0.0.0 UG 0 0 0 wlan0
10.200.0.0 0.0.0.0 255.255.252.0 U 0 0 0 tun20
192.168.0.0 0.0.0.0 255.255.255.0 U 0 0 0 wlan0



So I want routing/forwarding recommendations on bringing this to work.



Answer



That was a nice experience to learn. From https://superuser.com/a/374566/49318, I've found a link to something worth a hour of reading man ip and ip help:


echo 11 mpdevtun7 >> /etc/iproute2/rt_tables
ip route add default via %yourIP% dev tun17 table mpdevtun7
ip rule add from %yourIP% lookup mpdevtun7 prio 1000

Now, curl --interface tun7 works fine. That's all, folks.


linux - How can I backup a Ubuntu system and restore it on another maching with completely different hardware?


I just completed my Ubuntu installation. It contains all packages I need and I configured my apps correctly.


I would like to backup this installation and be able to restore it to different computers with different hardware.


I have read that the solution would be the following:


1- Save a list of the installed packages.
2- Backup the home directory.

3- Install the same version of Ubuntu on the new machine.
4- Restore the list of installed packages on the new machine.
5- Restore the backup of the home directory on the new machine.

Would this keep all of my insalled softwares and their configurations?



Answer



That should indeed restore all software and their settings, as they are stored inside your home folder (don't forget to copy the hidden folder, because that's where the configuration files are kept!). The applications that are run as root however, will most probably lose their configuration this way.
Just a little hint to prevent trouble, choose the same username and password on the target machine as you did on the machien where you copied everything from. Choosing the same host name would be a good idea as well, I think.


sleep - Is it possible to use Hibernate on a Desktop with Windows 10?


When following the typical Windows 10 tutorials for enabling hibernation (e.g. this one), I've noticed that some options don't appear on my desktop. Is it because it might not have the same awareness hardware a laptop does? Or is there a hidden way somewhere that I'm not seeing?


Why is the Hibernate option not part of the default power options???


enter image description here



Answer



From command prompt with administrator permissions:


powercfg /hibernate on

Don't forget to check that you have enough space on your main drive, because everything in your RAM will be stored in your HD while your PC is hibernating.


Monday 30 October 2017

windows 10 - Why is WinRAR 5 not giving me an option to use RAR5 format and only RAR4?


I just realized something. I recently purchased the WinRAR v.5.60 archive software:


enter image description here


But when I right-click some file that I want to RAR and then click Add to archive, the popup window offers me only the RAR4 format:


enter image description here


Why so?



Answer



After verifying the file properties using the method described here https://www.ghacks.net/2013/12/03/identify-open-rar5-archives/ we could conclude that:



  • The "RAR" option shown in the screenshot and selected by default is indeed the same as the "RAR5" option of previous versions.

  • The option explicitly mentioning "RAR4" refers to the old format that now is an option but not the default.


security - How can visiting a webpage infect your computer?

My mother's computer recently became infected with some sort of rootkit. It began when she received an email from a close friend asking her to check out some sort of webpage. I never saw it, but my mother said it was just a blog of some sort, nothing interesting.


A few days later, my mother signed in on the PayPal homepage. PayPal gave some sort of security notice which stated that to prevent fraud, they needed some additional personal information. Among some of the more normal information (name, address, etc.), they asked for her SSN and bank PIN! She refused to submit that information and complained to PayPal that they shouldn't ask for it.


PayPal said they would never ask for such information and that it wasn't their webpage. There was no such "security notice" when she logged in from a different computer, only from hers. It wasn't a phishing attempt or redirection of some sort, IE clearly showed an SSL connection to https://www.paypal.com/


She remembered that strange email and asked her friend about it - the friend never sent it!


Obviously, something on her computer was intercepting the PayPal homepage and that email was the only other strange thing to happen recently. She entrusted me to fix everything. I nuked the computer from orbit since it was the only way to be sure (i.e., reformatted her hard drive and did a clean install). That seemed to work fine.


But that got me wondering... my mother didn't download and run anything. There were no weird ActiveX controls running (she's not computer illiterate and knows not to install them), and she only uses webmail (i.e., no Outlook vulnerability). When I think webpages, I think content presentation - JavaScript, HTML, and maybe some Flash.


How could that possibly install and execute arbitrary software on your computer? It seems kinda weird/stupid that such vulnerabilities exist.

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


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



Answer



HDTune works on Windows 7 too.


Screenshot of HDTune


A blog-post reference.


How do you make text vertical in Word 2010?


I want to make a text look like this:


S
u
p
e
r

U
s
e
r

I can go to a new line after each letter, but it's not really practical. Where can I find the setting to make the text be written in a vertical way in Word 2010?



Answer




  • Enter your Word art as usual

  • Then click on the word art box you just made

  • Make sure you click on 'Format' on the top of Publisher

  • Third option across the top says 'vertical text'

  • Click and your text is vertical ;)


What's the difference between a console, terminal and command-line?




Possible Duplicate:
What is the difference between shell, console, and terminal?



My non-tech-savvy friends unanimously agree that console refers to hardware and terminal refers to software.


A brief discussion in a Stack Overflow chatroom yielded inconclusive results. The terminal-console relationship is reversed, but software is still called a terminal because that's what it's emulating.


What are the differences between consoles and terminals? Where does command line fit in?



Answer



A terminal is a hardware device where a human can interface with the computer.


A terminal emulation simulates a terminal (e.g. a Gnome-Terminal within the X-Session of an X-Terminal). Terminal emulations are mainly used to achieve two tasks:




  1. Simulate a specific terminal on top of annother hardware terminal (to interface with programs that have been written for a specific terminal (for example the command line interface of Stratus systems was heavily dependant on the behaviour of the Televideo 925, but at a certain time that terminal was not manufactured anymore. So they started to sell Qume Terminals that had a builtin Televideo 925 emulation instead).




  2. Run multiple terminals although only one pysical terminal is available.




An X-Windows terminal is a hardware device capable of running an X-Server.


A console is typically a special terminal where the system operator can interface with the system during special tasks like booting or maintenance mode when all other (user-)terminals are unresponsive. Often important notifications from the system are also written to the console terminal.


If one looks at a Linux PC running a graphical user interface, one may find all of the above:


The PC with screen and the keyboard is esentially the console. On the console screen (the PC screen) there are multiple terminal sessions available (accessed typically by pressing Alt-Fn).


Additionally there is a X-Server running which enables the graphical user interface (X11 aka. X-Windows) to run on that Linux box. Within that X-Session the user may call programs like xterm or gnome-terminal which are basically terminal emulations of a DEC VT220 terminal. (xterm is also capable of emulating the Tektronix 4014 graphics terminal, in real life a real HW-monster back then).


How to split a video file by size with ffmpeg?

i want to split a video file by size using ffmpeg.


Do you know how to do that ?


Do i have to calculate the duration that corresponds to each size ?


Thank you.

hard drive - External HDD 3.0 for a Raspberry pi 3


So I have this raspberry pi 3 with a external HDD 500GB and a usb 3.0. The raspberry has only USB 2.0 ports.


So when I plug the HDD in the raspberry the HDD does not show in the file explorer, the bigger problem is that when I plug it it, all my other devices(mouse, keyboard and flash) instantly die and I have to pull out the HDD to proceed using my mouse and keyboard.


The HDD is working perfectly on my laptop(on both my USB 3.0 and USB 2.0 port).


Can I somehow make my HDD work with my raspberry or will I have to get a new one ?!



Answer




I have this raspberry pi 3


with a external HDD 500GB and a usb 3.0.



A external 500GB USB2 harddisk and a USB3 pendrive?
or a 500GB external USB3 harddrive?



When I plug the HDD in the raspberry ... all my other devices(mouse, keyboard and flash) instantly die and I have to pull out the HDD to proceed using my mouse and keyboard.



This is almost centainly because the HDD is drawing more power than the Pi can supply.


The board has a single MicroUSB power connector and a undefined PSU. (Undefined as, you have to provide this yourself. Often an USB charger is used that depending on the model it those can supply between ½A and 3Amp. You did not mention which PSU you are using.


However, that thing needs to power both the rPi (using up to 1Amp) and all pheripherals. A HDD (especially one which spins up) draws a lot of power. It is very likely that you are exceeding your power budget.


Without knowing precisely which PSU is used, which other devices are plugged in and how much your HDD draws it is hard to say though. As a rought figure: 2½ drives tend to draw about 650mWatt.


Citing: https://www.raspberrypi.org/documentation/hardware/raspberrypi/power/README.md


The Raspberry Pi 3 is powered by a +5.1V micro USB supply. Exactly how much
current (mA) the Raspberry Pi requires is dependent on what you connect to
it. We have found that purchasing a 2.5A power supply from a reputable
retailer will provide you with ample power to run your Raspberry Pi.

Typically, the model B uses between 700-1000mA depending on what
peripherals are connected; The maximum power the Raspberry Pi can use
is 1 Amp. If you need to connect a USB device that will take the power
requirements above 1 Amp, then you must connect it to an externally-
powered USB hub.

The power requirements of the Raspberry Pi increase as you make use of
the various interfaces on the Raspberry Pi. The GPIO pins can draw 50mA
safely, distributed across all the pins; an individual GPIO pin can only
safely draw 16mA. The HDMI port uses 50mA, the camera module requires
250mA, and keyboards and mice can take as little as 100mA or over 1000mA!
Check the power rating of the devices you plan to connect to the Pi and
purchase a power supply accordingly.


Can I somehow make my HDD work with my raspberry or will I have to get a new one ?



The normal solution for this would be to either plug a PSU into your external drive (many ship with an option for external power but without matching PSU, hoping that they can draw enough power out of an USB interface), or an powered USB hub. In this case that hup will have its own PSU and can supply up to 500mA (USB2) or 900mA (USB3) to the harddrive.


keyboard - NumLock is completely useless, and I want to disable it completely on Linux


Forget all the rants about Caps Lock, Num Lock is the most useless key of them all. It's never, ever useful. You don't want to use your numpad as an arrowpad, since the arrows are 1cm away from it. Ever.


There was a time when some keyboards had a numpad but no dedicated arrow keys. They don't exist anymore. You can find keyboards with no numpad but with arrow keys, but not the opposite.


Therefore, Num Lock is useless, and it only serves to aggravate me and, I presume, others. Please note that I do not want to know how to turn Num Lock on at startup, I do not want to know how to tear the key off, I want to disable it so that it stays on all the time and can't be turned off by mistake. Any idea how to do that?


Ideally I'd like to be able to reclaim the key for another use, such as a modifier that allows me to type hex on the numpad.


Additionally I'd love to know how to turn off the equally useless mouse emulation triggered by Shift + Num Lock.



Answer



Well for your first question, you can remap it to nothing with xmodmap:


xmodmap -e "keycode # = """

where # is the scan code of NumLock. You can find the scan code using xev. Instead of nothing you can remap it to any key you'd like.


windows - looking for continuous Screen Capture for retroactivly reproducing errors, timeback machine

Usually Screen Video Capturing software are tailored for kind of video producers, who have a plan, have prepared keynotes, etc.


However, I want a "time machine" program for a specific use case:



  • Hey, there is a problem with computer/problem! Come and see.

  • Oh, indeed, an error. What did you do to come to this error?

  • Nothing! I was just working and then suddenly...


What was this "just working" exactly? That is very hard to remember if you was not consciously prepared for it. And you are not, before bug manifests. And when it manifested it often is too late. Sometimes reproducing is easy. But sometimes it requires so fine and rare tweak in workflow - that it just does not register in casual memory. And reproducing that error becomes a search for black cat in dark room.




I wonder if there is a video capturing program for Windows that



  1. Runs continuously in background, capturing screen, mouse and keyboard. Well, at very least - screen w/o mouse and keyboard.


Webcams, sound - are not needed. Well, maybe sound like standard Windows error beeps, but definitely not microphone sound.



  1. Only cares to save last 10-15 minutes. The rest is auto-dropped. Capture should be "rotated" automatically. Until users knocks some obstacle and presses a button to stop dropping and save the recorded buffer persistently.


Basically user should be able to easily record all his activity of TIME PAST.



  1. Lightweight, to work on old computers. Yes, really old computers: not much RAM, slow CPU, no SSD, relatively old HDDs (though desktop HDDs seems to be on performance plateau for last 10 years at least).


That is tricky. For example HuffYUV codec provides blazing speed by "Huffman compression", so CPU use is minimal. Then, Huffman compression is weak - so the datastream is huge, putting huge burden on RAM volume and HDD throughput.


On the contrary, H.265 would maybe produce minimal datastream (though it is JPEG-like, designed to record natural images rather than desktop programs with their crisp rectangles PNG-like) but at the cost of unbearable CPU consumption.


Maybe there is better codec designed from ground-up for office applications screen captures instead of real world video? UPD - actually there is, and it is called VNC, TeamViewer, etc...



  1. Preferably free to use. It would be good if vendors could suggest this software to their customers, so they could keep it running around clock for weeks until they manage to hit that rare set of conditions triggering the "unreproducible" but recurring error.

Sunday 29 October 2017

iterm - iTerm2 pin Visor (hotkey) window


Is there anyway to pin (keep on top) the Visor / hotkey window for iTerm2?


Every time I give focus to another window (e.g. Chrome for documentation), iTerm2's hotkey window disappears. I have to invoke the hotkey again in order to start typing.



Answer



Yes, as long as you have version 3.0.0 or later (or pre-release versions). If you go to the "Keys" tab in iTerm2's preferences, you should see the "Hotkey window hides when focus is lost" checkbox in the "Hotkey" section. Uncheck it.


windows - How to find exe listening on port?


I try with netstat -ab -p tcp -n and among the results get:


  TCP    0.0.0.0:47001          0.0.0.0:0              LISTENING
Can not obtain ownership information

I am running as administrator and get that message. I also downloaded a utility to show network activity for exe's but nothing open is listening on port 47001 according to the utility.


How can I find out what is listening?



Answer



Try netstat -o to get the process id (PID) and then use tasklist |findstr to see the process name and type. Task Manager also shows PID and process name.


You can combine your other switches with -o like so: netstat -bona -p tcp


file management - Is it possible to have nested libraries in Windows 7?


My goal is this: I have a library, say it's called Series. I store my series in two different places, one for watched episodes and one for unwatched episodes.


Obviously I can simply add the root folder of each location to a series library. What I would prefer to do is have a sub-library within Series for each series, for example:



Series \ Lost


Lost (Unwatched series)
Episode 3
Episode 4


Lost (Watched series)
Episode 1
Episode 2



Is there a way to achieve this, or something approximating this (without having a full library for each series)?


P.S. I've read the other topic, but I was wondering if there was a possible workaround for this specific need. More out of hope than anything else. ;)



Answer



The best I have achieved is by adding the serie's directories one by one and grouping them by folders.


enter image description here


Additional tips: to group them in one disk/directory (without library) you could use junctions (command prompt mklink /j ...)


linux - How? Mount, Find & Recover DATA in HDD outside of Synology Box

How? Mount, Find & Recover DATA in HDD outside of Synology Box


I had originally posted this question here on Synology Forums and no real solution was suggested except a Linux / RAID based solution that worked for someone, but not for me.


I believe a LINUX & Drive/ Volume Expert could help with this as someone did use a similar solution to recover their RAIDed disk, but I was not using RAID, maybe JBOD/ SHR so I think there should be a way?



Many times I've run into issues of Synology or Hard Drive corruption/ error in sectors etc. where I have had to pretty much remove the Drive which Synology refuses to read or work with.


In such scenarios I am hoping I could use a bunch of Hard Drive recovery tools that I have after attaching the Disk to a PC/Box or Laptop via USB enclosure.


The question is, assuming I am able to detect the Hard Drive and assuming that hardware is still kind of functional, what way can I LOAD/ MOUNT the Drive (under Windows or Linux OS etc) on a PC/Laptop? (What tools/ software should I used to do that?)


I've used several Partition Management tools and I can see 4 partitions inside the Disk as created by Synology.


But, I cant seem to figure out a way to LOAD/ MOUNT the Data Volume where Synology stores my data.


Once that volume/partition is loaded (assuming there is some software/tool that can do that), how do I FIND where my DATA files and folders are stored, so that I can copy them off the Disk.


If it was a DIY Server using an OS & Partition type I had insights on it would be easy to figure out where the DATA is and attempt to recover it.


How can I do that for drives that get "messed up" inside the Synology Box?



One solutions path explored that did not work:



  • No answer for you, I've got the exact same problem. I've tried various ext4 reading windows programs, all of which can see the drive & partitions, but none of which have been able to recover data (geeksnerds, stellar phoenix, linux reader, explore2fs, ext2explore, none of which allowed me to copy, recover or even see data files).

    • Surprisingly, the drives do not auto mount in Ubuntu 12.04 either. Good luck.




Another Solution that worked well on RAIDed drive but I had no luck on my Disk (JBOD or SHR):



  1. Installed Ubuntu 11.10 (also tried with latest version 12.xx)into some spare SATA-drive. No updates needed to be installed. PC must have Internet connection.

  2. Attached drive from DS411 which was configured as RAID-1 mirror into Ubuntu PC and booted up.

  3. At "Dash Home" search 'disk utility' ans start it to see that attached drive exist and is visible in Linux.

  4. Install 'Logical Volume Management' software from "Ubuntu Software Center"

  5. Install 'mdadm'. At "Dash Home" search 'terminal' and start it. In terminal type: sudo apt-get install mdadm

  6. mdadm installation on first pop-up press 'tab' to get cursor on 'OK' and hit enter, for email configuration choose 'no configuration'

  7. After installation is complete type: sudo mdadm --assemble --scan After this command your attached Raid-1 mirror half should be visible on 'disk utility'-software.

  8. On disk utility, find selection on attached drive 'start volume group' after all volumes and array should be running, if not try to start volumes separately.

  9. Select volume where data is stored (biggest one) and below that click on 'mount'

  10. Open 'home folder' attached Raid-1 mirror half should be visible and data can be accessed and copied to other locations.


I've not had any luck using this method, but I can see the Disk attached and Ubuntu also gives me the option to format the drive. But, so far I am trying to see some way to recover the drive data.

laptop - 3 Monitors on a Notebook


I would like to use 3 screens on my Dell Inspiron 1720


So On the laptop built in screen have that as one, and then have 2 more screens.


The catch is, that I want to play racing games with this set-up. So that my main screen is the focus area (the front window if you will) and the other 2 screens will be used for peripheral vision, on the side.


The software that I use (LFS.net) does support multiple screens. However the notebook can have the main screen on, and another external screen.


So I would need to split this "second" monitor output, to 2 screens, the one to the left of the main monitor, and the other one to the right. Is this possible?


Is there perhaps a external card / docking station solution that could help with this?


Any advice or ideas is greatly appreciated.


Best Regards Rihan



Answer



What you want is either a Matrox TripleHeadToGo or a Matrox DualHeadToGo.


You can't do directly what you want (split the monitor either side of the internal screen) but if you don't mind the two external screens being to either the left or right of your Laptop screen then you could use a Matrox DualHeadToGo.


Alternatively, you could ignore your internal laptop screen when docked, and just use one (very wide) external screen, the TripleHeadToGo will split that screen over 3 monitors.


The set up I've been intending to get running is three 1680x1050 monitors side by side, running a single 5040*1050 output from my laptop.


Notepad++ Find in Files Filters


When using Notepad++ Find in Files feature is there a way to adjust the filter, so that it will search more than one filetype (e.g. *.c and *.h)?



Answer



Separate multiple filters with a semi-colon (;).


*.txt ; *.log

Or you can just use a space


*.txt *.log

Show USB speed for all devices in Windows 7


I am using Windows 7 and would like to see which USB versions each attached USB device is using (1.1 or 2). How can I do this?



Answer



You can determine the USB specification that a device supports by examining its bcdUSB field. It is not stored in the registry, so you cannot just search or access it. It is stored on the device itself, so you need a way to query the device to retrieve it.


You can use the USB View utility from Microsoft. It is available on the installation CD of some versions of Windows (and possibly some old versions of the Resource Kit). I’m not sure if it's legal to distribute it, but it’s certainly easy enough to find a copy. You could also use the commercial program USBlyzer.




The bcdUSB field is a hexadecimal number that will indicate the highest USB version the device supports in a packed-decimal format:
0x0100 = USB 1.0
0x0110 = USB 1.1
0x0200 = USB 2.0
0x0300 = USB 3.0


In addition, you can view the actual speed the device supports in the Device Bus Speed field:


Low Speed  : <= 1.5 Mbps (USB 1.0+)
Full Speed : <= 12 Mbps (USB 1.0+)
High Speed : <= 480 Mbps (USB 2.0+)
SuperSpeed : <= 5.0 Gbps (USB 3.0+)

(Check your motherboard’s BIOS to determine what mode the USB controller is configured for.)




Figure 1: USB 1.1 device

enter image description here


Figure 2: USB 2.0 device


enter image description here


motherboard - Where is the write-protect switch/screw/jumper on the Samsung Chromebox?

I have a Samsung Series 3 Chromebox, model number XE300M22-B01US, manufactured December 2012.


I would like to put coreboot on it so I can single-boot Linux without ChromeOS pulling the sad face at startup. I tried to flash it but coreboot reported that the BIOS is write protected.


According to this page the jumper/screw is "between the Battery and Ram" except the Chromebox doesn't have a battery and I can't see anything around the RAM area.


Does anyone know where the write-protect screw/jumper/switch is?

windows 7 - Run programs twice in startup directory?

I run the autoruns to see the following one.


enter image description here


The thing is that the user's startup files are registered twice. I'm not sure, but this might be the cause of the AHK problem that I posted, if the programs actually run twice if they are in startup directory.


What do you think? Is this a bug of autoruns program? Or, actually, Do the programs run twice?


ADDED


With msconfig, I found that the runme.exe(the ahk script binary) is run twice. The weird thing is that when I deleted one of them, the runme.exe is removed from the startup directory.

windows - Excel does not honor the delimiter setting for reading or writing CSV files

When saving/opening CSV files in Excel, the default separator is a semicolon (;), as I need it to be a comma (,) I tried to change it by changing the Language and Regional settings following several other posts about this issue (i.e. How to get Excel to interpret the comma as a default delimiter in CSV files?).


However, after changing the List separtor in those settings, my Excel keeps saving CSV files with a semicolon. Is it because Excel was installed while my list separator was set as a semicolon? or is there another setting I am missing here?


Thank you in advance.

graphics card - Overclocking GPU


I am running a AMD Radeon HD 3650 Graphics Card. My Graphics Card Software (Catalyst) came with overclocking software to overclock my GPU. I have a few questions though:


How bad for my GPU is overclocking?


What does the following mean?


High Performs GPU Clock Setting:


300----------------750mhz


High Performance Memory Clock Setting:


400----------------450mhz


What do those two clocks represent and do?


I have looked yet cannot find a max temp for my GPU, what is the max temp that is acceptable?


When running Photoshop (especially 3D) am I going to notice speed improvements by overclocking?



Answer



Your graphics card has two main parts to it, the Graphics Processing Unit (GPU) and the Memory that the GPU connects to to store data such as graphics textures.


You can push each of these units to higher speeds separately, hence you have two sliders.


The highest you can push these two sliders does not solely depend on how hot the components will get but on the actual quality of the physical parts on the graphics card. Some will run faster than other at the same temperatures. You could buy two graphics cards on the same day from the same manufacturer but there is no guarantee that they will overclock to the same speeds.


The newer versions of Photoshop can use the GPU to boost speeds, and overclocking may help this to some extent, but I personally doubt that you will get a large enough boost to justify the risk of damage to your graphics card should you try to overclock it too hard.


I would get a newer graphics card (and one that I knew had been designed by engineers to run at higher speeds) rather than seeing if I got lucky with a card that can be overclocked.


How do I uninstall Windows 8 and install Windows 7?


I have a friend, who just got a new Toshiba Satellite C series with Windows 8. I tried to uninstall Windows 8 and install Windows 7 but was unable to do so.


I did everything I could:




  1. Boot disk - would not load (error message Media -- Fail)




  2. Boot USB - would not load (error message Media -- Fail)




  3. Loading Windows 7 disk from system, fails with different errors




Does anybody know what I can do in order to install Windows 7?



Answer



Toshiba explained all steps in a KB article:


Steps to Install Windows 7 on a Windows 8 Unit


http://aps2.toshiba-tro.de/kb0/TSB2B03EX0002R01.htm



If a Windows 8 OS was preinstalled on a notebook, some steps are necessary to prepare the notebook for a downgrade to Windows 7 OS.



 1. Changes in the UEFI firmware
2. Boot a Windows 7 recovery media
3. Change manually the partition table


  1. Boot unit and press F2 to get into BIOS, go to "Security" tab and disable Safe Boot. Go to "Advanced" tab, select "System Configuration" then change boot mode from UEFI to CSM. Press F10 to save changes and exit.

  2. Boot unit from recovery media (Press F12 on bootup to boot from USB or DVD media)

  3. Press Shift+F10 to open cmd, run diskpart and run the commands from the picture


enter image description here


Remote desktop from Vista to Windows 7 - steps to try


I'm trying to Remote desktop from Vista to Windows 7 to two machines on the same home workgroup.


On the Windows 7 box I have:



  • enabled the 'remote assistance' check box under computer > properties > advanced > remote

  • opened the firewall port

  • started the remote desktop services

  • rebooted


on the Vista client I have



  • telneted to the IP address on 3389 and got no connection open - I tried repeating this and switching off the firewall on the server and got the same result


I still can't connect. (I can see the machine in my workgroup, and ping it on the command line, and explore it's file directory) (I don't see it in my list of terminal servers when browsing in terminal services client)


What else should I try?



Answer



Ok - as per the comment on this answer: Why can't I connect to my Windows 7 via Remote Desktop?


"Just as a side note, RDP is only available on the Professional (and higher) versions of Windows. Home versions are out of luck"


I happen to be running "Home Premium" on this server.


keyboard - Only Ctrl+c not working. I have windows 7? (Ctrl-v, ctrl-x etc work good)

Only Ctrl+c not working. I have windows 7? (Ctrl-v, ctrl-x etc work good)


This not work in all programs (Office, Firefox, Chrome etc) Thanks

Saturday 28 October 2017

networking - Setting Up 3 Network Printers Connected To An Old Router That Is Connected To A Modem / Router Combo Using Ethernet


I am trying to setup 3 network printers for a client.


He has an Xfinity modem / router, and there is only 1 free ethernet port available on the router.


To avoid buying a switch, I used an old router he had lying around.


I plugged in the 3 network printers into ports 2, 3, and 4. When plugging the WAN port from the old router to the empty port on the Xfinity modem / router none of the printers show up on the network. A single device does show up as a connected device in the Xfinity admin settings.


When I remove the connection from the old routers WAN port and the empty ethernet port on the Xfinity modem, and plug that into port 1 on the old router, 1 of the network printers shows up. So the Xfinity router empty ethernet port is plugged into the old routers port 1. The 3 network printers are plugged into ports 2, 3, and 4, but only 1 of those printers shows up to add in Windows.


It doesn't seem to matter which order I plug these in, still only 1 shows up.


Is there a solution to get all of the network printers to show up?



Answer



When you want to use a old router for this. You are essentially going to be using it for the built in switch. In the routers config, disable the firewall/spi security and additionally disable dhcp. Put it's local IP address statically in to the subnet you want it connected with. I.e if the first router is at 192.168.1.1 /24 you would put the second router at 192.168.1.254 /24. Then connect the Ethernet to the lan side of both routers. You can now use it as a dumb switch.


Note: depending on the age and models of routers, you may need a t568a/t568b crossover cable.


Getting "Google Chrome didn't shut down correctly" every week

I am getting "Google Chrome didn't shut down correctly" twice a week - it becomes a very annoying problem -
I always fixed this issue by removing the chrome's default user profile and re-opening the chrome, but doing this will remove all my extensions / apps / bookmarks / settings.
but this is happening more often and I keep losing settings


is there a way to end this madness? I am running Win 8.1 / latest version of chrome

git - Cache the password if SSH-keys are forbidden


I have a server which I have to access frequently via ssh, because I compute on it. Now, the computing center explicitly forbids SSH-keys because they are "insecure". They feel that typing my password, on a keyboard, everytime, possible in front of other humans, is a much safer way to login.


Now; I cannot change their minds (I tried).


Is there a way to at least temporarily store SSH passwords, the way GIT can store passwords in a cache for some defined time?



Answer



Connection reuse


SSHv2 allows the same authenticated connection to establish multiple 'channels' – interactive shell, batch command, SFTP, along with the secondary ones such as agent-forwarding or TCP-forwarding. Your server probably supports connection multiplexing by default. (If your admins complain, it's not caching your password anywhere – it's caching the whole connection.)


With OpenSSH you have ControlMaster and ControlPath options (-M and -S) to make use of this:




  1. Start a 'master' SSH connection using -M. (Since you don't have a ControlPath in your config yet, you need to specify it in command line using -S. It needs to live long, so I add the -fN options to drop to background; they're technically optional otherwise.)


    $ ssh foo@bar.example.com -fNMS ~/.ssh/bar.socket
    foo@bar.example.com's password:

    You're back to the local shell.




  2. Start a new connection through the master:


    $ ssh foo@bar.example.com -S ~/.ssh/bar.socket

    You're in.




  3. To make this useful for Git/rsync/SFTP, you need to set up ControlPath in your configuration, because you won't be able to specify -S all the time:


    Host *
    ControlPath ~/.ssh/S.%r@%h:%p


You can automate this – recent OpenSSH versions also have ControlPersist which automatically establishes a master connection in background if there isn't one yet. This allows you to skip step 1 and just use ssh as you normally would.




  1. Configuration in ~/.ssh/config:


    Host *
    ControlPath ~/.ssh/S.%r@%h:%p
    ControlMaster auto
    ControlPersist 15m


  2. First connection asks for password:


    $ ssh foo@bar.example.com
    foo@bar.example.com's password:
    [foo@bar:~]$ exit


  3. The second doesn't:


    $ ssh foo@bar.example.com
    [foo@bar:~]$ yay


To control the multiplex master (stop it or configure TCP forwardings), use the -O option.


A similar method is supported by recent PuTTY versions.


windows 7 - What is the command to use to put your computer to sleep (not hibernate)?


I want to put my Windows PC (Windows 7) into a sleep state via command line (so I can bind to macro button on keyboard).


The power button on the PC is setup to but the computer to sleep (but it's down on the floor and I'm too lazy to reach down) it exactly how I want it (sleeps using hybrid mode in case I loose power)


The sleep command on the shutdown menu also works.


most info I found says to use;


%windir%\system32\rundll32.exe PowrProf.dll, SetSuspendState 0,1,0

But this puts the computer in hibernate mode. I do have hibernate disabled but using hybrid sleep.


So, What is the command to use to put your computer to sleep (not hibernate)?



Answer



I found a solution. I installed a freeware program called AutoHotKey and recorded the steps to invoke Start Menu -> Sleep into a script file. Then I complied the script file into a stand-alone executable SleepWin7.exe.


Now I simply run SleepWin7.exe to put my computer into hybrid sleep.


You may uninstall AutoHotKey if this is all you need it for.




Update: The above solution doesn't work when the user isn't logged in, i.e. Windows 7 Login Screen. (My computer wakes up at 4am every Sunday to perform weekly backup, which is done without user login.) In such case, the Wizmo program still works:



wizmo.exe quiet standby!



gpt - Out of Band Disk Partitioning and Tables

Our current methods of disk partitioning involve storing the partition layout on the disk itself, right along with the data.


It's easy to screw up the data in a disk : just wipe out the partition data. GPT fixes this somewhat, but the data of how it's partitioned is still sitting next to the data.


Can we not store the partition table in a flash memory chip on disk, in an Out of Band(OoB) manner? Provide an ATA command to query partitions, and to seek a specific sector in a specific partition, which the drive controller can translate to disk-absolute sector numbers and addresses. Compatibility would not be a problem : the disk would switch into partitioned mode using a specific command. Else it would just spoof the relevant sectors for the partition table, or better, it'll use current way of storing table with data. This way, protection for writing to partition table info can be achieved...


UPDATE


PROPOSAL :



  • Store Partition table AND partition table querying code ON disk in a tiny flash chip.

  • Reading through usual ATA commands.

  • Modifying partition table requires new ATA commands

  • Writing a new scheme of partitioning requires other new commands.

  • Compatibility layer for seamless operation with non-OoB-partitioning-aware systems.


BENEFITS :



  • GPT uses a maximum of 34 sectors twice on 512 byte sectors. 34KB.

  • Reduces risk of overwriting or losing partition data

  • Disk can be partitioned in ANY WAY : the ATA commands will take care, using routines stored

  • Makes disks a lot more portable, OS not required to bother about it

  • Standard methods to write to flash, both for modifying, and flashing new partitioning schemes

webserver - How to deploy my own computer as a web server?

How can I have a large bandwidth,and how can I have a static IP address?

windows 7 - Move hdd to other laptop, need Win7 reinstall?

A Thinkpad T61p died (motherboard), I think hdd is ok.


I then mounted the hdd in a Thinkpad R61i; after hardware change warning, it gave BSOD and instantly shut down.


Is it possible to maintain the Windows installation on this disk? In case how can I best make this happen?


EDIT: I have a full Windows 7 license (not OEM).

performance - Is that true that if you keep bulky files on the Desktop then Windows slow down?

A friend of mine keep telling me that if I keep bulky files on the desktop then Windows try to load them in cache and slow down? I'm (almost) sure that this is not the case but how can I demonstrate it?

VMware Player does not display USB stick and can not connect to network


I am running a Windows 7 guest OS on VMware Player from Windows 7. However, when I insert a USB jump drive the guest OS can not access it. VMware Player tells me the stick is connected, but it does not appear on the guest OS 'my computer'. The same is true with my network card. VMware Player detects it, but I am unable to join any networks. How can I fix this problem?



Answer



For USB:


Ensure you have a USB controller setup for the VM:


Virtual Machine Menu->Virtual Machine Settings


If you don't see "USB Controller" in the list, power down the virtual machine's guest operating system. Click "Add" at the bottom of the Virtual Machine Settings window, click "USB Controller" in the list, click "Next" and click "Finish."


Then ensure it's connected to the guest and not the host:


Virtual Machine Menu->Removable Devices->->Connect (Disconnect from Host)"


If your network controller is also USB this may help you get it working as well. If not, it's probably just a matter of ensuring the adapter is compatible with VMWare and that the drivers are properly loaded into the guest OS.


security - How does SSL work? Isn't there a hole?


I was reading this article, specifically the "SSL in action" part. It says:



When Client connects to company.com on its SSL-secured port, the company sends back its public key (and some other information, like what Ciphers it supports).
...
Once the client is happy with the server (and the server with the client, if needed), then the client choose an SSL Cipher to use from the list of encryption methods provided by the server, and generates a “symmetric key” (password) for use with that Cipher. The client encrypts this password using the server’s public key and sends it back to the server. The server (and only the server) can decrypt this message and get this password, which is now shared by both the client and server.



So, my understanding is that there is only one public key; the one that is given to company.com by the trusted 3rd party (thawte/godaddy/verisign etc). The client then chooses to accept this key/certificate and then sends a password used to encrypt future communications.


If there is only one public key, then can't a hacker just go that site once, get a copy of the public key, then intercept the client as he sends the password, decrypt it using the public key he already has, and then spy on all future communications? What prevents that?


The part I don't understand is



The server (and only the server) can decrypt this message and get this password



Why can only the server decrypt the message? What prevents others from decrypting it?



Answer



The Public Key is one way. You can not decrypt the communication with it. You need the private part of the key pair to do the decryption.


External HDD locks Windows XP

I have 1TB Seagate Portable External Hard Drive STAX1000102. When I attach it (USB) to the laptop (Dell Latitude D530) with Windows XP version 2002 SP3, the Operation System goes into strange state. I cannot run simple app like Total Commander, I cannot just do even simple operations, I cannot browse in already launched web browser, I can do nothing - everything takes forever. I cannot even shut down the computer - it must be done by the laptop on/off button. It is not consuming a lot of CPU nor a lot of HDD - it seems that the Operation System itself gets locked somehow.


Just by simply running msconfig, I disabled all items in the Startup tab, all non-Microsoft items in Services tab, and the issue is still present! I also tried to disable some of the Microsoft services, but it didn't help either. Only thing that helped was to run Windows in safe mode.


The HDD works fine on many other laptops and desktop PCs.


Do you have any idea what could cause the trouble?


EDIT - result of @STTR's script:


I have run your script (usbrest.cmd) and unfortunatelly it didn't help. Here is the output (unfortunatelly I have localised Win, I will try to translate where needed):


C:\Documents and Settings\Tomas> C:\Documents and Settings\Tomas>REG DELETE "HKLM\SYSTEM\CurrentControlSet\Contro l\Class\{36FC9E60-C465-11CF-8056-444553540000}" /v LowerFilters /f

Chyba: Systém nenalezl zadaný klíč registru nebo požadovanou hodnotu.
(translation: error: registry key or value not found)

C:\Documents and Settings\Tomas>REG DELETE "HKLM\SYSTEM\CurrentControlSet\Contro l\Class\{36FC9E60-C465-11CF-8056-444553540000}" /v UpperFilters /f

Chyba: Systém nenalezl zadaný klíč registru nebo požadovanou hodnotu.
(translation: error: registry key or value not found)

C:\Documents and Settings\Tomas>REG DELETE "HKLM\SYSTEM\CurrentControlSet\Contro l\Class\{4D36E967-E325-11CE-BFC1-08002BE10318}" /v LowerFilters /f

Chyba: Systém nenalezl zadaný klíč registru nebo požadovanou hodnotu.
(translation: error: registry key or value not found)

C:\Documents and Settings\Tomas>del /F /A:- %windir%\inf\INFCACHE.1

C:\Documents and Settings\Tomas>sc config stisvc start= auto [SC] ChangeServiceConfig SUCCESS

C:\Documents and Settings\Tomas>sc start stisvc

SERVICE_NAME: stisvc
TYPE : 20 WIN32_SHARE_PROCESS
STATE : 2 START_PENDING
(NOT_STOPPABLE,NOT_PAUSABLE,IGNORES_SHUTDOWN)
WIN32_EXIT_CODE : 0 (0x0)
SERVICE_EXIT_CODE : 0 (0x0)
CHECKPOINT : 0x0
WAIT_HINT : 0x7d0
PID : 1540
FLAGS :

C:\Documents and Settings\Tomas>sc config ShellHWDetection start= auto
[SC] ChangeServiceConfig SUCCESS

C:\Documents and Settings\Tomas>sc start ShellHWDetection
[SC] StartService FAILED 1056:

Instance tÚto slu

I have been also looking at the registry key you have mentioned but I have not found the LowerFilters, UpperFilters values.


EDIT 2, output of STTR's script getusb-file.cmd:


C:\Documents and Settings\Tomas>dir /B /A:- %windir%\system32\Drivers\usb*
usb8023.sys
usb8023x.sys
usbcamd.sys
usbcamd2.sys
usbccgp.sys
usbd.sys
usbehci.sys
usbhub.sys
usbintel.sys
usbohci.sys
usbport.sys
usbstor.sys
usbuhci.sys
usbvideo.sys

C:\Documents and Settings\Tomas>dir /B /A:- %windir%\inf\usb* | find /i ".inf"
usb.inf
usbport.inf
usbprint.inf
usbstor.inf
usbvideo.inf

C:\Documents and Settings\Tomas>

EDIT 3:


C:\Documents and Settings\Tomas>wmic BASEBOARD get Product, SerialNumber, Version, Manufacturer
Chyba: (= error)
Kód = 0x80070422
Popis = Zvolenou službu nelze spustit, protože není povolena nebo s ní není spojeno žádné povolené zařízení. (= The service cannot be started, either because it is disabled or because it has no enabled devices associated with it.)
Prostředek = Win32



F:\sw\pstools>REG QUERY "HKLM\SYSTEM\CurrentControlSet\Control\Class\{4D36E967-E325-11CE-BFC1-08002BE103??18}" /v UpperFilters

Chyba: Systém nenalezl zadaný klíč registru nebo požadovanou hodnotu.
(= registry key or value was not found)

I have dumped whole HKLM\SYSTEM\CurrentControlSet\Control\Class registry for you to see.


EDIT 4


Here is the output of RestoreServiceSetting.cmd (there were some errors):


C:\Documents and Settings\Tomas>::HID Input Service
C:\Documents and Settings\Tomas>sc config HidServ start= auto
[SC] ChangeServiceConfig SUCCESS

C:\Documents and Settings\Tomas>sc start HidServ
[SC] StartService FAILED 1056:

Instance tÚto slu

C:\Documents and Settings\Tomas>
C:\Documents and Settings\Tomas>::Shell Hardware Detection
C:\Documents and Settings\Tomas>sc config ShellHWDetection start= auto
[SC] ChangeServiceConfig SUCCESS

C:\Documents and Settings\Tomas>sc start ShellHWDetection
[SC] StartService FAILED 1056:

Instance tÚto slu

C:\Documents and Settings\Tomas>
C:\Documents and Settings\Tomas>::Windows Image Acquisition (WIA)
C:\Documents and Settings\Tomas>sc config stisvc start= auto
[SC] ChangeServiceConfig SUCCESS

C:\Documents and Settings\Tomas>sc start stisvc
[SC] StartService FAILED 1056:

Instance tÚto slu

C:\Documents and Settings\Tomas>
C:\Documents and Settings\Tomas>::Windows Management Instrumentation
C:\Documents and Settings\Tomas>sc config winmgmt start= auto
[SC] ChangeServiceConfig SUCCESS

C:\Documents and Settings\Tomas>sc start winmgmt

SERVICE_NAME: winmgmt
TYPE : 20 WIN32_SHARE_PROCESS
STATE : 2 START_PENDING
(NOT_STOPPABLE,NOT_PAUSABLE,IGNORES_SHUTDOWN)
WIN32_EXIT_CODE : 0 (0x0)
SERVICE_EXIT_CODE : 0 (0x0)
CHECKPOINT : 0x0
WAIT_HINT : 0x7d0
PID : 1796
FLAGS :

C:\Documents and Settings\Tomas>
C:\Documents and Settings\Tomas>::Remote Registry
C:\Documents and Settings\Tomas>sc config RemoteRegistry start= auto
[SC] ChangeServiceConfig SUCCESS

C:\Documents and Settings\Tomas>sc start RemoteRegistry

SERVICE_NAME: RemoteRegistry
TYPE : 20 WIN32_SHARE_PROCESS
STATE : 2 START_PENDING
(NOT_STOPPABLE,NOT_PAUSABLE,IGNORES_SHUTDOWN)
WIN32_EXIT_CODE : 0 (0x0)
SERVICE_EXIT_CODE : 0 (0x0)
CHECKPOINT : 0x0
WAIT_HINT : 0x7d0
PID : 2000
FLAGS :

C:\Documents and Settings\Tomas>
C:\Documents and Settings\Tomas>::Logical Disk Manager
C:\Documents and Settings\Tomas>sc config dmserver start= auto
[SC] ChangeServiceConfig SUCCESS

C:\Documents and Settings\Tomas>sc start dmserver

SERVICE_NAME: dmserver
TYPE : 20 WIN32_SHARE_PROCESS
STATE : 2 START_PENDING
(NOT_STOPPABLE,NOT_PAUSABLE,IGNORES_SHUTDOWN)
WIN32_EXIT_CODE : 0 (0x0)
SERVICE_EXIT_CODE : 0 (0x0)
CHECKPOINT : 0x0
WAIT_HINT : 0x7d0
PID : 1796
FLAGS :

C:\Documents and Settings\Tomas>
C:\Documents and Settings\Tomas>::Logical Disk Manager Administrative Service
C:\Documents and Settings\Tomas>sc config dmadmin start= demand
[SC] ChangeServiceConfig SUCCESS

After restart:


C:\Documents and Settings\Tomas>wmic BASEBOARD get Product, SerialNumber, Version, Manufacturer
Manufacturer Product SerialNumber Version
Dell Inc. 0HP728 .721HP3J.CN4864383F5721.

EDIT5:


After running secedit /configure /cfg %windir%\repair\secsetup.inf /db secsetup.sdb /verbose and secedit /configure /cfg %windir%\repair\secDC.inf /db secDC.sdb /verbose I got this output (translated, commented):


C:\Documents and Settings\Tomas>secedit /configure /cfg %windir%\repair\secsetup.inf /db secsetup.sdb /verbose

Úloha je dokončena. Některé soubory uvedené v konfiguraci nebyly v tomto systému
nalezeny, nelze tedy nastavit ani zjišťovat zabezpečení. Zprávu můžete ignorova
t.
Podrobnosti naleznete v souboru %windir%\security\logs\scesrv.log.
(task is finished. Some of the files were not found so the security level cannot be
found out. You can ignore this. Details in the scesrv.log -- actually this command
took quite a long time, showing progress in percent)

C:\Documents and Settings\Tomas>secedit /configure /cfg %windir%\repair\secDC.inf /db secDC.sdb /verbose

Systém nemůže nalézt uvedený soubor.

Úloha byla dokončena s chybou.
Podrobnosti naleznete v souboru %windir%\security\logs\scesrv.log.
(File was not found -- the secDC.in does not exist. THis terminated immediatelly.
The log file just said that the secDC.inf file could not be found.)

Then I rebooted and the problem persisted. So I hard-rebooted and tried RestoreServiceSetting.cmd script again, but there were similar errors as in the last run:


C:\Documents and Settings\Tomas>::HID Input Service
C:\Documents and Settings\Tomas>sc config HidServ start= auto
[SC] ChangeServiceConfig SUCCESS

C:\Documents and Settings\Tomas>sc start HidServ
[SC] StartService FAILED 1056:

Instance tÚto slu

C:\Documents and Settings\Tomas>
C:\Documents and Settings\Tomas>::Shell Hardware Detection
C:\Documents and Settings\Tomas>sc config ShellHWDetection start= auto
[SC] ChangeServiceConfig SUCCESS

C:\Documents and Settings\Tomas>sc start ShellHWDetection
[SC] StartService FAILED 1056:

Instance tÚto slu

C:\Documents and Settings\Tomas>
C:\Documents and Settings\Tomas>::Windows Image Acquisition (WIA)
C:\Documents and Settings\Tomas>sc config stisvc start= auto
[SC] ChangeServiceConfig SUCCESS

C:\Documents and Settings\Tomas>sc start stisvc
[SC] StartService FAILED 1056:

Instance tÚto slu

C:\Documents and Settings\Tomas>
C:\Documents and Settings\Tomas>::Windows Management Instrumentation
C:\Documents and Settings\Tomas>sc config winmgmt start= auto
[SC] ChangeServiceConfig SUCCESS

C:\Documents and Settings\Tomas>sc start winmgmt
[SC] StartService FAILED 1056:

Instance tÚto slu

C:\Documents and Settings\Tomas>
C:\Documents and Settings\Tomas>::Remote Registry
C:\Documents and Settings\Tomas>sc config RemoteRegistry start= auto
[SC] ChangeServiceConfig SUCCESS

C:\Documents and Settings\Tomas>sc start RemoteRegistry
[SC] StartService FAILED 1056:

Instance tÚto slu

C:\Documents and Settings\Tomas>
C:\Documents and Settings\Tomas>::Logical Disk Manager
C:\Documents and Settings\Tomas>sc config dmserver start= auto
[SC] ChangeServiceConfig SUCCESS

C:\Documents and Settings\Tomas>sc start dmserver
[SC] StartService FAILED 1056:

Instance tÚto slu

C:\Documents and Settings\Tomas>
C:\Documents and Settings\Tomas>::Logical Disk Manager Administrative Service
C:\Documents and Settings\Tomas>sc config dmadmin start= demand
[SC] ChangeServiceConfig SUCCESS

I connected the drive again and the problem still persists.


EDIT: today I tried to attach normal (internal) HDD using the USB adapter and it did lock the computer the same way.

Jmeter- How to get response in Jmeter where API request in x-www-form-urlencoded format

I have to automate the API in Jmeter. APi request is in x-www-from-urlencoded form.


Appreciate any response to resolve issue asap.


Thanks leena

Windows 10 Administrator account has been disabled. Please see your system administrator

I recently had a problem after installing Windows 10 which required me to start in Safe Mode to rectify it. Since this I can no longer "restart" and the only screen that comes up is:



Administrator


Your account has been disabled. Please see your system administrator.


OK



When I click "OK", nothing happens, I can't get into another screen, I can not log in as administrator nor as myself as it just doesn't have any other screen options to select.


Is there anything I can do?

Friday 27 October 2017

linux - How to force NetworkManager to make a connection before login?


I leave my laptop at home 95% of the time. I would like it to connect to my wireless network without me having to login. And, just as important, I'd like it NOT to DISconnect when I log off.


I'm using Fedora, but Ubuntu instructions are welcome too.



Answer



I guess this question was asked a while ago, but this feature has been added to recent versions of Network Manager. See here.


Automatically switch to Desktop after log-in in Windows 8.1


Is it possible to automatically log you into classic Windows desktop in Windows 8.1?


Either with Windows settings or by using 3rd party software..


This is pretty important for me since I don't know if I should buy this OS.


Thanks in advance



Answer



Go to the Desktop, then right-click in the taskbar, and select “Properties”, then click on the navigation tab to open up a menu. Check the box in the Start Screen list that says “Go to the desktop instead of Start when I sign in”. Then click the “OK” button.


enter image description here


Next time you start up you’ll go to the desktop first.


From http://blogs.msdn.com/b/mis_laboratory/archive/2013/08/09/windows-8-1-boot-to-desktop-maybe-the-designers-were-right.aspx


wiki - What is a good hosted software for FAQ

I need something in a form of Knowledge Base/FAQ/Wiki to deliver FAQ to users over web. Preferably hosted solution. What are my options?

How do I increase VirtualBox resolution past 800x600 in Linux?




Possible Duplicate:
Ubuntu on VirtualBox can only show resolution of 800x600 - how to change it?



No matter what I do I cannot get the resolution past 800x600. If I am using a Windows install in VirtualBox, I can get it to 1024x768.


What is limiting me from doing this in Linux?



Answer



Have you installed the VirtualBox Guest Additions on your guest yet? If so, then the size of the guest should reflect the size of your VirtualBox window, so if you maximise the latter, your guest should resize its display accordingly.


You may also need to activate VirtualBox's Auto-resize Guest Display option (Host-G is a hot key for that).


windows - What is the best FREE way to remove duplicate files from iTunes?



I thought about using a file deduper but figured that would still show the dupes IN itunes. I really don't care about artwork or the likes. Is using the built in "show dupes" the best option?


The built in "Show Duplicates" feature fails because I have thousands of songs and hundreds of duplicates.



Answer



I find the easiest way to remove duplicate songs is to just wipe out your library and do a fresh import of all your music.


It's not the most efficient method but it gets the job done. However, if this is an ongoing problem for you, then this wouldn't be the best method to take.


windows 7 - Internet Explorer's proxy settings not getting saved


When I connect to my workplace LAN I have to use a company proxy. This proxy is set as usual in IE's LAN settings.


The picture below (taken from Google Images as my Windows is not English-localized) shows the typical configuration


Proxy settings window


The problem is that when I check the "Use a proxy server..." checkbox and hit OK (my configuration only differs from the screenshot's by proxy's hostname) the settings are not applied.


It means that if I re-enter the LAN settings I see again the checkbox unchecked and the Address field greyed. No matter how many times I re-enable it, or close (with OK) Internet Settings window, I still can't enable proxy.


Fortunately Firefox has its own independent proxy setting window, but I don't like this behaviour in Windows.


I'm unsure whether this is related or not with recent IE update to version 10.


The question is obvious: how can I fix that?



Answer



Reset your IE to factory setting :)


This action deletes the trusted sites that you have added and resets the parental control settings, so keep a note of these sites before you use this feature.


1- First, exit all the programs that are running, including Internet Explorer (if it is running). Better, you can simply restart your PC.


2- Click on Start, type the following command in the Start Search box, and then press Enter:


inetcpl.cpl


Windows XP users for resetting IE 7/IE 8, click Start, then click Run. Type the following command in the Open box, and then press Enter: inetcpl.cpl


3- Wait for the Internet Options dialog box to appear.


RIES - Click on Advanced Tab


4- Now in the Internet Options dialog box, click on the Advanced tab, click Reset in the Reset Internet Explorer settings section. Click Reset again in the information dialog box.


RIES — Click on the Reset button, Reset again and Close


5- When Internet Explorer finishes resetting, click Close in the confirmation dialogue box and then click OK.


6- Close and open Internet Explorer again.


audio - Sound output connector on CD-ROM drive?


My old CD reader has a volume knob and a minijack socket on the front. On the back it has the regular stuff (IDE interface, Molex power) plus a digital sound connector (DG) and an analog sound connector (RGGL). Is there a specific cable meant for connecting the digital or analog sound output to my motherboard, or do I have to solder one myself?


The CD-ROM drive is a Lite-On LTN-486 and has the ability play CDs and output the sound without communicating with a computer.



Answer



Good definition of the CD-ROM cable here



A cable used to send audio CD sound to the computer's sound card. When playing audio CDs, CD-ROM drives output analog sound to both a headphones jack and external connector just like a CD player. This method is still the way audio CDs are played on a computer, but it was the only method available on earlier CD-ROM drives for extracting data from an audio CD. By the mid-1990s, most CD-ROM drives could pass the digital data over the computer's bus (see digital audio extraction).


PCs today use a standard four-pin cable; however, earlier cards and drives used connectors with three to six pins. Finding the right cable was a problem, and the earliest drives had no connector. An advantage of the multimedia upgrade kits that were popular before CD-ROMs were standard issue on a PC was that they included the card, drive and the correct cable. In lieu of this connection, a stereo cable from the headphones jack of the drive to the AUDIO IN of the sound card could always be used.



pc diagram


Also early drives would have custom interfaces and sound cards would need to support multiple plugs. You could find old SoundBlasters with 2-3 cable headers. The four-pin cable has now become the standard.


cable


nvidia graphics card - Regarding OpenGL driver


I have some problems with installing the OpenGL driver.


I have the NVIDIA Geforce GT 630M graphics card, but when I run my programs, i get the following error:



Unable to create OpenGL 3.3 context (flags 0, profile 1)



On the website, it says that I should be capable of using OpenGL up to 4.1. (But currently it can only support OpenGL up to 3.1.)


Whenever I try to download drivers I get errors. I tried downloading this driver, but I get this error when I try installing it:



NVIDIA installation program could not continue.


This graphics driver could not find a compatible graphics device.




Answer



I've solved nVidia OpenGL compatibility problems using GLView. It will help you to identify any compliance issues you have with your driver and also facilitate updating drivers.


linux - Samba - Create Subdirectory Shares with their own permissions


I have a Samba share containing many folders like this:


share
- folderA
- folderB
- folderC
- folderD

There are around 20 users accessing those shares. Every user can have their individual access to some of the directories, for example Ben can access folderA and folderC, but not folderB and folderD. Jenny can access folderB and folderC, and so on.


I don't want the users to mount each folder they need. I want them to mount the folder "share" which contains all the subfolders. The access is then limited by setting the linux permissions.


I created a group for every subdirectory and added the users to those groups. The access control works perfectly for existing files. But whenever a user creates a file in a subdirectory, it is denied for every other user having the permission for read/write access in that directory. To solve this, I played around with the samba masking but can't get it to work.


My Samba conf looks like this:


guest ok = no

[global]
workgroup = WORKGROUP
security = user
encrypt passwords = yes

[Share]
path = /var/samba
valid users = @everybody
read only = no
writeable = yes

[folderA]
path = /var/samba/folderA
valid users = @users_folderA
read only = no
writeable = yes

create mask = 770
directory mask = 770
force directory mode = 770

force group = users_folderA

[folderB]
path = /var/samba/folderB
valid users = @users_folderB
read only = no
writeable = yes

create mask = 770
directory mask = 770
force directory mode = 770

force group = users_folderB

[folderC]
path = /var/samba/folderC
valid users = @users_folderC
read only = no
writeable = yes

create mask = 770
directory mask = 770
force directory mode = 770

force group = users_folderC

[folderD]
path = /var/samba/folderD
valid users = @users_folderD
read only = no
writeable = yes

create mask = 770
directory mask = 770
force directory mode = 770

force group = users_folderD

So obviously every user is in the group everybody, so they can mount the share with the subdirectories. The access for each subdirectory is working perfectly fine. But whenever Ben creates a file in folderC, the file gets the file permissions -rwxr--r-- but it should be -rwxrwx---


I think the shares for the individual folders don't work at all because I tried to set writeable = no and read only = yes to test it. Restarted smbd and nmbd and remounted the network share (in Windows 10). The users were able to create files and modify their own.


This runs on a raspberry pi with raspbian. The hard drive with the files is formatted as ext4 and mounted via fstab.



Answer



Try this config (for share sections):


[Share]
path = /var/samba
valid users = @everybody
force group = +everybody
writeable = yes
create mask = 0660
force create mode = 0110
directory mask = 0770

[folderA]
path = /var/samba/folderA
valid users = @users_folderA
force group = +users_folderA
browseable = no

[folderB]
path = /var/samba/folderB
valid users = @users_folderB
force group = +users_folderB
browseable = no

[folderC]
path = /var/samba/folderC
valid users = @users_folderC
force group = +users_folderC
browseable = no

[folderD]
path = /var/samba/folderD
valid users = @users_folderD
force group = +users_folderD
browseable = no

Do not forget to check the config and restart samba:


# testparm
# service smbd restart
# service nmbd restart

Set permissions:


chown root:everybody /var/samba
chmod 770 /var/samba
chown root:users_folderA /var/samba/folderA
chmod 2770 /var/samba/folderA
chown root:users_folderB /var/samba/folderB
chmod 2770 /var/samba/folderB
chown root:users_folderC /var/samba/folderC
chmod 2770 /var/samba/folderC
chown root:users_folderD /var/samba/folderD
chmod 2770 /var/samba/folderD

This way direct access to internal folders is not allowed. Moreover, they are not visible at all and can only be accessed through the parent folder.


memory - Windows 7 Keeps Rebooting after RAM Upgrade

My Notebook comes with a 4GB RAM (2x2GB) (Sony Vaio vpcea46fm)


I am Upgrading to 8GB (2x4GB) memory, but after i installed the new ships, windows keeps rebooting. If i return the old RAM everything goes back to normal.


How to troubleshoot such a problem?

Thursday 26 October 2017

windows 7 - Xubuntu 9.10 running on VirtualBox never goes idle


On my Windows 7 32bit machine I'm running a VirtualBox instance of Xubuntu 9.10 32bit and I've noticed that the screen saver on the virtual box instance of Xubuntu never becomes active despite setting the timeout to 1 minute.


I also have a Kubuntu 9.10 instance that I also run on VirtualBox on this machine and this does actually become idle and activate the screen saver, locking the session which is the thing that I am trying to achieve.


I'm wondering if there are any suggestions for things to either check or change to get the system to become idle (it's a very bare installation, pretty much just the bare installation and Google Chrome) or whether there is some other method that I could achieve the same effect (have the system lock after 1 minute of inactivity) without relying on the screen saver?



Answer



ps x | grep xscreensaver will tell you if the screensaver is running. Just running xscreensaver in a terminal is enough to start it up, if not. The configuration which sets timeout and locking behavior etc. should be customized in $HOME/.xscreensaver


An alternate locking program is xlock.


Just to be clear: xscreensaver should be constantly running if you want your session to auto-lock - it is the program that detects that you have been idle, locks the screen, and displays the screensaver.


windows - How to Calibrate my Monitor?

I have a Dell D630 laptop.


I just purchased a 23" external Samsung LCD monitor (which is awesome).


I immediately realized that my Dell laptop monitor colors are extremely wasted out compared to my external Samsung monitor, once I plugged it in.


How do I calibrate just my laptop monitor without effect the colors on my externally connected Samsumg monitor.


I'm running WinXP-SP3.

microsoft excel - Transform Fixed Width to CSV?


I have a whole bunch of data files with different content but identical layout. I need to convert them to CSV before importing them into a CRM application.


I usually open the tab-delimited file in Excel, which prompts me to manually define the tab stops using the Text Import Wizard. Once I have the file opened I convert it to CSV.


Problem is I have a bunch of these files (say 20-30) and Excel doesn't remember what one does in the Text Import Wizard and for reasons too lengthy to explain here I can't just combine them all into one mass file - even though the data structure is identical.


I'm wondering if there is a program or process out there that will allow me to save a "template" of the data file structure, and then apply it against each file so I don't have to recreate it manually?



Answer



For this I would normally use a batch process in a scripting language


For example, this is AutoIt:


$getfile = FileOpenDialog("Choose a file",@ScriptDir, "*.tsv",7)
If StringInSTr($getfile,"|") = 0 Then
$split = StringSplit($getfile,"|")
For $i = 2 to $split[0]
$file = FileOpen($split[$i])
StringReplace($split[$i],@TAB,",")
FileClose($split[$i])
Next
Else
$file = FileOpen($getfile)
StringReplace($file,@TAB,",")
FileClose($file)
EndIf

This would be just as easy in VBScript, Batch, Python or Perl.


Disable Hyper-v in windows 8.1 pro error


I am trying to disable Hyper-V in Windows 8.1 Pro 64-bit but it is not working. I tried using Control Panel as well as by using this command: dism. exe /Online /Disable‐Feature: Microsoft‐Hyper‐V


But did not work.


During shutdown it does up to 30% disables and during boot time it gives message as Getting Windows ready ...% completed and then it shows:


We couldn't complete the features
Undoing changes
Don't turn off your computer

How do I resolve this error? or how do I disable Hyper-V in Windows 8.1 Pro 64-bit?


Error files OneDrive



Answer



The log shows that Windows fails to update the boot manager:



10:27:54, Error [0x018050] CSI 0000004e (F) Failed execution of queue item Installer: Boot Configuration CSI Advanced installer ({3eca0b00-79bb-42b9-8421-a26a5cbb37e4}) with HRESULT HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND). Failure will not be ignored: A rollback will be initiated after all the operations in the installer queue are completed; installer is reliable (2)[gle=0x80004005]



This happens when you use other boot manager like GRUB to dual boot Linux. Remove GRUB, uninstall Hyper-V and restore GRUB after doing it.


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