Jump to content

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

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

Link to comment
Share on other sites

  • Developers

maybe try:

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

Jos muttley

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

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...