Having difficulty getting a script to run and hoping someone can help. I'm trying to run a script on Windows 7 PC's when users logon it checks to see if the Lync 2013 client is installed and if not install it. It should then check if the PC has Lync 2010 client installed and if so remove it.
If I run the script using Group Policy under the User Config / logon script the Lync 2013 client files are copied over but the installation fails due to insufficient permissions ( works if user is a local admin). If I run the script under the Computer Config / startup script nothing happens at all. I think the issue may be the syntax i'm using but i'm unable to figure it out.
IF EXIST "c:\Program Files\Microsoft Office\Office15\Lync.exe" GOTO END
IF EXIST "c:\Program Files(x86)\Microsoft Office\Office15\Lync.exe" GOTO END
ELSE GOTO ONE
net use v: \\Share\Files
xcopy "V:\Lync2013\x86\*" "c:\Files\Lync2013\" /s /e
c:\Files\Lync2013\setup.exe /adminfile setup.MSP
IF EXIST "c:\Program Files\Microsoft Lync\communicator.exe"
xcopy v:\Lync2010\* c:\Files\Lync2010\ /s /e
c:\Files\Lync2010\LyncSetup.exe /Uninstall /Silent
net delete v:
ELSE net delete v: