Showing posts with label Network. Show all posts
Showing posts with label Network. Show all posts

Remove unused windows update patch files

Description:-

In this tutorials we will see how to remove windows update patch file which file we does not need in system. Here is the solution to remove those files and keep your system fast. Follow this step to remove it.
Step 1:- open command prompt run as system administrator mode.

Step 2:- type below command in your command prompt to remove unused windows update patch files.

rmdir /q /s %WINDIR%\Installer\$PatchCache$

wait until process complete.

Step 3:- now open your My Computer and check in your C:\ Drive.

Note: - If you have removed your patch file once then again you cannot run this command again because already you have removes your patch file from that directory.

Disabling Ctrl+Alt_Del screen at logon in Win7


Description:-

1. Open RUN dialog using "Windows + R"
2. Enter command as 'control userpasswords2'
3. Go to 'Advanced' tab of newly opened dialog
4. In Secure logon section, uncheck 'Require users to press Ctrl + Alt + Delete' 
5. Click on 'Apply' button 

And you are done :)
Note:- Please use at your own risk. 


Windows Command Line for Find SID

Windows Command Line for Find SID

Description:-

In Windows environment, each user is assigned a unique identifier called Security ID or SID, which is used to control access to various resources like Files, Registry keys, network shares etc. We can obtain SID of a user through WMIC USERACCOUNT command. Below you can find syntax and examples for the same.

Get SID of a local user 

wmic useraccount where name='username' get sid

For example, to get the SID for a local user with the login name ‘Umesh’, the command would be as below
wmic useraccount where name='Umesh' get sid

Get SID for current logged in user

To retrieve the SID for current logged in user we can run the below command. This does not require you to specify the user name in the command. This can be used in batch files which may be executed from different user accounts.
wmic useraccount where name='%username%' get sid

Get SID for current logged in domain user
Run the command ‘whoami /user’ from command line to get the SID for the logged in user.
Example:

c:\>whoami /user

USER INFORMATION
----------------
User Name      SID
============== ==============================================
mydomain\wincmd S-1-5-21-7375663-6890924511-1272660413-2944159

Get SID for the local administrator of the computer
wmic useraccount where (name='administrator' and domain='%computername%') get name, sid

Get SID for the domain administrator
wmic useraccount where (name='administrator' and domain='%userdomain%') get name, sid

How to ShutDown your PC using Asp.Net


Description:-

This Article will show you that how to shut down the computer using asp.net C#. here i have create demo example to shutdown computer using dot net. also if you want to stop the shut down process then also you can by typing below command in command prompt. 

also you can set time or restart by typing command like. if you want to restart then you have to insert command.

shutdown -r

if you want to set particular time for shutdown then you have to set time in command like.

shutdown -s -t 06

Default.aspx.cs:-

Add a namespace

using System.Diagnostics;

Write few lines of code on button click:

protected void Button1_Click(object sender, EventArgs e)
{
    ProcessStartInfo startinfo = new ProcessStartInfo("shutdown.exe", "-s");
    Process.Start(startinfo);
}

Note:- if you want to Cancel Shutdown then you can open you Command Prompt and Type.
'Shutdown -a' you’re Shutdown Process will be Cancel.