skysel Posted March 18, 2009 Share Posted March 18, 2009 Below is the code I'm trying to get it to work. Somehow it fails and I can't figure out what is wrong... Yet again, I ask kindly for your help expandcollapse popup#include <GUIConstants.au3> #Include <File.au3> #Include <Array.au3> $sFilePath = "C:\PELogonNames.txt" Dim $usernames $intWindowWidth = round(200, 0) $intWindowHeight = round(130, 0) $objWindow = GUICreate("Directories", $intWindowWidth, $intWindowHeight) GUISetState() $Roaming = GUICtrlCreateButton("Roaming", 40, 100, 120, 25) GuiSetState() While 1 $Msg = GUIGetMsg() Switch $msg Case $Roaming _FileReadToArray($sFilePath, $usernames) For $i = 1 to $usernames[0] DirCreate('C:\Profiles\' & $usernames) ProgressOn("Progress Meter", "", "0 percent") RunWait("CACLS C:\Profiles\" & $usernames & " /E /T /C /G " & $usernames & ':F', '', @SW_LOCK) RunWait("cacls.exe C:\Profiles\" & $usernames & " /E /R 'CREATOR OWNER'", '') ;RunWait('dirquota.exe quota add /path:"C:\Profiles\"' & $usernames & ' /sourcetemplate:"_TUS - 300 MB - Profiles"', '',@SW_HIDE) ProgressSet( Round(1 / 1 * 100, 0), Round(1 / 1 * 100, 0) & " percent") ProgressSet(100, "Done", "Complete") Sleep(500) ProgressOff() Next Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd Link to comment Share on other sites More sharing options...
skysel Posted March 18, 2009 Author Share Posted March 18, 2009 Ah stupid me I totaly forgot to put [$i] besides the $usernames Works now. Link to comment Share on other sites More sharing options...
skysel Posted March 18, 2009 Author Share Posted March 18, 2009 Hmm..Worked on my computer moments ago, copied to server..doesn't work.. now it doesn't work at my local computer also...am I missing something? Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now