Microsoft
Software
Hardware
Network
Question : How do i rename mapped drives and printers with the script i have in place
Hi all
im having trouble with a script that is running in a windows server 2003 domain. i have a script starting up in GPO for student log-ins. the script basicaly maps the Drives and printers for the school.
I have a few hidden shares that are mapped and I'd prefer there to be another name that comes up instead of the share name when they goto there computer.
im not very confident at script writing and havent had much exprience with it
here is the script below
--------------------------
----------
----------
-----
'// Declare All variables
Option Explicit
'// Comment this out for debugging!
On Error Resume Next
'// Variables
Dim network, filesys, shell
Dim printer1, printer2, printer3, printer4, serverpath, servername
'// Create Windows Scripting Object
Set network = CreateObject("WScript.Netw
ork")
Set filesys = CreateObject("Scripting.Fi
leSystemOb
ject")
Set shell = CreateObject("WScript.Shel
l")
'// Define UNC Paths
servername = "pvserver"
serverpath = "\\" & servername & "\"
printer1 = serverpath & "Printer1"
printer2 = serverpath & "Printer2"
printer3 = serverpath & "StaffRoom_Colour"
printer4 = serverpath & "Printer4"
'// Dont run on the server!
If LCase(network.ComputerName
) = servername Then
err.Raise 1, "Can not run on the server!"
End If
'// Map Printers
network.AddWindowsPrinterC
onnection printer1
network.AddWindowsPrinterC
onnection printer2
network.AddWindowsPrinterC
onnection printer3
network.AddWindowsPrinterC
onnection printer4
'// Set default printer
network.SetDefaultPrinter printer2
'// map network drives
network.MapNetworkDrive "s:", serverpath & "software"
network.MapNetworkDrive "o:", serverpath & "Pupil Resources"
network.MapNetworkDrive "y:", serverpath & "Media"
network.MapNetworkDrive "t:", serverpath & "Teachers Resources$"
network.MapNetworkDrive "p:", serverpath & "homep$"
network.MapNetworkDrive "z:", serverpath & "Snapshot"
--------------------------
----------
--------
im wanting to be able to call both the mapped drives and printers to anyname i give them rather than the share name
hope some one can help me on this
Many thanks
Phil Croxford
Answer : How do i rename mapped drives and printers with the script i have in place
It's all right, except you have skipped the following answer:
-In jpa code an object myObject becomes detached from a persistence context when you call the method remove(myOjbect) on an instance of EntityManager
Random Solutions
Track external IP address in ASA.
UTF-8 encoding
ISA/TMG issue
IE8 cannot read Chinese
My option and command keys are switched on my mac
Roles or authorization access to pages
Cannot change display settings
riddle vb.net calling unmanaged c++ dll
RS232 cable or RS232 bluetooth for Iphone to Cisco Router connections
EMC DPA (Data Protectiopn Advisor) Report