Hi,

on a customer's domain I'm running this script (stripped to show the relevant code only - the stripped version gives the same results as the full one):

 Code:
dim $BaseSharesPath
$BaseSharesPath = "\\myserver"

"Mapping folder for " 
color w+/n
@UserID 
color w/n 
" ... "
if exist($BaseSharesPath + "\" + @UserID)
	use s: /delete
	use s: $BaseSharesPath + "\" + @UserID
	if @error = 0
		color g+/n
		"OK"
	else
		color r+/n
		"ERROR"
	endif
else
	color y+/n	
	"NOT FOUND"
endif

sleep(2)


On Windows XP the script runs fine.

On Windows 7 (I tried it on x64 but it's supposed to have the same behavour on x86) with UAC on (default level) the script seems to run, I can see the output and no error is given on the mapping command (I can see "OK" on the console).

However, when the logon process is finished I can't see the mapped drive on Computer window.

The really strange thing is that if I run the script again once logged on, the very same output is given, and this time the mapped drive is shown.

If I turn off UAC everything works as expected during the logon process, too.

Does someone have an idea of what's goin on?

Thank you,

Roberto