Published in: Revolution
Turns on or off the flag that Windows uses when running a command statement in the shell as to whether it returns a warning when the current directory is a UNC path, or not. Returns empty if successful, and an error message if not successful.
on stsSetShellUNCCheck pState if the platform is not "Win32" then return "STSError: stsSetShellUNCCheck can only be used on Windows." else if pState is not among the items of "true,false" then return "STSError: 'State' param must be one of 'true,false'" if pState then if not(setRegistry("HKEY_CURRENT_USER\Software\Microsoft\Command Processor\DisableUNCCheck",binaryEncode("H*","01000000"),"dword")) then return "STSError: Attempting to set DisableUNCCheck returned:" && (the result) end if else if stsIsShellCheckingForUNC() then if not setRegistry("HKEY_CURRENT_USER\Software\Microsoft\Command Processor\DisableUNCCheck","") then return "STSError: Attempting to delete DisableUNCCheck returned:" && (the result) end if end if end if end if end stsSetShellUNCCheck
You need to login to post a comment.
