Showing posts with label PC tips and tricks. Show all posts
Showing posts with label PC tips and tricks. Show all posts

Tuesday, November 20, 2012

Failed to Load PDF document on Chrome

If you have faced the issue of loading PDF files on Chrome "Failed to Load PDF document" then you can try below solution:

1. Type on chrome address bar : chrome://plugins/
2. Search for PDF using Ctrl+F
3. You will find "Chrome PDF Viewer" and "Adobe PDF Plug-In" .
4. Just disable Chrome PDF Viewer. and restart browser.

Tuesday, November 6, 2012

AT Commands

Here are few of very common AT commands listed down for use:
AT: to check weather AT commands are working proper.

Call Control:
ATA: answer the Call.
ATD: Dial a call

AT+CGDCONT? : To know APN profiles on phone
AT+CGDCONT=<cmd>, <n>
                                cmd : 1/0 (Activate/Deactivate)
                                 n: number of profile index

Basic Information of Mobile:
AT+CGMI: Name of manufacturer
AT+CGMM: Model number
AT+CGSN: To get IMEI
AT+CGMR: To get software version

Basic information of Subscriber:
AT+CNUM: To get MSISDN
AT+CIMI: To get IMSI

Current Status Of phone:
AT+CREG? : Query
AT+CBC: Current battery charging query
AT+COPS? : Query for current operation state( like operator)

Security Related:
AT+CLCK: Facility locks opening or locking
AT+CPWD: To change password
AT+CPIN? : To check SIM Status

if you want ot know more in detail about AT command please leave a comment.

Sunday, August 7, 2011

Removing Autorun Newfoder.exe virus from your system



To remove this virus please follow the below steps:
  1. Search for autorun.inf file in your computer. If it's in read only mode, then change it by right clicking on it and then in properties uncheck the "Read Only" option.
  2. Now open it in notepad and delete all data in it and save it.
  3. Don't forget to change the status to "Read only" mode , so that virus can't modify it again.
  4. Click on Start -> Run -> gpedit.msc.
  5. User configuration -> Administrative template -> system -> Turn off autoplay -> Enable ( For all drives) refer to this link for more detail.
  6. Start-> Run->msconfig
  7. Startup tab & services -> search regsvr.exe and un-check all and click OK.
  8. select exit without restart.
  9. Control panel -> Scheduled tasks -> delete the Atl task, if listed there.
  10. Start -> run -> regedit
  11. Edit ->find -> search for regsvr.exe. Delete all regsvr.exe occurrences.
  12. Don't delete Explorer.exe if regsvr.exe appears with it. Delete only regsvr.exe.
  13. Goto [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon] and modify value in Shell = Explorer.exe regsvr.exe and delete regsvr.exe from here.
  14. Now search for all occurrences of regsvr.exe in your system and delete them.
  15. Search for "svchost .exe" ( remember space between svchost & .exe) and delete all occurrences.
  16. Also search for "*.exe" and remove all virus affected files, don't remove any legitimate file( any installer file).
  17. Restart the system and enjoy..

For more detail on handling autorun.inf file, if you have option set for "don't show hidden files" and you are not able to see autorun.inf file then use following link for removing autorun.inf file.

Some more links you may be interested in:

Disabling Autorun/Autoplay using Registry editor


To get rid off virus affecting your system because of autoplay of drives please use below steps:
1. Type regedit on run prompt.
2. Navigate to below location:
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer]
3. you will find a key value as "NoDriveTypeAutoRun" , which is one byte value.
4. Please set the value of key as "95" Hex value to disable autorun on removable media and Network drives.

Regedit
5. Be very careful while modifying reg values. Below table will explain you to understand the meaning of bits to set for disabling any type of media.

Value              Meaning
0x1/0x80   Disables AutoRun on drives of unknown type
0x4            Disables AutoRun on removable drives
0x8            Disables AutoRun on fixed drives
0x10          Disables AutoRun on network drives
0x20          Disables AutoRun on CD-ROM drives
0x40          Disables AutoRun on RAM disks
0xFF         Disables AutoRun on all kinds of drives


If any of the bit is set into this hex valye, that type of drive will be disabled for autorun.
Bit    Type of Drive
0/7    UNKNOWN

1       NO ROOT DIR
2       REMOVABLE
3       FIXED
4       REMOTE
5       CDROM
6       RAMDISK

For setting values you must always add 0x80 to the value of drive you want to set for.
A few examples for setting values:
for removable drives: 0x80 + 0x04 = 0x84 ( Hexadecimal addition)
for removable & fixed drives : 0x80 + 0x04 + 0x08 = 0x8C
for removable + fixed drives +CD ROM = 0x80 + 0x04 + 0x08 +0x20 = 0xAC(1010 1100)


For changing Autorun option using Group policy please refer to following links:

Disabling autoplay option in Windows XP using Group Policy
turning-off-autoplay-on-all-drives


Disabling autoplay option in Windows XP using Group Policy

Use following option to disable autoplay in ur system:
1. type gpedit.msc in run window and enter.
2. then goto Computer configuration->Administrative template -> System 




3. Then in right side u will find Turn off autoplay 





4. Double click on that and check "enabled" and select for "all drives"




5. Now click on apply and OK.
6. Similarly follow above steps step 3 to step 5 for 
    User configuration ->Administrative template -> System 


7. This setting for "User Configuration" is must. 


Steps for Advanced Users / System Admins:
if you want to Modify using registry edit then please goto this link.
Disabling Autoplay_Autorun using Registry editor for Advanced Users


Now when you insert any pendrive or any other media it will not be played automatically and you will be safe from Viruses.



Wednesday, March 30, 2011

Cygwin Installation

Cygwin is

  • a collection of tools which provide Linux kind of environment for windows.
  • a DLL which provides substantial Linux API functionality. 

This can be downloaded and installed from Cygwin website. Click Here to download.

While you are installing it will ask for package downloading, which you can download from internet or if you already have downloaded then you can give the local path. Now it will ask for packages to be installed. Just select the packages for installation.

For more information refer to this site.

It provides many linux tools like ls 

CACLS command for windows changing mode permission


It is a command line utility which displays and modify Access Control Lists (ACLs) in windows environment(Microsoft windows NT) of files and folders. An Access Control List is a list of permissions for securable object, such as a file or folder, that controls who can access it.
 
XCACLS.exe : It's a updated version for cacls for windows 2000 and later.
 
CACLS filename [/T] [/E] [/C] [/G user:perm] [/P user:perm [...]] [/D user [...]]
 
Options:
filename: Name of the file to be modify ( * wildcard for all files )
/T            Changes ACLs of specified files in the current directory and all subdirectories.
/E            Edit ACL instead of replacing it.
/C            Continue on access denied errors.
/G user:perm  Grant specified user access rights.
/P user:perm  Replace specified user's access rights.
/D user       Deny specified user access.--
 
Perm can be:
N  None
R  Read
W  Write
C  Change (write)
F  Full control
 
Examples:
1: to replace ACL with Full access permission to current directory and all subdirectories for user "test"
>cacls * /T /P test:F
2. To edit ACL for particular user "test" with Change access for abc.text file without changing other permission.
> cacls abc.text /E test:C
 
Also look for chmod a linux command for changing file permissions.
 

Tuesday, March 8, 2011

Sending AT commands using microsoft hyperTerminal

MS Hyperterminal is a small program which can be used for sending AT commands to ur GSM/3G phone connected as modem to ur PC. For linux users minicom can be used as HyperTerminal.
for getting hyper terminal in windows Vista and 7 use this link
Hyperterminal can be found in start->programs->accessories->communications->Hyperterminal

You should first check ur device whether it's connected properly, and working fine or not.

Now you should set up ur device as modem. In Hyper terminal you can start a new connection and select the com port where your device is appearing (check in device manager).

Now you can send the AT commands to ur device.

Now you should Type "AT" in the main window.
A response "OK" should be returned from the modem.
Now type "AT+CPIN?" in the main window.
The AT command "AT+CPIN?" is used to query whether the modem is waiting for a PIN ( i.e. password). If the response is "+CPIN: READY", it means the SIM card doesn't require a PIN and its ready for use.
else you can set the PIN using "AT+CPIN=<pin>"



Alternatives for Hyper Terminal in windows vista and Windows7

for getting hyper terminal in windows Vista and 7 use this link or you can use following options:

> windows remote shell (WinRS)
> use phone and modem options if you are using Hyperterminal for modem connections (AT Command).
> Can use Putty also. Download putty.exe

For getting more info on WinRS type "winrs /?" in your command prompt.

Friday, July 30, 2010

Replacing ^M character at end of line using VI editor ( ^H, ^G and so on..)

Some time these characters are placed when you convert file from DOS format to Linux format. These characters can be viewed only with Vi editor or either typing "cat -v" command for that file in command prompt. These characters are called control characters.

These characters can be deleted using ":%s/.$//g" command from VI prompt.
To replace character use it like ":%s/.$/replace/g" Press Ctrl Q+M, and this will character will come up. In some other format it can be typed using ctrl V+M.

But before doing all this do ":set ff=dos", to change file format to DOS.

At last a simple trick for Gvim on Windows XP:
:%s/\r/\r/g
This replaces unix carriage return by windows CRLF.

following is the list of Ctrl characters:

Hex Name
0x00 NUL
0x01 SOH, Control-A
0x02 STX, Control-B
0x03 ETX, Control-C
0x04 EOT, Control-D
0x05 ENQ, Control-E
0x06 ACK, Control-F
0x07 BEL, Control-G
0x08 BS, backspace, Control-H
0x09 HT, tab, Control-I
0x0a LF, line feed, newline, Control-J
0x0b VT, Control-K
0x0c FF, form feed, NP, Control-L
0x0d CR, carriage return, Control-M
0x0e SO, Control-N
0x0f SI, Control-O
0x10 DLE, Control-P
0x11 DC1, XON, Control-Q
0x12 DC2, Control-R
0x13 DC3, XOFF, Control-S
0x14 DC4, Control-T
0x15 NAK, Control-U
0x16 SYN, Control-V
0x17 ETB, Control-W
0x18 CAN, Control-X
0x19 EM, Control-Y
0x1a SUB, Control-Z

Saturday, July 10, 2010

Get more detailed Info on your computer

Hi,
I know you want to know details about your computer's directx componets and their drivers are installed, and what they are using. this tool lets you diagnose problems and change your system settings to best. So to check more detailed info on your computer, which is not even available on My computer->Properties section, Follow the steps:
1. Open RUN Prompt.
2. type dxdiag and enter
3. Make sure you have original version version of XP because it will propmt for that.
4. Once it opens up it will show information on : System, DirectsX Files, Music, Display, Sound, Input devices etc..
5. To save this info click on "Save all information" and select the location. Information will be saved in form of .txt file.

Creating folder wothout any name

you will be wondering, how to create a folder without any name.. Have you ever tried it?? If no then try it now..

Here is the solution for this..
1. Create a folder in any directory.
2. Right click on folder and select "Rename folder" or press F2
3. Now press Alt and Type 255(ALT+255) or ALT+0160
4. Now it's done.

Monday, June 28, 2010

Turning OFF Autoplay on All Drives using Group Policy

To disable Auto play of External Drives or Internal Drives or removable Disks please follow steps below mentioned. It's actually useful to disable Auto Play so that you will not get affected by any kind of virus which gets transfered via PenDrives or external drives. Also will avoid attack of autorun.inf virus.

  • Click on Start and open run.
  • Now type gpedit.msc, and Enter.
  • Now go to "User Configuration" -> "Administrative templates" -> "System" -> "Turn Off Autoplay"
  • Now select Enable and Select "turnoff autoplay on 'All Drives' ".
  • Select OK and Now you are Done!! 
Check This Link for details on how to remove autorun.inf virus

    Monday, June 14, 2010

    Restoring mozilla's bookmarks

    Firefox 3 no longer uses bookmarks.html to store the bookmarks. It stores the bookmarks and the browser history in places.sqlite and no longer creates a HTML backup by default instead there are also JSON backups in the bookmarkbackups folder within the Firefox profile folder.
    Check for backups in following path : 
    C:\Documents and Settings\<User Name>\Application Data\Mozilla\Firefox\Profiles\<some  folder>\bookmarkbackups


    See Lost_Bookmarks (MozillaZine KB)
    You can export the bookmarks in Firefox to a HTML file: Bookmarks > Organize Bookmarks > Import & Backup > Export HTML
    You can also create a JSON backup: Bookmarks > Organize Bookmarks > Import & Backup > Backup

    If migrating to new account , then just copy the latest JSON file to new account's bookmarkbackup folder and restore it in mozilla.
    You should restore a JSON backup: Bookmarks > Organize Bookmarks > Import & Backup > Restore-> Choose file
     Restoring a JSON backup will replace all existing bookmarks. You can merge bookmarks if you import a HTML backup.

    A HTML backup doesn't support tags and annotations, so if you want to preserve those then you need to use a JSON backup.

    Tuesday, May 11, 2010

    Enabling Task Managaer disabled by Virus

    Method 1:
    > Open Run window and type gpedit.msc and click ENTER.
    > Now Goto location: User Configurations/Administrative Templates/System/Ctrl+Alt+Del Options

    > Double click on Remove Task Manager on right side Pane. And select the value as "Not Configured" as follow.

    Method 2:
    > start "RUN" Window and type regedit and Enter
    > GoTo this registry index: HKEY_CURRENT_USER \ Software \ Microsoft \ Windows \ CurrentVersion \ Policies\ System
    > In the right pane, find and delete the value named as DisableTaskMgr 
    > Close  Registry Editor

    Wednesday, February 24, 2010

    Commands for Command prompt

    Type following commands on command window to perform the required task.
    By typing "help" on command prompt you can get commands for most common tasks e.g. cd, dir, del, exit, copy etc.
    Here I will write down some uncommon commands which will be helpful when working on windows XP using command prompt.

    • hostname: Gives hostname of the machine you are using
    • attrib : Shows or updates Attributes of a file, -h removes hidden attrib from file, while +h adds hidden attrib
    • cacls : Changes the ACLS (security settings) for files and folders, similar to chmod in linux
    • control : Unpublished, use "control userpasswords2"findstr: To find strings, similar to grep in linux
    • gpresult : gets the summary of group policy settings and user settings
    • ipconfig : Shows IP Configuration for your system, use "ipconfig -all " for all settings, "ipconfig /release" for releasing Ip Addresses, "ipconfig /renew" for renewing IP address
    • openfiles : Enables administrator to display a list of open files and folders that have been opened 
    •  reg : A console registry tool to edit registry settings
    • systeminfo : displays system information
    • tasklist: list of all running tasks
    • taskkill: to kill running task
    • taskmgr: To open Task manager from command window
    • tree : Really amazing utility, gives the list of files and folders in tree form , should try at least once.
    • shutdown: Will show help for shutting down the windows XP. This will be helpful when you want to shutdown or restart remote computer.
                 shutdown -s : shutdown this computer
                 shutdown -r : Restart this computer
                 shutdown -m \\computername : Remote computer to shutdown/restart/logoff
                 shutdown -i : GUI interface for shutdown

    Check this lonk for more detailed info and all other available commands:
    Microsoft windows command line tools

    Monday, February 15, 2010

    Opening .hxt/.hxc type of help files available with platform SDK's from MSDN

    These type of files which are made available under help folder and are in Microsoft Help 2.0 format can be opened with "dexplore.exe" viewer. This utility is available at "C:\Program Files\Common Files\Microsoft Shared\Help 9". You can open files by typing the following at a command prompt, or associating it with a
    desktop shortcut:

    <path>\dexplore.exe /helpcol ms-help://<namespace>

    where <namespace> is the name under which the help file has been registered on your system. For example:

    "C:\Program Files\Common Files\Microsoft Shared\Help\dexplore.exe"
    /helpcol ms-help://MS.xxxxx.xx


    You can use either Dave Liske's custom Help 2.0 viewer (http://www.mvps.org/htmlhelpcenter/mshelp2/h2view.html) or Rob Chandler's FAR utility (http://helpware.net/FAR/index.html). These both let you display a list of the registered namespaces and choose the one to initialise. FAR Utility will also work for windows vista while h2view will not work. These utilities are replacement for dexplore.exe and will be simple to use.

    So by using correct name space and  creating shortcut you can read the help files.
    Even if you want you can use Help 2.0 viewer for viewing your help files as per your namespace.
    "File->Open Namespace" Then select namespace and initialise.


    If you want to create a shortcut just do right mouse click and say create shortcut. Then give the path or above mentioned command ( ""C:\Program Files\Common Files\Microsoft Shared\Help 9\dexplore.exe" /helpcol ms-help://MS.MSDNQTR.v90.en" ) and give the name for shortcut and you are done.

    Monday, February 8, 2010

    Environmental Variables

    Environment variables are a set of dynamic named values that can affect the way running processes will behave on a computer. these have been used for long in operating systems and are present in Unix, DOS and Windows environment.

    Microsoft's definitions:

    Environment variables are strings that contain information such as drive, path, or file name. They control the behavior of various programs. For example, the TEMP environment variable specifies the location in which programs place temporary files.

     Examples of environment variables include:
    • PATH - lists directories the shell searches, for the commands the user may type without having to provide the full path.
    • HOME (Unix-like) and userprofile (Microsoft Windows) - indicate where a user's home directory is located in the file system.
    Shell scripts and batch files use environment variables to communicate data and preferences to child processes. They can also be used to store temporary values for reference later in the script, although in Unix other variables are usually used for this.

    Examples of DOS Env Variables:
    %ERRORLEVEL% : This variable points to the current error level. If there was an error in the previous command, this is what you need to check against to find out about that.
    %PATH% : This variable contains a semicolon-delimited list of directories in which the command interpreter will search for executable files. Equivalent to the Unix $PATH variable (although note that PATH on Windows additionally performs the same task as LD_LIBRARY_PATH on Unix-like systems). Note that %PATH% can also be set like this PATH=c:\dos; where SET isn't required.
    %TEMP% and %TMP% : These variables contain the path to the directory where temporary files should be stored.
    Examples of UNIX ENV Variables:
    $PATH : Contains a colon-separated list of directories that the shell searches for commands that do not contain a slash in their name (commands with slashes are interpreted as file names to execute, and the shell attempts to execute the files directly).
    $HOME : Contains the location of the user's home directory. Although the current user's home directory can also be found out through the C functions getpwuid and getuid, $HOME is often used for convenience in various shell scripts (and other contexts). Using the environment variable also gives the user the possibility to point to an other directory.
    $PWD : This variable points to the current directory. Equivalent to the output of the command pwd when called without arguments.
    $TZ : Refers to Time zone. It can be in several formats, either specifying the timezone itself or referencing a file (in /usr/share/zoneinfo).
    Example from Microsoft Windows: Case Insensitive
    %CD% : This variable points to the current directory. Equivalent to the output of the command cd when called without arguments.
    %DATE% : This variable expands to the current date. The date is displayed according to the current user's date format preferences. For more info on how to set date variable refer %DATE%
     
    %RANDOM% : This variable returns a random number between 0 and 32767
    %TIME% : This variable points to the current time. The time is displayed according to the current user's time format preferences.
     
    Reference: 
    Default values of Environment Variable on Microsoft windows
    Further Related Study:
    List of UNIX Utilities
     

    Wednesday, February 3, 2010

    Using Remote desktop from command line

    Remote desktop allows you to configure and connect to another computer running Windows XP Pro.
    Host machine must also have the Remote Desktop Connection client software installed. The  remote computer which is known as the client and Host both should be part of a corporate network in which Remote Desktop connections are permitted.

    The Windows XP remote desktop connection dialog box provides you with everything that you need to configure and connect to another computer running Windows XP Pro. You can use the Save As button on the Connection Settings panel to save all your connection settings as an RDP file. Then, you can launch and connect to a remote computer simply by double-clicking the RDP file.


    You can also script a remote desktop connection, as Windows XP's remote desktop connection has an executable file that can accept command line parameters and be run from a batch file. The remote desktop connection executable file is MSTSC.EXE, and the following are some of the most common parameters:

    /v:<computername>--specifies the name of the computer to connect to.

    /f--starts the connection in a full screen.

    /w:<width>--specifies the width of the remote desktop screen.

    /h:<height>--specifies the height of the remote desktop screen.

    For example, to remotely connect to a computer named System in a 640 x 480 remote desktop screen, you would use the following command:

    mstsc /v: System /w:640 /h:480

    You can type this command line in the Run dialog box, as well as use it in a batch file.

    Ref:
    WindowsXP: Using mobility
    Remote desktop FAQ

    Tuesday, January 19, 2010

    If new command missing in Context menu

    When you click the File menu in Windows Explorer or When you right-click the desktop, the New command may be missing from the context menu, or it may not be showing proper items then do following. But be careful that you don't end up changing key value incorrectly.

    To resolve this issue, use Registry Editor to verify that the registry key listed below has the value listed, and if needed, edit the value to match the value listed.

    Registry key:
    HKEY_CLASSES_ROOT\Directory\Background\shellex\ContextMenuHandlers\New\ (Default)
    Value for (Default):
    {D969A300-E7FF-11d0-A93B-00A0C90F2719} 
    If registry entry doesn't appear then add the registry entry and (Default) value.