- Joined
- 8 Apr 2005
- Messages
- 16,950
I have a very simple login script that does two things, mapping of drive(s) and applying registry values. The way I have the registry entries applied is that I made the changes on a machine, and then exported that area of the registry. So I have a .reg file I'm trying to apply. I'm getting a syntax error, so I think I don't have the command right. The drive mapping is fine, the problem is with running the .reg file.
From what I understand, that will work as long as the "folders.reg" file is in the same directory as the script, which it is. Else I think you have to put the full path of the file itself. Am I wrong?
EDIT: I should probably mention this is a .VBS, incase you couldn't tell from the syntax
Code:
Set objNetwork = WScript.CreateObject("WScript.Network")
objNetwork.MapNetworkDrive "S:" , "\\server01\public_files"
regedit /s folders.reg
From what I understand, that will work as long as the "folders.reg" file is in the same directory as the script, which it is. Else I think you have to put the full path of the file itself. Am I wrong?
EDIT: I should probably mention this is a .VBS, incase you couldn't tell from the syntax