Viewed 1k times. Improve this question. Are you looking to just sync that folder at login? Add a comment. Active Oldest Votes. Eg robocopy. Improve this answer. Jeff Atwood Slimbo Slimbo. This logon script runs when a local user logs on locally to the computer.
This logon script does not run when the user logs on to the domain. You must be logged on as Administrator or as a member of the Administrators group to complete this procedure. If your computer is connected to a network, network policy settings may also prevent you from completing this procedure. In the console tree, expand Local Users and Groups , and then click Users.
In the right pane, right-click the user account that you want, and then click Properties. Remove From My Forums. Answered by:. Archived Forums. Windows Server General Forum. Sign in to vote. Thanks, Peggy. Monday, February 13, PM. On line 1 you can see how the code creates objNetwork. Line 2 then applies the famous MapNetworkDrive method to achieve the actual drive mapping. Note 2: If you run the script a second time, then you get WSH error message code See diagram opposite.
Now you can run the script again. Alternatively, you could create a fancy script, which maps to the first free drive letter, however that is difficult task, but see here if you want to try that advanced script. Note 4: I reduced this first example script to the bare minimum.
All I wanted was for you to gain success mapping a network drive. The next examples are more typical of production Microsoft VBScripts because they introduce variables, comments and a header.
Calculating IP Address ranges is a black art, which many network managers solve by creating custom Excel spreadsheets. For Mr Organized there is a nifty subnet calculator, you enter the network address and the subnet mask, then IPAT works out the usable addresses and their ranges. Note 1: At the top of the script is a heading section.
0コメント