Jump to content
Sign in to follow this  


Recommended Posts


Ok so I have a Dircopy script that runs as admin.


AutoItSetOption("RunErrorsFatal", 0)
$USERNAME = "Administrator"
$RUN = 0   ; run indicator

; retrieve the cycle from commandline
If $CMDLINE[0] = 1 Then $RUN = $CMDLINE[1]
If $RUN = 0 Then
   RunAsSet($USERNAME, @ComputerName, $PASSWORD)
   Run('"' & @ScriptFullPath & '" " 1"')
   If @error Then MsgBox(4096+32,"Error", "Error starting under admin mode")

DirCopy ( "\\local server\Ascrpts\", "C:\Program Files\Ascripts\" ,1)


I know the running it as admin isn't the problem because or the MsgBox part.

How do I check if

A. The Dir the cammand is copying from exist.

B. That it has been created.

C. If not what went wrong


Share this post

Link to post
Share on other sites

this might help

you could use it for the "source"

then use it to verify the "created"

; checks for exe folder
DirGetSize(@ProgramFilesDir & "\QTasc\XPClean\Settings\Skins\")
If @error = 1 Then
    DirCreate(@ProgramFilesDir & "\QTasc\XPClean\Settings\Skins\")
    MsgBox(0," Directory", " The directory did not exist and has been created   ")



Share this post

Link to post
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
Sign in to follow this  


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.