Jump to content

copy to program files


 Share

Recommended Posts

can u use the dircreate and the filecopy/fileinstall command as a certain user??

cause i have to install some thing in the program files but it isnt allowed to change the folders/ add files to it?

how to do this with a runasset command (i have admin account on pc)

Link to comment
Share on other sites

Hi,

Try this part.

(found on the forum once)

$RUN = 0
If $CMDLINE[0] = 1 Then $RUN = $CMDLINE[1]
; set to admin mode
If $RUN = 0 Then
  If Not IsAdmin() Then
     RunAsSet($USERNAME, @ComputerName, $PASSWORD)
  ; start the script program (itself) again but now in Adminmode...so all done tasks will run in Adminmode
     Run('"' & @ScriptFullPath & '" " 1"')
     If @error = 1 Then
        MsgBox(48, "Error", "cannot start Admin mode.")  
     EndIf
     Exit
  EndIf
EndIf
What about Windows without using AutoIt ?It would be the same as driving a car without an steering Wheel!
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...