Code: Select all
::;7::
If RunAsAdmin("FileCopy, C:\Dropbox\AppsPanelBL.dll, C:\Program Files (x86)\Common Files\Adobe\Adobe Desktop Common\AppsPanel\AppsPanelBL.dll")
{
MsgBox, The file was copied successfully.
}
else
{
MsgBox, There was an error copying the file.
}
return
RunAsAdmin(command)
{
shell := ComObjCreate("Shell.Application")
if !shell.IsRestricted("System", "EnableLUA")
{
try
{
shell.ShellExecute(command, "", "", "runas")
return true
}
catch
{
; Error occurred while elevating
}
}
return false
}