Sign in to follow this  
Followers 0
TheGam

How to Create Directories and Change Permission

5 posts in this topic

Hi All,

I'm new to AutoIT and am so far loving it!! I have scripted in various languages so the syntax is intuative and easy to follow.

I have just used the RunAsSet to be able to run an EXE as admin to uninstall a program that requires admin rights and it all works fine.

I now need to be able to create a Directory on the C: Drive (Which only local Admins can do) and then set the ACL to EVERYBODY change access.

Using the dircreate I can create it (It works I think cos I am local admin), but when trying to run cacls through Autoit, it doesn't seem to run.

Please would someone be able to point me in the right direction to do this on a machine the user is not an Admin. Also I wouldn't mind knowing how to see the output from the command propmt when debugging this kind of stuff.

Any Help very appreciated!!!

Share this post


Link to post
Share on other sites



Hello as far as i know there is no Function to Change Permision with Native Autoit Script But You Can Use

XCALC From Microsoft This is a Command line that allow you to add remove and change ntfs premision and share premision

take a look at that:

http://www.ss64.com/nt/xcalcs.html

and there is an VBS Script that do the same thing but its little hard for me to convert it to Autoit Script

Krikov


[topic="63488"][font="Arial"]Krikov Tray Quick Menu[/font][/topic]

Share this post


Link to post
Share on other sites

Thanks foir the speedy replies guys!!

Before I look into either of these, can you confirm what ones if any can be run as a different user to which is logged in.

The reason for this, is I would like to do this via the logon and script and most users aren't local admins.

Thanks!!

Share this post


Link to post
Share on other sites

TheGam in my work i use the XCALC at the logon script so when you use the RunAsSet You can do anything

no problem for you

RunAsSet ( "user", "domain", "password" )
Run("Xcalc")

Krikov


[topic="63488"][font="Arial"]Krikov Tray Quick Menu[/font][/topic]

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