Overclock.net › Forums › Specialty Builds › Servers › Mapping Scripts On Bootup on PC to Server Storage Drives
New Posts  All Forums:Forum Nav:

Mapping Scripts On Bootup on PC to Server Storage Drives

post #1 of 6
Thread Starter 
Hi everyone.

So I don't know if this is the right place for this question, but I figure people with servers would know this.

My question is: How do I make a script that automatically maps and enters in the username & password for the drive?

Example:

My PC's name is: robpc
Server name is: robserver

I want to map a folder in the server called pictures:

Want it so that it's mapped when Windows starts.

The PC is on XP. Server is Windows Home Server.

Thanks everyone!
Edited by bnceo - 3/3/11 at 5:42pm
BeatBox
(13 items)
 
  
CPUMotherboardGraphicsRAM
Core 2 Duo E6300 Asus P5B-E MSI nVidia 6800 Corsair XMS2 4GB 
Hard DriveOptical DriveOSPower
250GB Seagate/3 x 2TB WD Green Asus DVD Burner Windows Home Server ThermalTake TR2 RX 550W 
Case
Antec Sonata 
  hide details  
Reply
BeatBox
(13 items)
 
  
CPUMotherboardGraphicsRAM
Core 2 Duo E6300 Asus P5B-E MSI nVidia 6800 Corsair XMS2 4GB 
Hard DriveOptical DriveOSPower
250GB Seagate/3 x 2TB WD Green Asus DVD Burner Windows Home Server ThermalTake TR2 RX 550W 
Case
Antec Sonata 
  hide details  
Reply
post #2 of 6
Real easy. Use a text editor and the NET command. Make a batch file. Here is mine that runs on all my PCs in the house.

Code:
NET USE * /DELETE /Y
NET USE Z: "\\\\webserver\\file server"
NET USE X: "\\\\webserver\\file server2"
NET USE Y: "\\\\webserver\\sites"
    
CPUMotherboardGraphicsRAM
Intel Overdrive 486DX4 100Mhz Digital Venturis 466 S3 Trio 32 1MB 68MB 72 Pin SIMMs 
Hard DriveOptical DriveOSMonitor
1.2Gb & 270Mb 32X CD-ROM Windows 98 SE LG 23" Flatron 
KeyboardPowerCaseMouse
Microsoft PS/2 Lite-On Digital Venturis 466 Logitech PS/2 
  hide details  
Reply
    
CPUMotherboardGraphicsRAM
Intel Overdrive 486DX4 100Mhz Digital Venturis 466 S3 Trio 32 1MB 68MB 72 Pin SIMMs 
Hard DriveOptical DriveOSMonitor
1.2Gb & 270Mb 32X CD-ROM Windows 98 SE LG 23" Flatron 
KeyboardPowerCaseMouse
Microsoft PS/2 Lite-On Digital Venturis 466 Logitech PS/2 
  hide details  
Reply
post #3 of 6
Thread Starter 
Quote:
Originally Posted by killabytes View Post
Real easy. Use a text editor and the NET command. Make a batch file. Here is mine that runs on all my PCs in the house.

Code:
NET USE * /DELETE /Y
NET USE Z: "\\\\webserver\\file server"
NET USE X: "\\\\webserver\\file server2"
NET USE Y: "\\\\webserver\\sites"
My only issue is that I have a password on these folders. How do I do it so that it includes the username and password and how do I make it so that the batch file boots up when my PC starts up?
BeatBox
(13 items)
 
  
CPUMotherboardGraphicsRAM
Core 2 Duo E6300 Asus P5B-E MSI nVidia 6800 Corsair XMS2 4GB 
Hard DriveOptical DriveOSPower
250GB Seagate/3 x 2TB WD Green Asus DVD Burner Windows Home Server ThermalTake TR2 RX 550W 
Case
Antec Sonata 
  hide details  
Reply
BeatBox
(13 items)
 
  
CPUMotherboardGraphicsRAM
Core 2 Duo E6300 Asus P5B-E MSI nVidia 6800 Corsair XMS2 4GB 
Hard DriveOptical DriveOSPower
250GB Seagate/3 x 2TB WD Green Asus DVD Burner Windows Home Server ThermalTake TR2 RX 550W 
Case
Antec Sonata 
  hide details  
Reply
post #4 of 6
You shouldn't need a script at all - just map a drive in Windows Explorer, and check the 'reconnect at logon' button in the GUI.
post #5 of 6
Quote:
Originally Posted by bnceo View Post
My only issue is that I have a password on these folders. How do I do it so that it includes the username and password and how do I make it so that the batch file boots up when my PC starts up?
You can include passwords as well.

http://www.computerhope.com/nethlp.htm

Quote:
Connects or disconnects your computer from a shared resource or displays information about your connections.
[devicename | *] [\\\\computername\\sharename[\\volume] [password | *]]
[/USER:[domainname\\]username]
[/USER:[dotted domain name\\]username]
[/USER:[username@dotted domain name]
[/SMARTCARD]
[/SAVECRED]
[[/DELETE] | [/PERSISTENT:{YES | NO}]]

NET USE {devicename | *} [password | *] /HOME
    
CPUMotherboardGraphicsRAM
Intel Overdrive 486DX4 100Mhz Digital Venturis 466 S3 Trio 32 1MB 68MB 72 Pin SIMMs 
Hard DriveOptical DriveOSMonitor
1.2Gb & 270Mb 32X CD-ROM Windows 98 SE LG 23" Flatron 
KeyboardPowerCaseMouse
Microsoft PS/2 Lite-On Digital Venturis 466 Logitech PS/2 
  hide details  
Reply
    
CPUMotherboardGraphicsRAM
Intel Overdrive 486DX4 100Mhz Digital Venturis 466 S3 Trio 32 1MB 68MB 72 Pin SIMMs 
Hard DriveOptical DriveOSMonitor
1.2Gb & 270Mb 32X CD-ROM Windows 98 SE LG 23" Flatron 
KeyboardPowerCaseMouse
Microsoft PS/2 Lite-On Digital Venturis 466 Logitech PS/2 
  hide details  
Reply
post #6 of 6
Check the "Save password" checkbox??
Underground
(14 items)
 
  
CPUMotherboardGraphicsRAM
Core i7 920 C0 ASUS P6T6 WS Revolution GTX 460 TR3X6G1600C8D 
Hard DriveOptical DriveCoolingOS
WD1001FALS SAMSUNG SH-S223F 22X DVD MULTI Corsair H50 Fedora 16 KDE x86_64 
MonitorKeyboardPowerCase
HP w19b Microsoft Comfort Curve Corsair CX600 Thermaltake Armor VA8003BWS 
MouseMouse Pad
Razer DeathAdder Black 
  hide details  
Reply
Underground
(14 items)
 
  
CPUMotherboardGraphicsRAM
Core i7 920 C0 ASUS P6T6 WS Revolution GTX 460 TR3X6G1600C8D 
Hard DriveOptical DriveCoolingOS
WD1001FALS SAMSUNG SH-S223F 22X DVD MULTI Corsair H50 Fedora 16 KDE x86_64 
MonitorKeyboardPowerCase
HP w19b Microsoft Comfort Curve Corsair CX600 Thermaltake Armor VA8003BWS 
MouseMouse Pad
Razer DeathAdder Black 
  hide details  
Reply
New Posts  All Forums:Forum Nav:
  Return Home
  Back to Forum: Servers
Overclock.net › Forums › Specialty Builds › Servers › Mapping Scripts On Bootup on PC to Server Storage Drives