mapped network

  • Thread starter Thread starter t
  • Start date Start date
T

t

I want to create a start script for users when first time login in PC, that script will do the following:
1- delete all network mapping.
2- create mapping to network folder (every user has there own folder based on there full name).
3- create short cut to mapped network folder on desktop and in my documents.

is it possible to have such script? if yes where I could find help

Thanks
 
Just for reference

create mapdrive.vbs and desktopshortcut.vbs script file under the "User Configuration\Windows Settings\Scripts\Logon"

'mapdirve' script content:

Dim net
Set net = CreateObject("WScript.Network")
net.MapNetworkDrive "X:", \\network path\%username%,"false"
so on..

'desktopshortcut.vbs' script content:

'Create a WshShell Object
Set WshShell = Wscript.CreateObject("Wscript.Shell")

'Shortcut Location
strDesktop = WshShell.SpecialFolders("Desktop")

'Create a WshShortcut Object
Set oShellLink = WshShell.CreateShortcut(strDesktop & "\Calculator.lnk")

'Set the Target Path for the shortcut
oShellLink.TargetPath = "%SystemRoot%\system32\calc.exe"

'Set the additional parameters for the shortcut
oShellLink.Arguments = ""

'Save the shortcut
oShellLink.Save

'Clean up the WshShortcut Object
Set oShellLink = Nothing

also you can go MS ScriptCenter search some useful script.



"t" <[email protected]> 撰寫於郵件新èž:[email protected]...
I want to create a start script for users when first time login in PC, that script will do the following:
1- delete all network mapping.
2- create mapping to network folder (every user has there own folder based on there full name).
3- create short cut to mapped network folder on desktop and in my documents.

is it possible to have such script? if yes where I could find help

Thanks
 
thanks
Just for reference

create mapdrive.vbs and desktopshortcut.vbs script file under the "User Configuration\Windows Settings\Scripts\Logon"

'mapdirve' script content:

Dim net
Set net = CreateObject("WScript.Network")
net.MapNetworkDrive "X:", \\network path\%username%,"false"
so on..

'desktopshortcut.vbs' script content:

'Create a WshShell Object
Set WshShell = Wscript.CreateObject("Wscript.Shell")

'Shortcut Location
strDesktop = WshShell.SpecialFolders("Desktop")

'Create a WshShortcut Object
Set oShellLink = WshShell.CreateShortcut(strDesktop & "\Calculator.lnk")

'Set the Target Path for the shortcut
oShellLink.TargetPath = "%SystemRoot%\system32\calc.exe"

'Set the additional parameters for the shortcut
oShellLink.Arguments = ""

'Save the shortcut
oShellLink.Save

'Clean up the WshShortcut Object
Set oShellLink = Nothing

also you can go MS ScriptCenter search some useful script.



"t" <[email protected]> 撰寫於郵件新èž:[email protected]...
I want to create a start script for users when first time login in PC, that script will do the following:
1- delete all network mapping.
2- create mapping to network folder (every user has there own folder based on there full name).
3- create short cut to mapped network folder on desktop and in my documents.

is it possible to have such script? if yes where I could find help

Thanks
 
Back
Top