Originally Posted By: duo

....

Final comment, This is where everything gets frustrating
....
This works,and there is no real difference between this, or how its executed from the login script. It collects the user/pass and maps the drive...so why does this work with one of the drives through login script, but not both, when this works with both.


How about reworking the CmdUserLogin_Click function to this? Does this give you better results? Also using drive B might be tricky. Drive A and B could be used for diskette drives. I would never use any drive letter below D for a drive mapping.

 Code:
Function CmdUserLogin_Click()

	If $TextBoxUsername.Text = ""
		$= $Form.MsgBox("You must specify a username before clicking LOGIN.", "Invalid Username")
		$TextBoxUsername.Text = $StringUsername
		Exit Sub
	Else
		$StringUsername = $TextBoxUsername.Text
	EndIf

	If $TextBoxPassword.Text = ""
		$= $Form.MsgBox("You must specify a password before clicking LOGIN.", "Invalid Password")
		$TextBoxPassword.Text = $StringPassword
		Exit Sub
	Else
		$StringPassword = $TextBoxPassword.Text
	EndIf


	$Form.Hide

	$drive="B:"
	$server="\\Qs1045n5m\"
	$share="Benefits"

	$share = $server + $share

	;? "variables are" $share $Stringusername $Stringpassword

	? "mapping " + $drive + " to " + $share
	Use $drive /Delete
	Use $drive + " " $share + " /user:" + $StringUsername + " /Password:" + $StringPassword
EndFunction
_________________________
Mart

- Chuck Norris once sold ebay to ebay on ebay.