|
|
![]() |
|
|
Top | #1 |
|
OSNN Addict
Joined: December 2006
Posts: 88
Reputation: 60
Power: 67 |
|
|
|
|
|
|
Top | #2 |
|
█▄█ ▀█▄ █
Joined: April 2005
Location: Massachusetts
Posts: 16,949
Reputation: 4941
Power: 305 |
You can do this through batch files and the NET USE command.
For example, if you had a share called FILES on a server called CONTOSO... NET USE X:\\CONTOSO\FILES X = Drive letter of choice CONTOSO = server name FILES = share name -edit- More info on NET USE http://www.microsoft.com/resources/d....mspx?mfr=true |
|
|
|
|
|
Top | #3 |
|
XPista7eopard*ix
Joined: April 2004
Location: Chicagoland
Posts: 4,028
Reputation: 2947
Power: 168 |
and yes, you can write up that batch file and make it a logon script to map the drive at each login (assuming they are connected to the domain when they login with their domain account)
|
|
|
|
|
|
Top | #4 |
|
OSNN Addict
Joined: December 2006
Posts: 88
Reputation: 60
Power: 67 |
Thanks for that kcnychief and fitz, will try when i get home from school. Why couldnt Help and Support put it like that?
|
|
|
|
|
|
Top | #5 |
|
OSNN Addict
Joined: December 2006
Posts: 88
Reputation: 60
Power: 67 |
Not as cool as I thought, where do the scripts have to be stored?
|
|
|
|
|
|
Top | #6 |
|
█▄█ ▀█▄ █
Joined: April 2005
Location: Massachusetts
Posts: 16,949
Reputation: 4941
Power: 305 |
Login scrips go in C:\WINDOWS\SYSVOL\sysvol\domain_name\scripts
They also need to be added to the AD Profile as well |
|
|
|
|
|
Top | #7 |
|
OSNN Addict
Joined: December 2006
Posts: 88
Reputation: 60
Power: 67 |
Thnx got it working (rep to be added) now finally I got this sample script from MS for adding a printer connection and assinging a default printer. I myself cant get much from it so can someone show me where i put my unique information in to allow it to work? They look like this:
Add printer connection: Set WshNetwork = CreateObject("WScript.Network") WshNetwork.AddWindowsPrinterConnection "\\PrintServer1\Xerox300" WshNetwork.SetDefaultPrinter "\\PrintServer1\Xerox300" Set default printer: strComputer = "." Set objWMIService = GetObject("winmgmts:" _ & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2") Set colInstalledPrinters = objWMIService.ExecQuery _ ("Select * from Win32_Printer Where Name = 'ScriptedPrinter'") For Each objPrinter in colInstalledPrinters objPrinter.SetDefaultPrinter() Also, MS said that the printer connection has to be run locally on the computer, how can I make this happen. I know I should get a book but I have no money lol thnx for any help |
|
|
|
|
|
Top | #8 |
|
XPista7eopard*ix
Joined: April 2004
Location: Chicagoland
Posts: 4,028
Reputation: 2947
Power: 168 |
You don't necessary need a book. There is a wealth of scripting info out on the web if you take the time to learn and understand what you copy/write. But given your apparent lack of experience administering a network, I would probably suggest a good class to start with. Spend a little money for class now, or spend a lot of time/money/headache later when you screw something up because you don't know what you are doing.
Add printer connection: Code:
dim strPrintPath
'add the UNC path to the printer here
strPrintPath= \\printServer\printerShareName
'creates the object
Set WshNetwork = CreateObject("WScript.Network")
'adds the printer connection
WshNetwork.AddWindowsPrinterConnection strPrintPath
'sets the default printer
WshNetwork.SetDefaultPrinter strPrintPath
|
|
|
|
|
|
Top | #9 |
|
OSNN Addict
Joined: December 2006
Posts: 88
Reputation: 60
Power: 67 |
Thanks for that, actually got it working at home last night but dont have internet access at home at the minute so couldnt have said, good ive got them all working now, thnx
|
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Windows Logon Script: Creating a specific shortcut on all users desktop? | Punkrulz | Web Design & Coding | 4 | October 3rd, 2007 11:12pm |
| a logon script to update/copy current antivirus def | rsuguna1 | Windows Desktop Systems | 2 | March 16th, 2005 4:45pm |
| Creating Logon script | IDLE | Windows Desktop Systems | 0 | March 30th, 2004 8:57pm |
| Script problem? | pocorosso | Windows Desktop Systems | 5 | December 2nd, 2002 4:12am |
| Logon problem | 1bLaDe1 | Windows Desktop Systems | 10 | January 15th, 2002 3:06am |