We have a small environment where we are setting up mountable drives using a login.bat file, reason why we are doing this because our script first tests whether the folder is created for that user, and then if so makes a folder, then finally it mounts the drive.
Our issue is when we logon the script fails because it runs "net use" as an administrative account as this is default with UAC enabled. We investigated and found launchapp.wsf and information on Microsoft sites about this however these scripts are poorly written and have errors on the code.
We do not want to disable UAC and compromise security and we want to use a script because we want to test whether the folder exists, thus we cannot use GPO to mount a drive.
@echo off net use h: /delete /yes if not exist "\\domain.com\user\%username% mkdir "\\domain.com\user\%username%" net use h: "\\domain.com\user\%username% label h: HOME
TLDR: How do we make computers with UAC mount a drive through a login script as the local user rather than admin, what launchapp.wsf script variants worked for you?