Jump to content

DiegoT

Members
  • Posts

    4
  • Joined

  • Last visited

DiegoT's Achievements

Seeker

Seeker (1/7)

0

Reputation

  1. Hi, tks for your reply. Yes, the UAC is enabled. Yes, the user that I specified have access for both, source and destination. I tested running cmd with this user and running the copy command and it worked fine.
  2. Hi AdamUL, thank you for your reply. So, I searched for "RunAs Admin Token" and I found some information about UAC, ConsentPromptBehaviorAdmin and #RequireAdmin but not that I can understand it in my case. I just need to run a copy from a network share to "C:\program files\..." and the current user don't have permission on "C:\program files\". Do you know a way to do it by autoit? Tks a lot!
  3. Thank you JohnOne. Do you have any ideia that how can I do this copy as administrative privilegies? I thought about calling a bat script but I believe this is not the most correct way to do this.
  4. Hi, I'm a new user of AutoIT and Forum then sorry if this question has already been answered, however I tried to find a solution to this problem and so far I have not found it. I just want to copy some files from a network share to Program Files directory, but to do this I need to run with administrative credentials, because it will run by common users. I try this script: #include <MsgBoxConstants.au3> #include <FileConstants.au3> #include <WinAPIFiles.au3> #include <Constants.au3> ;Credentials Local $sUserName = "adminuser" Local $sPassword = "adminpwd" Local $sDomain = "domain" RunAs($sUserName , $sDomain , $sPassword ,2,@ScriptName,@ScriptDir) MsgBox($MB_ICONWARNING, "Auto Atualização do AX-PDV", "Este procedimento irá atualizar o AX PDV. Feche o AX PDV antes de inicar a atualização e clique em OK. ESTE PROCEDIMENTO IRÁ INICIAR AUTOMATICAMENTE EM 10 SEGUNDOS OU CLICANDO EM OK", 10) ;Copia as dlls atuais da pasta POSUpdates do servidor da loja para as pastas raiz e Extensions FileCopy("\\homeserver\POSUpdates\Extension\","C:\Program Files (x86)\Microsoft Dynamics AX\60\Retail POS\Extensions",$FC_OVERWRITE)) FileCopy("\\homeserver\POSUpdates\Raiz\","C:\Program Files (x86)\Microsoft Dynamics AX\60\Retail POS",$FC_OVERWRITE)) but didn't work. Then I try it: RunAsWait($sUserName, $sDomain, $sPassword, 0, @ComSpec & " /c copy /Y \\homeserver\POSUpdates\Extension\ C:\temp", "", @SW_HIDE) but it didn't work too. What am I doing wrong? thank you all!
×
×
  • Create New...