Monthly Archives: September 2012

Disabling User Account Control Setting (UAC) in Windows 7

Disabling User Account Control Setting (UAC) in Windows 7

Windows UAC

User Account Control is a setting introduced by Microsoft to reduce the security threat caused by automatic unaware installations in Windows system. On normal condition the user that are part of Administrators group will be acting as a normal use with less privilege and if the Admin user requires higher privilege then Windows will prompt to take the control.

On certain conditions, we need to disable the user Account Control Settings in Windows, example while building a new system multiple software’s needs to installed on such occasions better to disable the UAC.

Reducing the security is not good, but all depends on the circumstances.

Disabling to User Account Control Settings

Scenario 1

1. Go to Window start -> Run and type the command “msconfig”.

2. Select Tools tab

Change UAC Settings techiesweb.com

3. Select “Change User Account Control Settings” and click Launch.

4. Change the User Account Settings to Never notify.

User Account Control Settings techieswebcom

Scenario 2

1. Go to Windows Start Menu -> Control Panel -> User Accounts, as displayed in the below attached image.

Change User Account Control Settings techiesweb.com

2. Select User Account Control Settings and change it to never notify.

User Account Control Settings techieswebcom

Cheers!!

Melbin Mathew

www.techiesweb.com

Restart or Shut Down a Windows Remote Computer and Document the Event

Restart or Shut Down a Windows Remote Computer and Document the Event

clip_image002

As a System Administrator I used to perform restart or shutdown of Windows remote computers. This restart and shutdown procedure applies to most of the Windows operating systems, including Windows 2008, Windows7

A) Remote Desktop Access – RDP

Access the remote system using Windows Remote Desktop Connection and then directly restart or shutdown the machine.

B) Computer Management can be used to reboot or shutdown the remote computer.

1) Open Computer Management from the local machine, using compmgmt.msc command from Windows RUN

Go to Windows Start, Click All programs, Click Accessories, Click Run, Type compmgmt.msc and Click OK

clip_image004

2) In the console, right-click Computer Management (Local), and then click Connect to another computer, type the name or IP address of the remote computer that you want to restart or shut down, and then click OK

clip_image006

3) Right-click Computer Management (Remote computer name), and then click Properties. Navigate to Advanced tab, click Startup and Recovery, then click Shutdown to open the Action Windows from there choose the desired to option to reboot or shutdown the remote computer.

C) Use Shutdown.exe /i command to restart or shutdown a remote machine.

1) Go to Windows Start, Click All programs, Click Accessories and Click Command Prompt

2) Type shutdown.exe /i in the Command Prompt to open Remote Shutdown Dialog

clip_image008

3) Click Add and enter the IP address or name of the remote computer, which we need to restart or shutdown

4) Describe the event in Shutdown Event Tracker and Click OK, the log for the reboot or shutdown of the remote machine can found in its system Event viewer.

Note:

Remote Registry services need to enable in the remote computer for the successful logging of Events for the reboot or shutdown of the remote system.

1) On the computer, Go to Windows Start, Click All programs, Click Accessories, Click Run and type services.msc

2) Choose Remote Registry service and Start

Also refer my 2 posts about,

A) Describes more about Shutdown.exe command usage and it’s parameters to restart or shutdown a computer.

B) Methods to overcome the Access denied error while attempting to reboot or shutdown the remote computer. — Link to Open The Post

 

Cheers!!

Melbin Mathew

www.techiesweb.com

Shutdown.exe is a Powerful Utility in Windows to Restart or Shutdown a Machine

Shutdown.exe is a Powerful Utility in Windows to Restart or Shutdown a Machine

Shutdown.exe is a Microsoft powerful utility that is available in Windows operating systems to manage the system reboot and shutdown procedures. This Shutdown.exe can also be used to manage the restart and shutdown of the remote machines.

The Shutdown.exe tool can be found inside the system32 Windows folder, and this exact location is “C:\Windows\System32\shutdown.exe”. Shutdown.exe can be executable from Windows CMD and Windows RUN to perform a restart or shutdown of remote or local machine.

Attached screenshots shows an example to force reboot a machine with time period of 30 Seconds.

Command: Shutdown.exe –r –f –t 30 (were r – reboot, -f –force, -t – time in seconds)

shutdown.exe techiesweb.com

run shutdown.exe techiesweb.com

The Shutdown.exe tool syntax and this usage are described below,

Usage: shutdown.exe [/i | /l | /s | /r | /g | /a | /p | /h | /e] [/f]
[/m \\computer][/t xxx][/d [p|u:]xx:yy [/c "comment"]]

No args    Display help. This is the same as typing /?.
/?         Display help. This is the same as not typing any options.
/i         Display the graphical user interface (GUI).
This must be the first option.
/l         Log off. This cannot be used with /m or /d options.
/s         Shutdown the computer.
/r         Shutdown and restart the computer.
/g         Shutdown and restart the computer. After the system is
rebooted, restart any registered applications.
/a         Abort a system shutdown.
This can only be used during the time-out period.
/p         Turn off the local computer with no time-out or warning.
Can be used with /d and /f options.
/h         Hibernate the local computer.
Can be used with the /f option.
/e         Document the reason for an unexpected shutdown of a computer.
/m         \\computer Specify the target computer.
/t xxx     Set the time-out period before shutdown to xxx seconds.
The valid range is 0-315360000 (10 years), with a default of 30.
If the timeout period is greater than 0, the /f parameter is implied.
/c        "comment" Comment on the reason for the restart or shutdown.
Maximum of 512 characters allowed.
/f        Force running applications to close without forewarning users.
The /f parameter is implied when a value greater than 0 is specified for 
the /t parameter.
/d [p|u:]xx:yy  Provide the reason for the restart or shutdown.
                p indicates that the restart or shutdown is planned.
                u indicates that the reason is user defined.
                If neither p nor u is specified the restart or 
                shutdown is unplanned.
xx is the major reason number (positive integer less than 256).
yy is the minor reason number (positive integer less than 65536).

Reasons on this computer:
(E = Expected U = Unexpected P = planned, C = customer defined)
Type    Major    Minor    Title

U      0    0    Other (Unplanned)
E       0    0    Other (Unplanned)
E P     0    0    Other (Planned)
U      0    5    Other Failure: System Unresponsive
E       1    1    Hardware: Maintenance (Unplanned)
E P     1    1    Hardware: Maintenance (Planned)
E       1    2    Hardware: Installation (Unplanned)
E P     1    2    Hardware: Installation (Planned)
E       2    2    Operating System: Recovery (Planned)
E P     2    2    Operating System: Recovery (Planned)
P     2    3    Operating System: Upgrade (Planned)
E       2    4    Operating System: Reconfiguration (Unplanned)
E P     2    4    Operating System: Reconfiguration (Planned)
P     2    16    Operating System: Service pack (Planned)
2    17    Operating System: Hot fix (Unplanned)
P     2    17    Operating System: Hot fix (Planned)
2    18    Operating System: Security fix (Unplanned)
P     2    18    Operating System: Security fix (Planned)
E       4    1    Application: Maintenance (Unplanned)
E P     4    1    Application: Maintenance (Planned)
E P     4    2    Application: Installation (Planned)
E       4    5    Application: Unresponsive
E       4    6    Application: Unstable
U      5    15    System Failure: Stop error
U      5    19    Security issue
E       5    19    Security issue
E P     5    19    Security issue
E       5    20    Loss of network connectivity (Unplanned)
U      6    11    Power Failure: Cord Unplugged
U      6    12    Power Failure: Environment
P     7    0    Legacy API shutdown

Cheers!!
Melbin Mathew

www.techiesweb.com

Looking for a Funny VB Script to Eject CDROM

Looking for a Funny VB Script to Eject CDROM

To have a little fun with my Colleagues I searched for a VB script to eject the CDROM and here it is,

Set oWMP = CreateObject(“WMPlayer.OCX.7″)

Set colCDROMs = oWMP.cdromCollection

If colCDROMs.Count >= 1 Then

For i = 0 To colCDROMs.Count – 1

colCDROMs.Item(i).Eject

Next ‘ cdrom

End If

Copy the code to a text editor and save it as EjectCDrom.vbs. The system Antivirus program detected the funny VB and categories is as JOKE to block it :)

Cheers!!

Melbin Mathew

www.techiesweb.com

RemoteApp Disconnected or Remote Desktop Connection Disconnected

RemoteApp Disconnected or Remote Desktop Connection Disconnected

The common way to manage Windows system is to access it using Microsoft remote desktop/App connection utility. But if we are unable to establish remote desktop connection to a Windows remote computer, we will receive an error message saying “RemoteApp Disconnected”. The common reasons for this failure are,

RemoteApp Disconnected techiesweb.com

1) Remote desktop/App connection access to the machine was not enabled.

Resolution: Go to -> My computer -> Right Click Properties -> Remote -> Enable the remote access.

Enable remote desktop connection techiesweb.com

By default users granted with Administrator privilege can access the system, any other members other than the Administrator need to be added to the “Selected Users” and “Remote desktop users” Windows group.

The remote desktop users group can be accessible from My Computer -> Right click -> Manage -> Group -> Remote desktop users

2) Be sure that the remote system is powered on; otherwise the RemoteApp Disconnected failure will occurs.

3) Sometime if the system is running with heavy load or experiencing hang state then the same RemoteApp Disconnected occurs.

4) The remote computer is not available on the network. Test the causes that result in the RemoteApp Disconnected error.

Steps

Open Windows command prompt and perform the following tests.

A) Ping <ip address of the destination computer> eg: ping 10.10.10.10 (If we receive a timeout or reply failure error, there would be two possibilities.

The target computer is not reachable through network or disconnected from the network.

The ICMP protocol is blocked in the target computer. Large public production servers are always blocked to respond to ICMP protocol to avoid DOS attacks.

B) Ping <fully qualified name> eg:ping host1.X.com (This test ensure proper name resolution is working). Sometime the system name will not resolve correctly causing RemoteApp Disconnected failures.

C) Nslookup <fully qualified name> : eg:nslookup host1.X.com (Testing the name resolution of the target server)

D) Telnet <ip address> 3389 eg: telnet 10.10.10.10 3389 (Test ensure whether the target remote system’s remote desktop connection port is in opened state). If the test fail’s then we need to check the system internal and router firewall configurations and ensure that there is a proper Inbound/Outbound traffics are enabled to the particular port 3389.

 

Cheers!!

Melbin Mathew

www.techiesweb.com

VMware VM Error There is no disk in the drive

VMware There is no disk in the drive. Please insert a disk into drive \DeviceHarddisk1\DR3

A colleague reported that his VMware workstation virtual machine failed to power on with the error “there is not disk in the drive. Please insert a disk into drive \DeviceHarddisk1\DR3”.

All the attempts to power on the virtual machine failed. At last we did a Windows file search and located the favorites.vmls” file which then moved from its original location to a temporary backup folder and remove from the original location.

vmware no disk in drive techiesweb.com

Steps that were performed

1) Windows search find the problematic file favorites.vmls” inside C:\Users\MMathew\AppData\Roaming\VMware

2) Copied it to a backup folder and deleted it from the original location.

3) Powered ON the VMware virtual machine.

This time we were able to start the virtual machine.

Cheers!!

Melbin Mathew

www.techiesweb.com

.

VB Script to Monitor Windows Process and send alerts

VB Script to Monitor Windows Process

Monitoring a Windows process is different from service monitoring. I was using IPSentry to monitor few of my websites, but the IPSentry applications was crashing without my knowledge and thus leaving the websites with no monitoring. So I setup a Windows schedule task with the following VB script to monitor the IPsentry process on every 5 minutes.

The script identify IPSentry.exe process availability and sent email if incase the process was not running. So I can know at what time the process was crashed and even I can restart the application.

Set email = CreateObject(“CDO.Message”)

strComputer = “.”

Set objWMIService = GetObject(“winmgmts:” _

& “{impersonationLevel=impersonate}!\\” & strComputer & “\root\cimv2″)

Set colProcesses = objWMIService.ExecQuery _

(“Select * from Win32_Process Where Name = ‘IPSentry.exe'”)

If colProcesses.Count = 0 Then

email.Subject = “IPSentry DOWN”

email.From = “alerts @techiesweb.com”

email.To = “monitoring @techiesweb.com”

email.TextBody = “IPSentry process is NOT running. Immediately start the application to avoid any further problems.”

email.Configuration.Fields.Item(“http://schemas.microsoft.com/cdo/configuration/sendusing”)=2

email.Configuration.Fields.Item(“http://schemas.microsoft.com/cdo/configuration/smtpserver”)=”smtp1.techiesweb.com”

email.Configuration.Fields.Item(“http://schemas.microsoft.com/cdo/configuration/smtpserverport”)=25

email.Configuration.Fields.Update

email.Send

End If

set email = Nothing

Copy the VB script in a notepad and save it as TechieswebPM.vbs. Add the process monitoring VB script to Windows schedule task to monitor the required process at a specific internal.

A monitoring script to monitor the monitoring tool :)

Cheers!!

Melbin Mathew

www.techiesweb.com

VMware failed with message Another task is already in progress

VMware failed with message Another task is already in progress

One of the virtual machine was not responding to any tasks and it was giving an error message states,

Another task is already in progress

I tried two methods to troubleshoot the problem. The first method failed to resolve the problem.

First method

I tried to reload the .VMX file of the virtual machine, but it failed with error message,

[root@hostname ~]# vim-cmd vmsvc/getallvms

The output will show virtual machines which are registered on the ESX/ESXi host and the output will be similar to:

Vmid   Name                          File                Guest OS                 Version     Annotation
9856 datastore   [local] Win .vmx    win2012    vmx-07      To be used as a template

In the above example the Vmid is 9856

[root@hostname ~]# vmware-vim-cmd vmsvc/reload 9856

(vmodl.fault.SystemError) {

dynamicType = <unset>,

faultCause = (vmodl.MethodFault) null,

reason = “Invalid fault”,

msg = “vim.fault.TaskInProgress”,

VMware KB

Second Method

Restarted the VMware management services and reconnected the ESX server to the vCenter.

Caution: Ensure Automatic Startup/Shutdown of virtual machines is disabled before running this command or you risk rebooting the virtual machines

#service mgmt-vmware restart

#service vmware-vpxa restart

At last after waiting for around 10 minutes after the service restart, I was able to perform tasks in the problematic virtual machine.

VMware KB

Read the VMware reference articles before performing anything.

Cheers!!

Melbin Mathew

www.techiesweb.com

How to access Start Menu in Windows 2012

How to access Start Menu in Windows 2012

The first screen appears like this, press CTRL+ Alt+ Delete

windows_2012_techiesweb.com

Navigate the mouse to Left bottom corner to display the Windows 2012 start graphics. Click to open the Start Menu.

Windows2012_Start_techiesweb.com

Start Menu

windows 2012 Start Menu

Cheers!!

Melbin Mathew

www.techiesweb.com

How to assign static IPv4 static IP Address on a Windows Computer

How to assign static IPv4 static IP Address on a Windows Computer

Whenever I travel with my laptop between the Office and home computer networks, sometime I need to manually assign IP address to computer LAN adapter despite of using the DHCP auto IP address.

Simple step is to Go to Windows -> RUN and type ncpa.cpl to show up the network adapters and then edit the IPv4 as per needed.

1. Go to Windows -> Run and type ncpa.cpl

clip_image002

2. Choose the network adapter and right click to choose the properties.

clip_image004

3. Select TCP/IP and assign desired IP address and Gateway that matches the network.

clip_image006

4. Click Ok to Finish the setup.

Cheers!!

Melbin Mathew

www.techiesweb.com