Jump to content

Recommended Posts

Posted

Hey edugeek, its tooo early in the morning for me to see where im going wrong on this,

 

We have recently changed the students home drives to \\server4\studentname$

 

However my old VBS script to open students folders was pointing to \\server4\students$\studentname

 

 

Can anybody help me change my vbs script?

thanks!

 

p.s. i have tried "& fname$ but it didnt like it

 

 

 

Dim fname

fname=InputBox("Enter students username FOR EXAMPLE 09smith:")

MsgBox("You typed " & fname)

Set WshShell = WScript.CreateObject("WScript.Shell")

WshShell.Run "%windir%\explorer \\server4\students$\"& fname

Posted
Hey edugeek, its tooo early in the morning for me to see where im going wrong on this,

 

We have recently changed the students home drives to \\server4\studentname$

 

However my old VBS script to open students folders was pointing to \\server4\students$\studentname

 

 

Can anybody help me change my vbs script?

thanks!

 

p.s. i have tried "& fname$ but it didnt like it

 

Try:

 

Dim fname
fname=InputBox("Enter students username FOR EXAMPLE 09smith:")
MsgBox("You typed " & fname)
Set WshShell = WScript.CreateObject("WScript.Shell")
WshShell.Run "%windir%\explorer \\server4\" & fname & "$"

 

Not sure if that will do it, but worth a shot :)

 

Steve

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...