vbscript fails for non-admin user in sharepoint
Posted on 2014-01-07
we have created a shortcut in sharepoint to allow the currently logged in user to get the local machine name of their computer. here is the script:
Set objPC = CreateObject( "WScript.Network")
strComputerName = objPC.ComputerName
msgbox "Computer Name: " & strComputerName, vbokonly + vbinformation, "Computer Name"
the problem is, it fails on line 1 unless the user is an admin. how can I run this script for domain users without admin rights?
BTW, this script works fine on XP but not on Windows 7.