Monday, December 22, 2014

Install drivers in windows


Link for big manufacturers support pages with drivers:

Fujitsu Siemens : http://support.ts.fujitsu.com/download/Index.asp

Acer : http://us.acer.com/ac/en/US/content/drivers 

Dell : http://www.dell.com/support/home/us/en/19/Products/?app=drivers

HP : http://www8.hp.com/us/en/drivers.html

---------------------
IF you have a PCI and Parallel port yellow in device manager and you de not have an uninstalled card, you have to install :
Intel Active Management Technology - PCI port (LMS-SQL),  Paralele port (HECI)
----------------------
USB 2.0-CRW   = (Card Reader)
----------------------

Install drivers in windows 7 and 8 that are not available through windows update ( not recommended bad system stability - but last resort if you want newer operating system for old hardware) 

First open in Internet Explorer : http://catalog.update.microsoft.com/  and install the asked add-on.

Search the driver, for example "mobility radeon x1600" driver that is not available through windows update in windows 8.1 . You will experience boot start-up problems with x1600 on windows 8 if you do this but it's the only way to get max resolution.
Download the x86 or x64 driver accordingly to your system. It will be a .cab file.
Extract it and install it manually by opening Device manager and right click and Update driver software, Browse my computer for driver software, and select the folder where you extract it.

-----------------------

Windows XP SP2 - Could not install audio driver

"Driver Installation Failed: Could not find the MEDIA device for this driver"



You need to get the UAA hotfix from Microsoft. (This is for SP2 -- it is included in SP3.)

UAA Download Link : http://support.microsoft.com/kb/835221

Sunday, December 21, 2014

Windows update - related errors

Windows could not search for new updates - windows 7

While running windows update you receive :
Windows could not search for new updates - windows 7



The problem is with computer date, that causes the windows update server to interpret it as an expired certificate. Just change the date to current date and try again.

 

Windows Update error - WIndows XP SP2 

“The website has encountered a problem and cannot display the page you are trying to view. The options provided below might help you solve the problem”

  Most probably because of windows xp sp2.


Optionally (should be done automatically by the windows update agent installer)  : 
  1. Stop Windows Automatic Update Service (net stop wuauserv)
  2. Stop Background Intelligent Transfer Service (net stop bits)
  3. Run Windows Update Agent setup: WindowsUpdateAgent30-x86.exe
  4. Start Windows Update service (net start wuauserv)
  5. Start Background Intelligent Transfer Service (net start bits)

 

Friday, December 19, 2014

Windows Experience Index scores in Windows 8.1


Step1 :
Open a cmd and type "winsat prepop"
This will run the benchmark and store the results on your PC as XML files.
Step2 :
 Open the Windows Powershell and type "Get-WmiObject -Class Win32_WinSAT"

WinSPRLevel : is the base score and is  the lowest of the scores and represents the Rating in windows 7

The maximum score is 7.9

Friday, November 21, 2014

Cmd System error 5 has occurred. Access is denied. windows 8

Open START - All Programs - Accessories - Command Prompt
Right click and select Run as administrator.


START - Down arrow on the bottom left of the screen - scroll to the right side - Under Windows System - Right click and select Run as administrator on Command Prompt

Monday, November 17, 2014

Automate windows customisation

Scriptable windows commands :

http://www.autohotkey.com
http://www.macrocreator.com

Inno Setup is a free installer for Windows programs.
General useful silent install switches :
http://unattended.sourceforge.net/InnoSetup_Switches_ExitCodes.html  

Control Panel Command Line Commands in Windows :
http://pcsupport.about.com/od/tipstricks/a/control-panel-command-line.htm

CONTROL [cpl],,[page]
CONTROL [/name] [/page]
CONTROL [-name] [-page]

ex :
control /name Microsoft.ActionCenter
control /name Microsoft.DateAndTime
control /name Microsoft.ActionCenter /page pageSettings

http://msdn.microsoft.com/en-us/library/windows/desktop/ee330741%28v=vs.85%29.aspx#canonical_names

Windows does not boot in normal or safe mode, stuck at some driver - run chkdsk

Most of the time is file system integrity problem (system file/driver) caused by a forced shutdown either by losing power or forceful shut down by the power button.
You get more chances to get this if you close it while it was doing updates.
It can also be cause by a bad sector on one of the mentions files, or virus alteration of files.


To fix-it you have to run a chkdisk.
Boot from a hiren's boot cd and select chkdisk, after restart and it will boot to windows normally.

If that did't work you can try to check if you find a 0 bytes file in C:\Windows\System32\drivers, usually is random letters, numers file.

Tuesday, November 11, 2014

Stop CHKDSK every time at start-up dirty partition

If a partition is marked as dirty it will not be cleared.

Type :
fsutil dirty query d:
 Volume - d: is Dirty
You can also set the dirty bit if you want by : fsutil dirty set d:


CHKNTFS /X d:
 /x = not to check the volume at start-up

chkdsk /f /r d: 

You can manually remove the dirty bit :

Download a hdd hex editor : DMDE GUI for Windows

Select Logic/disks volumes, select the volume and press Open volume.

ALT+C = volume cluster selection + ENTER
CTRL+S = Search string --- and paste in the hex part:

03 01 00 00 00 00 00 00 80 00 00 00 18  - no dirty bit
03 01 01 00 00 00 00 00 80 00 00 00 18  - win xp, win 7
03 01 01 01 00 00 00 00 80 00 00 00 18  - win 8

CTRL+E = edit 

Monday, November 3, 2014

Give credentials from command line while accessing network resources or map network drive

You try to copy a folder from a network location :
robocopy -E \\computername\folder\ D:\  
 
and you receive :
Logon failure: unknown user name or bad password.
 
To fix it type first :  
net use \\computername\ipc$ password /USER:username
 
 
To map a network drive :
net use n: \\computername\sharedfolder password /user:username
 
 
If you receive : 
A specified logon session does not exist. it may already have been terminated.
 
This behavior occurs when the "Do not allow storage of credentials or 
.NET Passports for network authentication" Network access policy is 
enabled.
 
gpedit.msc
 Windows Settings -> Security Settings -> Local Policies -> Security Options
Network access: Do not allow storage of credentials or for network authentication  
Disable. 

Thursday, October 9, 2014

Windows 7 auto login and prevent user password from expiring

User profile service failed the logon User profile cannot be loaded
How to disable user password from expiring.

Windows 7 auto login :
To activate windows autologin directly from windows type in run : control userpasswords2
You will get this window :
Then select the user you want to autologin and deselect : Users must enter a user name and password to use this computer. , press Apply and you will be ask for the password. Type the password ( it can also be blank ) and OK.

Windows 7 user polices :
In windows home and home premium you do not have the Local Users and Groups (Local) available.
You can try to open it by typing : lusrmgr.msc


To disable the password expiration type at a command promt (cmd) :
wmic useraccount set passwordexpires=false

will set the passwordexpire attribute to all accounts to false.

If you also have autologin activated you will not be able to log in with no user.
To prevent this loop keep pressed the SHIFT key while booting windows or change bios time or reset bios by removing battery so the user password is not expired anymore.


Tuesday, September 30, 2014

AsusSetup pop-up error - C:\Users\Username\AppData\Local\Temp\ 132218 Log.iniis lost

At start-up on a limited user account, or if you clean the temp folder you get :


To fix-it you have to delete the schedule task : i-Setup105832
Open Task Scheduler - In Control Panel under Administrative Tools, or type Task Scheduler in Start menu.


Tuesday, September 23, 2014

Configure a software raid 1 mirroring in windows 7

You need to use a HDD as big or bigger then the one you want to mirror, one identical would be best.

Open Disk Management either by accessing Computer Management by Right click - on My Computer - and select Manage - then select under Storage - Disk Management
or type in Run - diskmgmt.msc

IF you want to make a mirror to your active windows hdd you MUST start first with the System Reserved partition (100MB NTFS) or convert the whole hdd to dynamic first.
(if you start mirroring from the second, third etc partition you will not be able to mirror the System Reserved partition unless you wipe the hole hdd and reinstall windows)




Right click System Reserved partition and select Mirror volume - select the empty disk press OK and then you will be asked if you want to convert the two HDD to dynamic disks.
Select OK.
Wait for each mirrored partition to sync or it will take many hours to sync them in parallel


This will only work with MBR formated HDD - and for booting/installing Windows you must select in BIOS - boot options Legacy Mode (not UEFI).
If you chose to install windows with GPT partitioning style it will create some system reserved partitions that are not visible in disk management so you will be unable to mirror them.

RAID 0 - stripping for performance
RAID 1 - MIRRORING
RAID 10 - https://www.youtube.com/watch?v=bcCfVYZa0k0

Monday, September 22, 2014

Windows sharing from limited user - access denied

Open Network and Sharing Center click Change advanced sharing settings

Public folder sharing - select - Turn on sharing so anyone with network access can read and write files in Public Folders
Password protected sharing - Turn off password protected sharing


After you access the shared computer with the printer you receive and Access denied message when you want to access the printer.
Go to Control Panel - User Accounts - Credential Manager - Add a Windows credentials


Printer not appearing in devices and printers

Devices and Printers icon of the printer is missing but you can find the printer when you print from applications.
Go to services and find :
  • Device Association Service
  • Device Install Service
  • Device Setup Manager
Start them all and if you have more device ... something services start them all, and if any is on disabled put it on manual - they should appear as Manual (Trigger Start) - and restart the computer, then the printer should appear.

Thursday, September 11, 2014

NTLDR is missing


You have to enter Windows Recovery Console :

Insert Windows Xp cd and select to boot from CD.
At Welcome to Setup press R for repair.


Select the number for your windows instalation ( most often 1 ).
Enter Administrator password. Then type :

copy x:\i386\ntldr c:\
copy x:\i386\ntdetect.com c:\

bootcfg /rebuild - to generate a new boot.ini file
Enter Load Identifier: Windows XP
Enter OS Load options: /Fastdetect  


After you boot in windows check that all 3 files are sistem, readonly and hidden so they don't get deleted again.
Open cmd, go to C:\ type attrib
To add all attributes type :
attrib +S +H +R C:\boot.ini
attrib +S +H +R C:\NTLDR
attrib +S +H +R C:\NTDETECT.COM 

If you want to manually edit boot.ini first must remove attributes :
attrib -S -H -R C:\boot.ini
then add them back :
attrib +S +H +R C:\boot.ini

Monday, September 8, 2014

Open File Security Warning Prompt at Start-up


Intel chipset :
C:\Windows\system32\igfxtray.exe etc

The problem is caused by downloading an exe file with IE that adds a Zone Identifier.


To check that it's a zone.identifier caused by downloading the file with IE type :
dir /r C:\WINDOWS\system32\igfxtray.exe
where /r :
  /R          Display alternate data streams of the file. 
and you should see something like ZoneIdentier NTFS data stream

To remove the zone right click the file select properties and select Unlock.



Streams utility can scan and remove the Zone.Identifier 

You can either scan all the Windows folder or the C: drive with the command :

Streams.exe /s C:\Windows 

Remove the zone with :

Streams /d C:\WINDOWS\system32\igfxtray.exe

Thursday, August 28, 2014

NSIS Error - Error launching installer


Another error message related to same problem : System cannot find the path specified

Rename the folder or move the installer to a folder that has a name without special characters.
Browser default Download folder might be : "Descărcări" etc depending on your windows language.

Sunday, August 10, 2014

Install PHP in windows to run from cmd

Download the latest version of PHP for windows from here : http://windows.php.net/download/

Unzip and move folder to C: or where you want and then add the path to the system path.
Copy the php.ini-production into php.ini in the same folder.

Add php location to system path so you can run it from CMD.
Right click on My Computer and select Properties then follow instruction in the image below.
how to add php exe to system path


You need to install if you don't already have it  Visual C++ Redistributable for Visual Studio 2012 otherwise you will receive the error :
The Program can't start because MSVCR110.dll is missing from your computer. Try reinstalling the program to fix this problem.

http://www.microsoft.com/en-us/download/details.aspx?id=30679

Run php to see that it works.

Wednesday, August 6, 2014

SATA mode : AHCI vs IDE vs RAID


AHCI  - is the native sata mode.
- supports hot plugging (add/remove component while the computer is running) and some faster indexing
To be able to take advantage of the sata hot-plug your motherboard or sata controller must also be sata hotplug capable ( not all are ).
If it is, and it is activated from BIOS you will see the Safely Remove Hardware icon on the system tray, and your hard drive will be listed there.

RAID - is AHCI mode plus vendor specific raid configurations

Although windows vista or later has AHCI support will not load the driver at start-up if the os was installed in IDE mode, but can be installed in windows after booting in IDE mode.

AHCI support exists in Windows Vista, 7 and 8.
Windows Xp only supports IDE mode natively at boot but you can add a sata/raid driver via the F6 boot option or after the os is installed.

Monday, July 28, 2014

Raid error when installing windows xp with F6 option

File iaStor.sys cause an unexpected error (4096) at line 2113 in d:\xpsprtm\base\boot\setup\oemdisk.c.


To solve the problem you must extract the archive directly on the floppy drive, not extract to default location and then copy/paste to floppy.
Prior to this I have changed windows cd-s, countless pieces of floppy disks and many hours.

If the motherboard manufacturer does not provide good archive or one that cannot  be extracted directly to floppy you can download from intel downloadcenter by searching the south bridge chipset that you can find on the motherboard manufacturer website.

Intel® ICH9R/ICH9M-E/ICH10R/PCH/PCHM SATA RAID controller  

https://downloadcenter.intel.com/Detail_Desc.aspx?DwnldID=17882 

---------------------------------------------------------------------

Se extrage arhiva cu drivere RAID direct pe disketa si nu in locatia initiala si apoi sa copiezi fisierele pe disketa. Daca producatorul nu ofera o arhiva ce poate fi extrasa direct pe disketa se cauta dupa modelul chipsetului (south bridge) pe site la intel, nvidia etc dupa caz.

Saturday, July 26, 2014

Windows diagnostics and utils


Total system uptime, windows instalation date :

WinAudit - http://winaudit.zymichost.com/index.html
or write in cmd systeminfo|find /i "install"
---------------------
Windows activation :  slui.exe
IF windows fail to activate check the system date to be current date, as the server verification will fail with an older date.
If all else fail you can use automated phone sistem : 0800 822 222 (Romania)
---------------------

Useful programs :

Nirsoft - password recovery - http://www.nirsoft.net/
Sysinternals - various windows diagnostics - http://technet.microsoft.com/en-US/sysinternals


Get Data Back FAT32 NTFS  4.32 - Recover deleted files  (you need paid version to recover)


Java download - http://java.com/en/download/manual.jsp


CD Burner XP - https://cdburnerxp.se/
Magic iso maker - http://www.magiciso.com/download.htm

Daemon tools lite - http://www.disk-tools.com/download/daemon


Unlocker - ( Cannot delete file: Access is denied ) - http://www.emptyloop.com/unlocker/
Easeus Partition Master free ( partition manager ) - http://www.partition-tool.com/personal.htm
---------------------

HDD diagnostics :

HDD - Western Digital Data LifeGuard Diagnostics - WinDlg

    Thursday, July 24, 2014

    FTP mapping + VPN - Windows 7

    FTP mapping - windows explorer

    Open My Computer - Right Click - Select Add a network location - and follow the wizard, you have to provide the address  eg. ftp://ftp.domain.com/ , and select if you want to connect anonymous or with a specific username.



    Setare VPN - Server - Client - Windows 7

    VPN (Virtual Private Network) - allows direct access to a private network from the internet
    Data transferred through a VPN is encrypted

    1. VPN Server - incoming

    Open - Network and SharingChange Adapter Settings
    or Run - control ncpa.cpl


    Create port forwarding on the router for PPTP on port 1723
     
    Or press ALT key
    Click File, and then New Incoming Connection.
    Select the users you'd like to give access
    Select Through the Internet 
    Select TCP/IPv4
    And follow wizard : select a username with password, Through the internet, TCP/IPV4 and File sharing if you want it


    2. VPN client

    Click the Start button. In the search bar, type VPN and then select Set up a virtual private network (VPN) connection.


    OR

    Run - %windir%\system32\xwizard.exe RunWizard {7071EC75-663B-4bc1-A1FA-B97F3B917C55}

    VPN – Virtual Private Network

    When you connect to a public hotspot - free internet - at a hotel, restaurant, pub, airport etc – your data will pass through that local network, and any other users connected to the same network can listen to your data, especially when it is unencrypted - when you can login without a password.

    A vpn - is a virtual private network - but this connection is now encrypted with a Very long password (64 or 128 randome characters) that is almost imposible to break, or the effort is expensive unless you are targeted specifically.
    In most cases hackers just scan the trafic for credit cards or passwords to account.

    There are two ways to do this.

    Method 1

    This is the free mothod. If you own a router at your house with an internet connection, most router nowadays have a vpn server function implemented through openvpn.
    You just have to enable it on your router and and download the configuration file to your mobile phone / laptop.

    If you are using linux you have to install openvpn
    sudo apt install openvpn
    Then you have to start the tunnel as root
    openvpn --config /home/user/OpenVPN-Config-MyRouter.ovpn

    Method 2

    Use a payed service like NordVPN – where you pay around 10 euro per month and have all your data encrypted.
    With this service you also get a few more benefits like being able to change your location so you can access services available only in those countries.
    If you are a involved with webservices you can also test if geolocation works well.

    Monday, July 21, 2014

    SSH tunnel


    SSH tunnel - encrypted data - for public access points or avoiding local firewall rules

    1. Custom firmware  Tomato or DD-WRT  on a router connected to the internet
    2. SSH client eg. PuTTY
    3. SOCKS compatible browser eg. Firefox
    4. Dynamic DNS eg. NoIP



    Create a file eg. tunelssh.bat with the following line (putty exe must be in same folder or in system_path) :

    start /b putty -D 80 -P 22 -ssh xxx.no-ip.biz -l root

    start /b - run in background
    -D xxx - selected port for the tunnel ( 80 default for HTTP )
    -P 22  - ssh listening port on the destination router (default 22)
    xxx.no-ip.biz - public dns address or ip
    -l root  - username for authenticating on ssh server (optional)

    Tuesday, July 15, 2014

    Atmega AVR Programming Basics


    Program an AVR manually


    DDRX = DATA DIRECTION REGISTER X [1=output/0=input] where X is the letter of the register
    eg. DDRC |= _BV(7);    set pin 7 of register C as output

    PORTX = 1;
    eg.  PORTC ^= (1<<1);  set pin 1 of register C to HIGH (5v) until otherwise set

        DDRB = 0b00000110;
      PORTB = 0b00000100;

    Set a bit :

    _BV() is a macro, BV = bit value

    #define _BV(bit)  (1 << (bit))
    _BV(7) = (1<<7)   

    a |= (1<<position) or
    a |=_BV(position)

    example :
    a = 00000000
    a |= (1<<3)  =>  a = a|(1<<3) => a=(0000000)|(00000100) => a=00000100
    a |= _BV(3)

    Set a bit :
    a |= (1<<2);
    a |= _BV(2);

    Clear a bit :
    a &= ~(1<<2);
    a &= ~_BV(2);

    uint8_t (same as: unsigned char)
    int8_t (same as: signed char)

    uint16_t (same as: unsigned int)
    int16_t (same as: int)

    Hello world program in microcontroller world = Blink program :
    #define F_CPU 1000000UL  // set proc speed to 1MHz
    #include <avr/io.h>
    #include <util/delay.h>

    int main (void)
    {
        DDRD |= _BV(6);  // pin D6 set as output
       
        while(1)
        {
            PORTC |=_BV(6);
            _delay_ms(1000);
           PORTC &= ~_BV(6);
          _delay_ms(1000);
        }
    }
    ----
    itoa() - convert integer to string.

    Software :

    For uploading hex data to avr :
    eXtreme Burner - AVR => GUI alternative to avrdude - for uploading hex data to AVR
    http://extremeelectronics.co.in/


    For compiling code to hex :
    WinAVR - Gnu C compiler and AVRLibC -  http://sourceforge.net/projects/winavr/
    AVR Studio - IDE  - aStudio4b589.exe

    Resurse :
    Using LCD module with AVR - http://extremeelectronics.co.in/avr-tutorials/using-lcd-module-with-avrs/
    AVR basic programming - SPI PROGRAMMING BASICS
    Interfacing ps/2 - http://codelake9.wordpress.com/2011/12/10/interfacing-ps2-keyboard-to-atmega128atmega64/

    ADC - analog to digital convertor

       //InitADC
       ADMUX=(1<<REFS0); // For Aref=AVcc;
       ADCSRA=(1<<ADEN)|(7<<ADPS0);

    uint16_t ReadADC(uint8_t ch)
    {
       ch = ch & 0b00000111;
       // clear previous channel selection
       ADMUX &= 0xF8;
       ADMUX |= ch; // add in the new selection bits (REFS0 untouched)

       //Start Single conversion
       ADCSRA|=(1<<ADSC);

       //Wait for conversion to complete
       while((ADCSRA & (1<<ADSC)));

       return(ADC);
    }

         //ReadADC( channel )
         //ADC Channel ch must be 0-7 or what you micro has
          adc_value=ReadADC(7);

    Avr - SPI (Serial Peripheral Interface)

    Using USBASP :

    CONECTIONS : 
    MISO, MOSI, SCK, SS

    CODE :

    #define F_CPU 4000000UL


    char spiData = 0;
    SPCR = (1<<SPE);                   // Enable SPI

    while(!(SPSR & (1 << SPIF)));   // Wait for transmission end
    spiData = SPDR;                      // Read SPI Data Register - 1 byte

    ------------------------------------------------------------------------------------------------