


14.In Safe Mode click on the Administrator. The script on this link makes slightly different VBS calls as you'll notice, which for some reason circumvents the issue with spaces.InitTagRenderer("".split(" "), "". Startup Settings window comes up again after the Windows restart, press 4 on the keyboard to start in the Safe Mode.

This issue seems to be inherent in the way VBS handles these paths but on the below link there's an even better VBS-based solution for invoking UAC that runs from within a single script without the need for a workaround like this using file arguments and that also supports spaces in file paths: Go to Start -> All Programs -> SAP Business One -> Server Tools and then right click on Service Manager then click on Run as Administrator to start the SAP B1. Additionally, AFAIK Matt's script doesn't support spaces in file paths and this limitation also applies to my modification of this script. My modification uses two file arguments as you can see, which isn't particularly elegant but does the job (and you can always hide them away at the tail end by reserving the first few arguments using dummy placeholders). :: # START OF YOUR OWN BATCH SCRIPT BELOW THIS LINE # If '%1'='ELEV' (shift & goto gotPrivileges)ĮCHO Set UAC = CreateObject^("Shell.Application"^) > "%temp%\OEgetPrivileges.vbs"ĮCHO UAC.ShellExecute "!batchPath!", "ELEV", "", "runas", 1 > "%temp%\OEgetPrivileges.vbs" If '%errorlevel%' = '0' ( goto gotPrivileges ) else ( goto getPrivileges )

I made this slight modification to Matt's script to enable it to run from within a single script (just add this to the beginning of any script requiring UAC invocation), but read below the code for an even better solution that I've found on a blog: :: # START UAC SCRIPT #
