Jump to content
Sign in to follow this  
gkrapp

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

Recommended Posts

gkrapp

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

Share this post


Link to post
Share on other sites
Jos

maybe try:

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

Jos muttley


Visit the SciTE4AutoIt3 Download page for the latest versions  - Beta files                                How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites
gkrapp

Hi Jos,

it works perfectly! Thank you for this support!

Greetz

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  

×