Archive for November, 2014

BackupExec or Backup Exec VSS issue with Windows System Path

Wednesday, November 26th, 2014

 

Problem: V-79-10000-11226 – VSS Snapshot error. The Microsoft Volume Shadow Copy Service (VSS) snapshot technology selected returned: “Unexpected provider error”. Ensure that all provider services are enabled and can be started. Check the Windows Event Viewer for details.

The following volumes are dependent on resource: “C:” .

Analysis: Since this was a VSS writer issue on a Windows 2008 R2 server, the first thing I ran was “vssadmin list writers” to see what writers were failing. The failing writers were all Windows system writers like the WMI Writer. So I re-registered the writers running a batch script, but you can accomplish the same thing by restarting the server. (more…)

Linux, CentOS, Redhat G++ compiler and rand() / random function

Tuesday, November 18th, 2014

If you are using the G++ compiler in Linux, CentOS, or Redhat there are a couple of steps to adding a random number generator to any project.

  1. Include the precompile library: #include <stdlib.h>
  2. Use the function and add seeding: first_number = rand()%6 +1);

The basic function in C++ for the G++ compiler in Linux looks like this:

#include <iostream>

#include <stdlib.h>

int main()

{

int first_number = rand()%6 +1;

std::cout << first_number;

return (0);

}

Starting a console application in Microsoft Visual C++ 2010 Express

Tuesday, November 11th, 2014

Starting a Microsoft Visual C++ Studio Console Application

  1. Open Microsoft Visual C++ 2010 Express
  2. In the menu go to File – New – Project
  3. Click on Visual C++ and highlight Win32 Console Application
  4. Give the new project a name, default directory, and Solution Name
  5. Click OK and another GUI will pop-up
  6. On the Welcome to the Win32 Application Wizard click Next >
  7. On the Application Settings remove the check box from Precompiled Header and check Empty
  8. Click Finish
  9. When the new project opens right click on Source Files
  10. Go to AddNew Item…
  11. When the wizard opens highlight C++ File (.cpp) and give it the name of main.cpp
  12. Click Add
  13. Enter the following in the main.cpp file

          #include <iostream>

           int main()

{

               return 0;

}

Place your code after the first curly brace and before the return 0; to get started. Happy coding.

 

Windows 7 and 8 shutdown batch file to save electricity

Sunday, November 2nd, 2014

Hi Everyone,

If you are like me you work on your computer or use it to play games in the evening to alleviate stress. However, once you are finished using the computer you forget to turn if off. Now, for many this does not seem to be a problem but consider other aspects of leaving a computer running.

  1. Someone could gain access to a laptop webcam and see that no one is home or spy on people in the room.
  2. If you accidentally get a virus the PC which can turn it into a zombie or join it to a botnet. So while you are away your PC is working in the background.
  3. Some people just never turn the PC or laptop off because he or she feels the power saving options are sufficient.
  4. The amount that all the electronic devices are costing you per month in your electric bill.

Let’s examine the fourth possibility because it happened to me. My average electric bill when my kids were at home was $125 per month. When they left for college the electric bill dropped to $95 per month. When I deployed the shutdown script on my PC the electric bill dropped to $69 per month. Saving over $50 a month (you could save more) on your electric bill seems like a pretty good idea to me.

(more…)

Video for setting up LPD print services for Windows to share a printer on the network

Saturday, November 1st, 2014

Here is a nice video showing how to set up LPD print services in Windows so you can share a non-networkable printer on the network.

http://youtu.be/TmksGlGgz1Q