CyberKeeda In Social Media
Showing posts with label Windows. Show all posts
Showing posts with label Windows. Show all posts

AWK equivalent in Windows CMD




Missing AWK on Windows ?  for /f  may help you.
Lets see how can we implement the same.


Example.

C:\Users\Cyberkeeda>netsh interface show interface

Admin State    State          Type             Interface Name
-------------------------------------------------------------------------
Enabled        Connected      Dedicated        Wi-Fi
Enabled        Connected      Dedicated        VMware Network Adapter VMnet1
Enabled        Connected      Dedicated        VMware Network Adapter VMnet8
Enabled        Disconnected   Dedicated        Ethernet

Lets assume we have saved the same within a file in linux names as file.txt

Within Linux, to gather the State of interfaces, we use the below command.

cat file.txt| awk '{print $2}'

State
Connected
Connected
Connected
Disconnected

In Windows, it can be accomplished with FOR /F

C:\Users\cyberkeeda>for /f "tokens=2" %a in ('netsh interface show interface') do @echo %a

State
Connected
Connected
Connected
Disconnected

Now, if wish to add two values .

cat file.txt| awk '{print $1 " " $2}'

Admin State
-------------------------------------------------------------------------
Enabled Connected
Enabled Connected
Enabled Connected
Enabled Disconnected

Same can be accomplished within Windows as

C:\Users\cyberkeeda>for /f "tokens=1,2" %a in ('netsh interface show interface') do @echo %a %b
Admin State
-------------------------------------------------------------------------
Enabled Connected
Enabled Connected
Enabled Connected
Enabled Disconnected

In case, if you want to additional string along with the variable.

C:\Users\cyberkeeda>for /f "tokens=1,2" %a in ('netsh interface show interface') do @echo Boot Stats= %a Ethernet stat= %b


Now in case, if you want to use further filter within it, below one liner can help you.

C:\Users\cyberkeeda>netsh interface show interface | for /f "tokens=2" %a in ('findstr Wi-Fi') do @echo %a
Connected




Read more ...

Lotus Notes -: An error was encountered while opening a window




Problem:- An error was encountered while opening a window when opening Lotus Notes



Solution:-


Copy the user lotus id and database from lotus folder
  1. C:\Documents and Settings\user ID\Local Settings\Application Data\lotus\Notes\Data\desktop6.ndk
  2. C:\Documents and Settings\user ID \Application Data\lotus\Notes\userid.id
delete the other all files
When you run lotus then lotus creates all file again then replace the user id and database file C:\Documents and Settings\user ID\Local Settings\Application Data\lotus\Notes\Data\desktop6.ndk





Read more ...

Lotus Notes -: An error was encountered while opening a window




Problem:- An error was encountered while opening a window when opening Lotus Notes



Solution:-


Copy the user lotus id and database from lotus folder
  1. C:\Documents and Settings\user ID\Local Settings\Application Data\lotus\Notes\Data\desktop6.ndk
  2. C:\Documents and Settings\user ID \Application Data\lotus\Notes\userid.id
delete the other all files
When you run lotus then lotus creates all file again then replace the user id and database file C:\Documents and Settings\user ID\Local Settings\Application Data\lotus\Notes\Data\desktop6.ndk





Read more ...

Windows 7 - Screen Saver Time Out Issue




Problem:- Screen Saver Time Out Issue

Solution:-

For screen saver time out setting, Change the following registry key to 900 Sec

HKEY_CURRENT_USER - Control Panel - Desktop - For screen saver time out setting, Change the following registry key to 900 Sec

HKEY_CURRENT_USER - Control Panel - Desktop - ScreenSaveTimeOut - 900

HKEY_Users - .default\controlPanel - desktop - ScreenSaveTimeOut - 900
HKEY_Users - S-1-5-18\controlPanel - desktop - ScreenSaveTimeOut - 900
HKEY_Users - S-1-5-19\controlPanel - desktop - ScreenSaveTimeOut - 900
HKEY_Users - S-1-5-20\controlPanel - desktop - ScreenSaveTimeOut - 900
HKEY_Users - S-1-5-21\controlPanel - desktop - ScreenSaveTimeOut - 900
t - 900

HKEY_Users - .default\controlPanel - desktop - ScreenSaveTimeOut - 900
HKEY_Users - S-1-5-18\controlPanel - desktop - ScreenSaveTimeOut - 900
HKEY_Users - S-1-5-19\controlPanel - desktop - ScreenSaveTimeOut - 900
HKEY_Users - S-1-5-20\controlPanel - desktop - ScreenSaveTimeOut - 900
HKEY_Users - S-1-5-21\controlPanel - desktop - ScreenSaveTimeOut - 900


Read more ...

Windows 7 - Screen Saver Time Out Issue




Problem:- Screen Saver Time Out Issue

Solution:-

For screen saver time out setting, Change the following registry key to 900 Sec

HKEY_CURRENT_USER - Control Panel - Desktop - For screen saver time out setting, Change the following registry key to 900 Sec

HKEY_CURRENT_USER - Control Panel - Desktop - ScreenSaveTimeOut - 900

HKEY_Users - .default\controlPanel - desktop - ScreenSaveTimeOut - 900
HKEY_Users - S-1-5-18\controlPanel - desktop - ScreenSaveTimeOut - 900
HKEY_Users - S-1-5-19\controlPanel - desktop - ScreenSaveTimeOut - 900
HKEY_Users - S-1-5-20\controlPanel - desktop - ScreenSaveTimeOut - 900
HKEY_Users - S-1-5-21\controlPanel - desktop - ScreenSaveTimeOut - 900
t - 900

HKEY_Users - .default\controlPanel - desktop - ScreenSaveTimeOut - 900
HKEY_Users - S-1-5-18\controlPanel - desktop - ScreenSaveTimeOut - 900
HKEY_Users - S-1-5-19\controlPanel - desktop - ScreenSaveTimeOut - 900
HKEY_Users - S-1-5-20\controlPanel - desktop - ScreenSaveTimeOut - 900
HKEY_Users - S-1-5-21\controlPanel - desktop - ScreenSaveTimeOut - 900


Read more ...

Microsoft live Meeting could not be accepted



Problem:

Microsoft live Meeting could not be accepted

Solution

Microsoft recommends that you use the Clear Cache method. To do this, follow these steps:

  1. On the Tools menu, click Options, and then click the Other tab.
  2. Click Advanced Options.
  3. In the Advanced Options box, click Custom Forms.
  4. In the Custom Forms box, click Manage Forms.
  5. In the Forms Manager box, click Clear Cache.
Read more ...

Problem: MS Word is opening in Safe Mode only


Reason: Normal.dot file is corrupted

Steps:

  1. Close all applications
  2. Search for the file Normal.dot in user’s profile. (search hidden and system folder’s as well)
  3. Delete the Normal.dot files
  4. Reopen the word.


Read more ...

Fixed !!! Error: in PDF Creator, Cannot find gsdll32.dll. Please check the ghostscript-program directory (see options)!





Cause: In the printer settings, user has specified the directory that does not exist.

Steps:

  1. Once the error comes, click on Ok.
  2. Choose the first menu (Probably file) and choose options.
  3. Look for the options where we can set the directories.
  4. Give the path of C:\data\common
  5. Now give the print again for PDF.


Read more ...

How to fix problem - PDF Printer is offline







Problem: PDF Printer is offline

Steps:

  1. Uninstall the old version from Add Remove programs.
  2. Install PDF printer from SIM
  3. Give the following command

msiexec /fvamus {6C332A97-5F3C-419F-AD60-A01B227E4745} /qb! /Lv* c:\winnt\catpc\log\OF0200736-repair.log

4. Reboot the PC.

1. change the version of the file (rename the file and copy from some other machine)


c:\WINNT\system32\pdfcmnnt.dll

Read more ...

How to Uninstall or Remove an Application from Cmd (Command prompt)

Sometimes while trying to remove an application or programme from Control Panel fails even using Strong un-installer softwares like REVON UNINSTALLER also fails then in that circumstances try to remove the application through command prompt(CMD)

Follow these steps to Remove program using command Prompt 

  • Open a command prompt.
  • Input WMIC and press ENTER
          Now you will see a prompt like this            wmic:root\cli>        
  • Now type product get name and then press Enter .
  • Wait few seconds to minutes then
  •  It will Generate list of Installed Program . 
  • At the prompt, execute the following command:
        Product where name="Program name" call uninstall
  • For example, if I were wanting to uninstall Adobe Reader 9, my command would look like this 
          product where name="Adobe Reader 9" call uninstall                
  • When prompted, input y to confirm that you wish to uninstall the application and press Enter

        The application will be un-installed       




            

                                               
Read more ...

IHow to increase Folder View Size Limit to 8000 in windows xp

   
  • To use the Regedits:  
  • Save the REG File to your hard disk. 
  • Double click it and answer yes to the import prompt.
  •  REG files can be viewed in Notepad by right clicking on the file and selecting Edit.

Read more ...

Complete Index of the Windows command line

[image[3].png]
 Complete Index of the Windows command line

ADDUSERS Add or list users to/from a CSV file
ARP Address Resolution Protocol
ASSOC Change file extension associations•
ASSOCIAT One step file association
ATTRIB Change file attributes
b
BOOTCFG Edit Windows boot settings
BROWSTAT Get domain, browser and PDC info
c
CACLS Change file permissions
CALL Call one batch program from another•
CD Change Directory - move to a specific Folder•
CHANGE Change Terminal Server Session properties
CHKDSK Check Disk - check and repair disk problems
CHKNTFS Check the NTFS file system
CHOICE Accept keyboard input to a batch file
Read more ...
Designed By Jackuna