Jump to content

Recommended Posts

Posted

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):

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

ProcessWaitClose($pid1)

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

ProcessWaitClose($pid3)

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

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
  • Recently Browsing   0 members

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