0

The script given in the answer to this question works perfectly when running from a local drive accessible to both the normal user and the administrator.

However, when run from a network drive (which is a very real possibility in University environments) it runs into file not found issues.

Does anybody have an idea how to fix this?

Community
  • 1
  • 1
Michael Clerx
  • 2,928
  • 2
  • 33
  • 47

2 Answers2

2

This is a new "feature" of UAC in windows, try this regkey:

reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" /v EnableLinkedConnections /t REG_DWORD /d 00000001 /f

For more information on this regkey, check out this technet article: LINK

Alex
  • 917
  • 5
  • 11
0

Went for the simplest workaround: The batch file now copies all files it requires to the user's temp folder (which is local & accessible to admins) before running the "as admin" part.

Bit of a hassle, large & ugly batch file, but it works

Michael Clerx
  • 2,928
  • 2
  • 33
  • 47