Skip to main content

Posts

Svchost process in task manager

Svchost.exe contains generic host processes. If the svchost.exe is accidentally close or intentionally close, then the system might crash or shutdown. There are times that svchost.exe does consume quite a lot of resources and eats up the memory on the system. Thus, it's quite tempting to close or kill the process. To kill or close a process forcefully via command line can be done using taskkill command plus the process id. Ex: Taskkill /pid 1234 How to know exactly which service or process the svchost is running? To check the pid and the process that svchost is running, type: tasklist /svc Tasklist /svc command will display the image name, pid and the services. Output example for tasklist /svc command: svchost.exe                   1172 EventSystem, fdPHost, FontCache, netprofm,                                    nsi, W32Time, Wd...

List completed cron jobs in Centos

Listing cron jobs or log files within a specific time frame is quite hard especially if the log or logs are quite a big file. But of course, doing the lazy way but a smarter way is always a good option. Use SED or stream editor. In Centos the log is in: /var/log/cron /var/log - path for the file  cron - is the file that keeps the record for cron jobs, there is no filename extension To check the logs within the 24 hours time, sed can do it easily and quickly. Here's one line, time saver command to check the cron log file: sed -n '/Mar 10 00:00:01/ , /Mar 11 00:01:01/p' /var/log/cron To redirect the output to a file: sed -n '/Apr 10 00:00:01/ , /Apr 11 00:01:01/p' /var/log/cron > cron24_hours.record.log You can replace /var/log/cron with any other files as long as it follows the time format of Month, Day of the month and the time in HR:MM:SS format. Download the free Linux Android App cheat sheet, see link below. It's free. Enjoy. ...

Outlook does not display picture

Have you received an email saying please find the picture below, but the picture is on the attachment not on the body of email. Or sending out a nice an beautiful layout of graphics hoping to impress a colleague or client only to find out that the the graphics doesn't display correctly in Outlook or either in the mobile phone. HTML Tables has been a big help for web designers or developers before the CSS era or other good platforms at this time. Well, if picture is not displaying properly in Outlook or mobile phone. Embedding or inserting the picture in a Table, seems to be a good quick solution in inserting pictures via Outlook and it will display properly in mobile phone also. When composing email in Outlook, click on the Insert option and click on insert table. If sending two pictures, you can insert a two rows or two columns and insert the picture on each row or column. After sending out the email, check the email in Outlook or mobile phone and if everything goes ok...

Domain Computer takes a long time to login

Login process should be quick and fast, so every user will be happy and start the day smoothly. But not every day is a new year’s day and there are times that things will just go south and some issues will surface. Enabling verbose login in local group policy will definitely help to troubleshoot which part of the login process the system halts and takes a long time to process. Folder redirection for some reason will cause an issue that will take time to load the desktop or causes a login issue. There are quite a lot of reasons why a GPO takes time to process, and causes login issue. But if a computer or workstation has been working fine and all of a sudden gives a logon issue; no changes has been made on the server or GPO. Then an issue could occur at the workstation or client side. One solution that might work on this kind of scenario is to open an elevated command prompt and issue this command on the problematic user computer: Netsh winsock reset ...

PowerShell copy file, link or folder to users’ desktop

Deploying a shortcut link, file or folders can easily be done via group policy preferences. Or it can also be done using PowerShell as logon or start up script. A one liner code snippet to deploy a file, a shortcut links or a folder to user’s desktop. Copy a file: copy-item "\\shared_folder\files_2be_copied.txt" "c:\users\public\desktop" Copy a shortcut link to user desktop: copy-item "\\shared_folder\shortcut_file_2be_copied.lnk" "c:\users\public\desktop" If a link or shortcut which is a network path, just need to ensure that the permissions is set correctly or else the link will be deployed but still unable to access due to permission issue.   Copy a folder: copy-item "\\shared_folder\folder_2be_copied" "c:\users\public\desktop" -Container -Recurse Above command will copy the whole folder to the user's computer, if space is an issue then a shortcut to the folder would be desirable. ...

PowerShell move matching files in a folder

Requires PS 3.0 This is a two lines code snippet to move matching files in a source folder to another folder. #============================== $SourceFolder = "C:\File_monitor_records\" # Find all files matching *.csv in the folder specified  # Find csv files with 2016 in its filename Get-ChildItem -Path $SourceFolder -Filter *2016*.csv | move-item  -destination C:\File_monitor_archives\2016\ #============================== -Filter *2016*.csv –adjust or create your own pattern, use regex if necessary Test the pattern before moving the files to make sure correct files are being moved. Check and double check, to avoid wasting time and effort. This will just like matching files. Get-ChildItem -Path $SourceFolder -Filter *2016*.csv Move files and change file name: http://quickbytesstuff.blogspot.sg/2015/06/powershell-move-files-and-change-file.html ================================ Free Android Apps: C...

Windows audio disabled and wireless icon showing disconnected

In Windows 7 I encountered an issue showing that “Windows Audio is disabled”, I had checked the device manager audio devices was working fine. I checked the Windows Audio Volume Control, the default speaker is enabled. I checked the “Audio disabled devices”, there was a device that was disabled but cannot enable. I tried restarting Windows Audio Service but it just doesn’t help. I did some Googling and one of the results points to Microsoft Online Answers Community and one respondent suggested the commands below: Run commands below at an elevated mode or Administrator mode. net localgroup Administrators /add networkservice press enter then type: net localgroup Administrators /add localservice press enter and restart your computer Link to the original article: https://answers.microsoft.com/en-us/windows/forum/windows_7-pictures/audio-device-is-disabled/3d49e32d-6c1c-44c8-a7b3-52166a0233b0 After restarting the computer, the audio was working already. Aside f...

VB.Net remove line feed or new line

In VB.net or any programming language, if the program requires getting data from external programs, results or data from third party software that needs to be processed  may or may not have expected desired output. For example, getting a string from a third party software. String is quite straight forward and it's quite basic. But the issue arises,  if the desired output requires a specific string or text and other text should be discarded or deleted. Regex or any other methods might help on getting the specific text or data. One basic issue, if the string needs to be formatted in one line but a line feed or a new line keeps breaking the line. The first instinct that I think of, is to use "Trim" function but it doesn't solve the issue. Trim, Ltrim or Rtrim just delete spaces but it doesn't delete line feed. In VB.Net a line feed can easily be removed by this code snippet below: Dim strNoLineFeed As String = String_with_Line_Feed.Replace(vbCr, "...