Jump to content
Sign in to follow this  

Need some help with RunAsWait (and DirCreate) at the Logon-Script

Recommended Posts


Hi all,

i'm currently working on a script (v3.2.12.1) that starts up at the end of our logonscript in our domain. The aim is to create 2 folders on each pc and grant access to everyone. All of our users do only have userrights. This is what i thought so far (scriptexample for 1 folder only):

$pid1 = RunAsWait ("Administrator", @ComputerName, "pwd_here", 0, "mkdir C:\AAA" )


$pid3 = RunAsWait ("Administrator", @ComputerName, "pwd_here", 0, "cacls.exe C:\AAA /T /E /G everyone:C" )


FileCopy ("\\server\share$\AAA\*.*", "C:\AAA", 0)

But of course mkdir.exe is not available cause it's part of the cmd-line. So i need a replacement or a workaround for this.

Another idea of me was to rerun the script a second time with RunAsWait and then doing the DirCreate-job and so on, but unfortunately local administrator accounts of the pc's do not have the right to access the NETLOGON-share where the script is starting from.

For i'm not the scripting specialist it seems that i need a hint from you. muttley

Share this post

Link to post
Share on other sites

Hi Jos,

it works perfectly! Thank you for this support!


Gerhard muttley

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