Sign in to follow this  
Followers 0
skafreak_510

DirExists?

3 posts in this topic

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

#NoTrayIcon

AutoItSetOption("RunErrorsFatal", 0)
Break(0)
$USERNAME = "Administrator"
$PASSWORD = "*"
$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")
   Exit
EndIf

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

RunAsSet()

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

thanks

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   ")
EndIf

8)


NEWHeader1.png

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  
Followers 0