Copy file to Domain user desktop by using Group Policy

Copy file to Domain user Desktop using .vbs script from Group Policy

Option Explicit

Dim objNetwork
Dim objFSO, objFileCopy, objGuyFile
Dim strFilePath, strDestination, strUserName
Set objNetwork = WScript.CreateObject(“WScript.Network”)
‘ Here is where we extract the UserName
strUserName = objNetwork.UserName
strFilePath = “\\servername\Desktop\BACK.bat
strDestination =”C:\Documents and Settings\” & strUserName & “\Desktop\”

Set objFSO = CreateObject(“Scripting.FileSystemObject”)

Set objFileCopy = objFSO.GetFile(strFilePath)
‘ Copy the file to its destination
objFileCopy.Copy (strDestination)
‘WSCript.Echo “Copied to ” & strDestination

Restriction to Open Software Maximun Sessions

Below is .vbs script for restrict users to open software maximun 2 sessions

Const HKEY_CURRENT_USER = &H80000001
Const HKEY_LOCAL_MACHINE = &H80000002

strComputer = “.”
Set oReg=GetObject(“winmgmts:{impersonationLevel=impersonate}!\\” & _
    strComputer & “\root\default:StdRegProv”)
strKeyPath = “Software\Attachmate\KEA\4.23\KEAVT”
strValueName = “MaxSessions”
dwValue = 2
oReg.SetDWORDValue HKEY_CURRENT_USER,strKeyPath,strValueName,dwValue

netuse.bat and Map.vbs (Create Map Drive from Group Policy)

create map drive for domain user from Group policy .bat

net use L: \\Servername\share

create map drive for domain user from Group policy .vbs

Option Explicit

Dim strDriveLetter, strRemotePath, strUserName
Dim objNetwork, objShell
Dim CheckDrive, AlreadyConnected, intDrive
strDriveLetter = “H:”
strRemotePath = “\\servername”
Set objShell = CreateObject(“WScript.Shell”)
Set objNetwork = CreateObject(“WScript.Network”)
Set CheckDrive = objNetwork.EnumNetworkDrives()
On Error Resume Next
AlreadyConnected = False
For intDrive = 0 To CheckDrive.Count – 1 Step 2
 If CheckDrive.Item(intDrive) =strDriveLetter _
 Then AlreadyConnected =True
If AlreadyConnected = False then
 strUserName = objNetwork.UserName
 objNetwork.MapNetworkDrive strDriveLetter, strRemotePath _
 & “\” & strUserName
End if


Can Not View Hidden Files and Folders

Problem: Show Hidden files and folders option is not working

Solutions: Clik Start – Run Regedit – HKEY_Current_USER-Software-Microsoft-Windows-Current Version-Explorer-Advance

On the right pane change the hidden value 1


1- Click Start –> Run –> regsvr32 /i browseui.dll –> enter

A confirmation message will appear like given below

2- Click Start –> Run –> regsvr32 /i shell32.dll

Wait for the confirmation and click OK.

3. Click Start ->Run->regsvr32 /i jscript.dll

Unable to take print from outlook

Problem: Unable to take print from outlook

Line :2020


Error: Unspecified errror

Code: 0

URL: res://ieframe.dll/preview.dlg

o start

2. Click Run

3. Type: regsvr32 Ole32.dll

Source: from web

Hello world!

Welcome to This is your first post. Edit or delete it and start blogging!