
'- If objFSO.FileExists(strLogFolder & "\" & sLogFilename) Then Set strlogfile = objFSO.OpenTextFile(strLogFolder & "\" & sLogFilename, ForAppending, True) Else Set strlogfile = objFSO.CreateTextFile(strLogFolder & "\" & sLogFilename) End If '' Create log file for trouble shooting VB script SLogFilename = "OneDrive_VBSUninstall.log" 'sLogFilename = "Test_App_1.0_VBSInstall.log" StrLogFolder = "C:\Logs" If not objFSO.FolderExists(strLogFolder) Then objFSO.CreateFolder strLogFolder End If

Set strUser = objFSO.GetFolder(strProfile) ProgramData = objShell.ExpandEnvironmentStrings("%PROGRAMDATA%") StrPathName = Left(wscript.ScriptFullName, Instrrev(wscript.ScriptFullName,"\"))ĪllDesktop = objShell.expandenvironmentstrings("%PUBLIC%" & "\Desktop\")ĪllStartMenu = objShell.expandenvironmentstrings("%PROGRAMDATA%" & "\Microsoft\Windows\Start Menu\Programs\") Set objFSO = CreateObject("Scripting.FileSystemObject") Set objShell = CreateObject("WScript.Shell") Comment or un-comment sections as required.ĭim objShell, objFSO, strPathName, strlogfile, strLogFolder, sArchitectureĭim AllDesktop, AllStartMenu, ProgramDataĭim strProfile, strUser, UserDesktop, AppData, LocalAppData, LocalLowAppData The script will create a verbose log file for the tasks/actions. This VBS scripts installs and/or removals ' This script has been created to assist with SCCM. I'm not a great scripter so but they work.
INSTALL MICROSOFT ONEDRIVE FOR BUSINESS WINDOWS 10 INSTALL
(Caveat - IIRC OneDrive changes are due for a unified sync client that serves both Personal & Business functions, plus ability to sign-into Personal Once Drive within Office apps)īut anyway, GPP notwithstanding, from memory I think OneDrive install changed depending on OS build, so I included all the stuff I've used.
