The scripts in this folder can be used to mount your home folder in windows while outside of the St Andrews uni network.
To use this utility unzip the file 'Mount CS Home Folder Remote.zip' somewhere and then follow the following steps:
- Run the following commands from an elevated command prompt:
sc stop LanmanServer sc config LanmanServer start= disabled
- Restart your computer.
- Edit the variables on lines 2 and 3 of connectHomeCS.bat to be your cs username and ssh address (e.g. user.host.cs.st-andrews.ac.uk).
- Run connectHomeCS.bat.
- Click yes when the UAC prompt appears.
- Minimise the connected SSH window and leave it running in the background (You can press win+tab and drag it into another desktop; this will hide it from view).
- After 10s access your home directory at H:
Note: Steps 1-3 are only required once.
If the SSH connection drops, the script will run again; repeat steps 5-7.
To run the script automatically on startup, add a shortcut to connectHomeCS.bat to %AppData%\Microsoft\Windows\Start Menu\Programs\Startup
If you don't want to trust the pre-built executable, you can compile it yourself here.
If this is your first time mounting your home folder, you will need to follow these additional steps after step 6 above:
- Run the following command (from a non-elevated command prompt):
(The result of this command doesn't matter).
net use h: /delete
- Navigate to the 'This PC' folder in windows explorer.
- In the 'Computer' tab at the top of the screen click 'Map network drive'.
- Select 'H:' from the dropdown list.
- For folder, enter
\\localhost\<your cs username>
. - Unselect 'Reconnect at sign-in'.
- Select 'Connect using different credentials'.
- Click 'Finish'.
- For Username, enter
CSAD\<your cs username>
. - For Password, enter your cs password.
- Tick 'Remember my credentials'.
- Click Ok.
- Repeat steps 10-12.
- (Optional) Stop and re-run ConnectHomeCS.bat.
Note: These steps are only required once.