Tuesday, February 7, 2012

User name creation Using patch file

set xfold=E:\Staff\ECE
set xname=%1
set pass=%2
net user %xname% %pass% /add /domain
md %xfold%\%xname%

rmtshare \\srvname\%xname%$=%xfold%\%xname% /USERS:3 /GRANT "domain\username":F /GRANT %xname%:C

echo Y |cacls %xfold%\%xname% /E /R Everyone /P Administrator:F %xname%:C

Map network drive from Shared resources

net use K: \\filesrv\share$ /user:domainname\Username Password

Thursday, February 2, 2012

Batch file for Shortcuts

cmd /k "y:&&set path=%path%;"C:\Program Files\MySQL\MySQL Server 5.5\bin"&&mysqld&&mysql -u root -p"

cmd /k "set path=%path%;C:\Program Files\Java\jdk1.5.0\bin;C:\Program Files\Java\jdk1.6.0_23\bin;C:\Program Files\Java\jdk1.6.0_26\bin;&&set classpath="\\newton\jade$\http.jar;\\newton\jade$\iiop.jar;\\newton\jade$\jade.jar;\\newton\jade$\jadeTools.jar;\\newton\jade$\migration.jar;\\newton\jade$\commons-codec-1.3.jar;"&&y:"

Fortigate Mac based user name creation

go to CLI window

type the following

Config system dhcp reserved_address
edit nameoftheuser
set ip
set mac 00:01:02:03:04
set type regular


config system dhcp reserved_address
delete nameoftheuser

Wednesday, February 1, 2012

How to Use Network Shortcuts in IE via Group Policy

open Group policy management Console
Go to User configuration/Policies/Windows Settings/Internet Explorer Maintenance/URL/favorites and links

add the link file:////fileservername/filename.bat
then close the Group Policy Management console

go to run type cmd and use the command "gpupdate /force"