General discussion

Locked

Logon Script - Delete Drive

By guy ·
I am looking for a logon script which will delete a network drive. Language = VBScript. I cannot get the DriveExist command to work. Do you have an example of a script that will make sure a drive letter is deleted before I create a new drive Mapping

This conversation is currently closed to new comments.

5 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

Logon Script - Delete Drive

by pweegar In reply to Logon Script - Delete Dri ...

If you want to develop your own script, add the net use command to the script. Using net use, you can delete existing drive mappings and/or when you establish a drive mapping, set it' persistance to no (from a command prompt type net use /? for help)

Collapse -

Logon Script - Delete Drive

by guy In reply to Logon Script - Delete Dri ...

Thanks for your idea, but I am looking for a VBScript command e.g. DriveExist

Collapse -

Logon Script - Delete Drive

by JackOfAllTech In reply to Logon Script - Delete Dri ...

Since I never use VBS, I don't know if this will work but, assuming you can DECLARE external routines in VBS, look up either WNetCancelConnection or WNetCancelConnection2 in the Win32 API reference.

Ralph

Collapse -

Logon Script - Delete Drive

by guy In reply to Logon Script - Delete Dri ...

Poster rated this answer

Collapse -

Logon Script - Delete Drive

by guy In reply to Logon Script - Delete Dri ...

This question was closed by the author

Back to Web Development Forum
5 total posts (Page 1 of 1)  

Related Discussions

Related Forums