Showing posts with label Dos commands. Show all posts
Showing posts with label Dos commands. Show all posts

Monday, October 18, 2010

How to Check Office 2010 Activation Status

1 Open an administrative level command prompt.

2 Change directory to the Office14 folder at the following location by typing the following command, and hit Enter to execute:

cd \Program Files\Microsoft Office\Office14

Note: For user installing 32-bit (x86) edition of Office 2010 on 64-bit (x64) Windows OS, type the following command instead, and hit Enter to execute:

cd \Program Files(x86)\Microsoft Office\Office14
3 Then, type the following command, and hit Enter to execute:

cscript ospp.vbs /dstatus

4 The LICENSE NAME and/or LICENSE DESCRIPTION gives the license type for Office 2010, while LICENSE STATUS shows activation status of Office 2010.

Sunday, December 13, 2009

How to set path using bat file

Type the below command in notepad and save the file to .bat file extenstion.

cmd /k "set path=%path%;"c:\Program Files\Java\jdk1.5.0\bin"&&z:"

Tuesday, December 8, 2009

Time synchronization between server and client

The following command is used for time synchronization between server and client.

This command is used in client computer.

w32tm /resync /computer:computername or domainname /nowait /soft

Monday, May 12, 2008

Time sync between server and client

Time Sync between server and workstation following commands
are used

w32tm /config /update
w32tm /resync

Start and Stop using time service using

net stop w32time && net start w32time

Wednesday, April 30, 2008

Disable USB Drive using Group Policy

usb.bat file contain
regedit /s \\slche\systemrestore$\usb.reg


usb.reg file contain

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\USBSTOR]
"Start"=dword:00000004

usb.bat is put in logon scipt in computer policy
rsb.reg file is placed in \\slche\systemrestore$\usb.reg

Create scheduled restore point in Windows XP

Restore.bat file contain
at 3:40pm \\bslch\systemrestore$\a.vbs

a.vbs file contain
Set IRP = getobject("winmgmts:\\.\root\default:Systemrestore" )
MYRP = IRP.createrestorepoint ("IT Helpdesk Restore Point", 0, 100)



put the restore.bat file in logon script in computer policy.
a.vbs file is copied into "\\bslch\systemrestore$" this location.

Thursday, April 24, 2008

How to enable firewall in Windows XP

netsh firewall set opmode mode=ENABLE
netsh firewall set service type=FILEANDPRINT mode=ENABLE

Monday, April 7, 2008

How to View and delete scheduled job tasks

at command prompt

View scheduled jobs

at \\computername

Delete scheduled jobs

type
at \\computername /delete /y

Map network Drive

net use \\server\share password /USER:domain\username

/P means persistent.

This means reconnect the share at the next logon.

But for that to work with a password you will also need to save the credentials.

So try this ...

NET USE Z: \\192.168.2.43\mercury password /USER:domain\username /SAVECRED /PERSISENT:YES

Replace password, domain and username with appropriate values ...

NET USE Z: \\192.168.2.43\mercury MrBlobby /USER:BBC\NoelEdmonds /SAVECRED /PERSISENT:YES

Example:

net use h: \\computername\c$ /u:domainname\username "Pasword"

Delete net drive using this command

net use * /delete /y

Disable USB drive

copy the below three lines and paste this file to usb.reg

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\USBSTOR]
"Start"=dword:00000004

then run this file or create a batch file


regedit /s \\sbslchedc01\systemrestore$\usb.reg

PsExec

PsExec executes a program on a remote system, where remotely executed console applications execute interactively.

psexec @computername.txt -e -u administrator -P password -realtime -c ocxreg.bat

computername.txt contain computer name or ip address..

schedule a restore point

Paste the following two lines of code into notepad. Then save the file with restore.vbs extention, e.g. save it as something like 'restorepoint.vbs'

Set IRP = getobject ("winmgmts:\\.\root\default:Systemrestore" )

MYRP = IRP.createrestorepoint ("Tamilchild Restore Point", 0, 100)

with that done, run the file manually, then open system restore and verify the restore point was created ok.

Now you can use scheduled tasks in the normal way to create a restore point as you wish. Needless to say, the account you schedule this to run under will need to be an admin account.

Change file name with date extention

Create a batch file save this contents. It works good.

ren "C:\Program Files\Syslogd\Logs\SyslogCatchAll.txt" SyslogCatchAll%date:~4,2%-%date:~7,2%-%date:~10%.txt

Friday, April 4, 2008

Gateway address, IP Address, DNS

Add gateway address
Type the command in cmd
netsh interface ip delete addres "local area connection" gateway=10.90.102.6

netsh interface ip set address name="local area connection" gateway=10.90.102.6 gwmetric=default

netsh interface ip add address "local area connection" gateway=10.90.103.6 gwmetric=automatic

Delete DNS

Delete particular Dns using this command

netsh interface ip delete dns "local area connection" 10.90.2.2

Delete all dns using this command..

netsh interface ip delete dns "Local Area Connection" all


using command prompt..

netsh interface ip add dns "local area connection" 10.90.2.2 index=2

ok..

Add Ip address

Simply type this command in cmd..

Netsh interface ip add address "local area connection" 10.90.30.2 255.255.254.0

OK..

Shutdown the Remote PC

The following command is used for remote pc shutdown

shutdown -m \\computername(or Ipaddress) -s -f -t 00


-m Remote machine

-s Shutdown

-t time duration

To enable or disable the Remote Desktop exception

Using the command prompt

To enable or disable the Remote Desktop exception

• Type the following at the command prompt, and press ENTER:

netsh firewall set service type = remotedesktop mode =

mode


Substitute values for the placeholder in italics. The following table lists possible values for the placeholder.

Placeholder Possible Values Description
mode

enable, disable

Specifies whether to enable or disable the exception.


If you get an "Access Denied" message when you run a command, you do not have administrative rights to configure Windows Firewall. If you get an "Ok" message but the command does not take effect, the setting might be managed by Group Policy

Enable or Disable the File and Printer Sharing

Using the command prompt

To enable or disable the File and Printer Sharing exception

• Type the following at the command prompt, and press ENTER:

netsh firewall set service type = fileandprint mode = mode


mode
enable, disable

Specifies whether to enable or disable the exception.


If you get an "Access Denied" message when you run a command, you do not have administrative rights to configure Windows Firewall. If you get an "Ok" message but the command does not take effect, the setting might be managed by Group Policy.