Help creating apple script to create folder and set access levels
I'm trying to create folders in FileMaker Pro using apple script and need some help in setting the access level for the folders. I want to set both Staff and everyone to Read and Write access. Secondly I would like to have a function key set on the desktop to create new folders and set that same access level. The default access is Read and I can not find a way to change that.
Thanks
I'm trying to create folders in FileMaker Pro using apple script and need some help in setting the access level for the folders. I want to set both Staff and everyone to Read and Write access. Secondly I would like to have a function key set on the desktop to create new folders and set that same access level. The default access is Read and I can not find a way to change that.
Thanks
Similar Messages
-
Apple script to copy folder contents
I am looking for help to create an apple script, or automator task that will copy the contents of a specified folder and paste them into another specified folder. There will just be a couple of files within this folder, and each time it creates the duplicate I dont want it to erase pervious copies already created within the destination folder, so it will probably need to change the name of the file (....1, ...2, ....3, something like that).
I tried setting up this automator app
You have to drop folder A onto the app ignored for it to do it's thing. Dropping folder A
on to it 3 times in a row gives this in folder B.
You can experiment with the app to get what you want. One should be able to create that script as a folder Action so that any file dropped into folder A will automatically get copied to folder B. I was unable to get that to work. Maybe someone with more experience with Automator can help in that area. -
Creating publishing page in specific folder and with custom page layout using JSOM
Hi!
I have a site collection under my root, in which I have a page library with a folder inside. I want to create a publishing page inside the folder using JSOM. The API provides the following information on the three possible ways of how you can create a publishing
page.
PublishingPageInformation with all defaults.
PublishingPageInformation.Name and PublishingPageInformation.PageLayoutListItem.
PublishingPageInformation.Name, PublishingPageInformation.PageLayoutListItem and PublishingPageInformation.Folder.
Source - SP.Publishing.PublishingPageInformation Properties (sp.publishing)
Since I want to create the page in a specific folder in the page library, I have to go for the last option.
I have a function call chain that look as follows:
getLanguageID(webUrl, languageID)
.then(function(resolveVal) {
language = resolveVal;
return checkPageExist();
.then(getEditorialNewsFolderJSOM)
.then(getAssociatedPageLayoutListItem)
.then(addPublishingPage)
The first two methods,
getEditorialNewsFolderJSOM
getAssociatedPageLayoutListItem
fetches the required data as SP.Folder- and SP.ListItem-objects.
The problem occurs when
addPublishingPage
is called. This method, in turns calls this function.
var pageInfo = new SP.Publishing.PublishingPageInformation();
pageInfo.set_name(publishPage.title);
pageInfo.set_pageLayoutListItem(pageLayoutListItem);
pageInfo.set_folder(editorialNewsFolder);
pageCreationContext.newPage = pubWeb.addPublishingPage(pageInfo);
clientContext.load(pageCreationContext.newPage);
clientContext.executeQueryAsync(function() {
publishPage.isPageCheckOut = true;
resolve();
}, function(error) {
reject(precio.intranet.resource.errCreateContent_addPublishPage);
The error happens when this function is called with the page information object.
SP.Publishing.PublishingWeb.addPublishingPage(pageInformation)
Error:
Cannot read property '$2t_0' of undefined
and it happens in SP.Runtime.js.
I've tried this
sample code from the MSDN-team, and added the pagelayout and folder properties, but it renders the same error.
Creating a page directly in the page library with a blank SP.PublishingPageInformation object works perfectly fine!
What could possibly be wrong? The error isn't something that I can debug myself since it happens in SP.Runtime.js, and the documentation for this is very sparse!
Any help on how to resolve this issue would be helpful!Hi Vinay,
This may be useful:
https://blogs.oracle.com/jdevotnharvest/entry/remote_task_flow_vs_wsrp -
Creating AppleScript That Watches a Folder and Adds New Files to iTunes
Is it possible to create a AppleScript that watches a folder and automatically adds any new files placed into the folder to my iTunes library?
Probably. You can take a look through Doug's AppleScripts for iTunes and see if there's anything pre-existing you could use or modify.
An alternative might be Hazel which says it can do that. It's not free, but if it works it would probably be a lot easier.
Regards. -
Help with Apple Script rewrite
I can't wrap my brain around applescript. I found this program mp3gain. It is written in applescript. I just need it to go to folder abc download and run, then save it to a folder names abc done. I can reset the db from the script. Any help would be great. All the itunes stuff can be deleted.
-- MacMP3Gain.applescript
-- MacMP3Gain
-- Created by Bery Rinaldo on Tue Jan 14 2003.
-- Copyright (c) 2003-2005 Bery Rinaldo. All rights reserved.
-- This AppleScript is used to wrap the command line version of mp3gain with a quaint GUI.
-- This program is free software; you can redistribute it and/or modify it under the terms
-- of the GNU General Public License as published by the Free Software Foundation; either
-- version 2 of the License, or (at your option) any later version.
-- This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
-- without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-- See the GNU General Public License for more details.
-- You should have received a copy of the GNU General Public License along with this program; if not,
-- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-- This program includes a binary version of aacgain downloaded from here
-- http://www.hydrogenaudio.org/forums/index.php?act=Attach&type=post&id=1461
-- aacgain version 1.4.0, derived from mp3gain version 1.4.6
-- copyright(c) 2001-2004 by Glen Sawyer
-- AAC support copyright(c) 2004 David Lasker, Altos Design, Inc.
-- uses mpglib, which can be found at http://www.mpg123.de
-- AAC support uses faad2 (http://www.audiocoding.com), and
-- mpeg4ip's mp4v2 (http://www.mpeg4ip.net)
-- Check out the MP3Gain/AACgain web sites:
-- http://mp3gain.sourceforge.net/
-- http://altosdesign.com/aacgain/
-- Version 1.0 - Initial release
-- Version 1.01 - Added status updates to display while mp3gain is running
-- Version 1.1 - 13-Feb-2003 - Added iTunes playlist support
-- Version 1.2 - 18-Feb-2003 - Added "Process Sub-folders" option to process all folders below the selected folder.
-- Version 1.3 - 20-Feb-2003 - Fixed program hang when "Allow Clipping" checkbox was unchecked.
-- Version 1.4 - 23-Feb-2003 - Added target MP3 Gain dB value, added preferences file support for all controls
-- Version 1.5 - 26-Feb-2003 - Integrate "Be Nice" feature from Michael Heinz. Added "Cancel" feature.
-- Version 1.6 - 28-Feb-2003 - Minor GUI tweaks to "Be Nice" an "Target" buttons to disable while running.
-- Version 1.7 - 01-Nov-2003 - Update to mp3gain 1.4.3, use -k (autoClip) option when "Allow Clipping" is unchecked
-- Version 1.8 - 09-Nov-2003 - Update run_mp3gain.pl to handle iTunes 4 playlists
-- Version 1.9 - 23-Aug-2005 - Update for Tiger & AAC
property ref_folder : ""
property ref_playlist : ""
property running : false
property mp3gain : ""
property run_mp3gain : ""
on clicked theObject
if name of theObject is "Start" then
if running is true then
set title of button "Start" of window "MainWindow" to "Start"
try
set pids to do shell script "ps -auxww | egrep \"" & run_mp3gain & "|" & aacgain & "\" | grep -v grep | awk '{ print $2 }' | xargs kill"
end try
set running to false
tell progress indicator "BusyBar" of window "MainWindow" to stop
set visible of progress indicator "BusyBar" of window "MainWindow" to false
tell window "MainWindow" to update
set contents of text field "StatusMessage" of window "MainWindow" to "Processing aborted."
set enabled of button "Start" of window "MainWindow" to false
set enabled of button "Choose Folder" of window "MainWindow" to true
set enabled of button "Choose Playlist" of window "MainWindow" to true
set enabled of button "Clip" of window "MainWindow" to true
set enabled of button "Sub" of window "MainWindow" to true
set enabled of button "Target" of window "MainWindow" to true
set enabled of button "Nice" of window "MainWindow" to true
set targetchecked to state of button "Target" of window "MainWindow" as integer
if targetchecked = 1 then
set enabled of text field "TargetValue" of window "MainWindow" to true
set targetvalue to 75
try
set targetvalue to contents of default entry "TargetValue" of user defaults as integer
end try
set contents of text field "TargetValue" of window "MainWindow" to targetvalue
else
set enabled of text field "TargetValue" of window "MainWindow" to false
set contents of text field "TargetValue" of window "MainWindow" to 89
end if
set enabled of matrix "ARmatrix" of window "MainWindow" to true
set ref_folder to ""
set contents of text field "FolderPath" of window "MainWindow" to "No folder selected"
set ref_playlist to ""
set contents of text field "PlaylistName" of window "MainWindow" to "No playlist selected"
tell window "MainWindow" to update
else
set clip to (state of button "Clip" of window "MainWindow") as integer
set albumradio to current row of matrix "ARmatrix" of window "MainWindow"
set options to " -q "
if clip = 1 then
set options to options & "-c "
else
set options to options & "-k "
end if
if albumradio = 1 then
set options to options & "-a "
else
set options to options & "-r "
end if
set nicechecked to state of button "Nice" of window "MainWindow" as integer
set targetchecked to state of button "Target" of window "MainWindow" as integer
if targetchecked = 1 then
set targetdb to integer value of text field "TargetValue" of window "MainWindow"
set targetparam to targetdb - 89
set options to options & "-m " & (targetparam as string) & " "
end if
set can_run to false
if ref_playlist is not equal to "" then
set the playlist_text to ""
tell application "iTunes"
set the track_count to the count of tracks of playlist ref_playlist
repeat with z from 1 to the track_count
tell track z of playlist ref_playlist
copy {database ID} to {dbid}
end tell
set the playlist_text to the playlist_text & (dbid as string) & ","
end repeat
end tell
activate
if track_count = 0 then
display dialog "The playlist is empty." buttons {"OK"}
else
set options to options & "-P " & playlist_text
set can_run to true
end if
else
set folder_path to POSIX path of ref_folder
set sub to (state of button "Sub" of window "MainWindow") as integer
if sub = 1 then
set options to options & "-S -F \"" & folder_path & "\""
set can_run to true
else
set command to "cd \"" & folder_path & "\" ; ls *.mp3 *.m4a 2> /dev/null"
set output to do shell script command
if output is equal to "" then
display dialog "No MP3/M4A files were found in the specified folder." buttons {"OK"}
else
set options to options & "-F \"" & folder_path & "\""
set can_run to true
end if
end if
end if
if can_run is equal to true then
set enabled of button "Start" of window "MainWindow" to false
set enabled of button "Choose Folder" of window "MainWindow" to false
set enabled of button "Choose Playlist" of window "MainWindow" to false
set enabled of button "Clip" of window "MainWindow" to false
set enabled of button "Sub" of window "MainWindow" to false
set enabled of button "Target" of window "MainWindow" to false
set enabled of button "Nice" of window "MainWindow" to false
set enabled of text field "TargetValue" of window "MainWindow" to false
set enabled of matrix "ARmatrix" of window "MainWindow" to false
set visible of progress indicator "BusyBar" of window "MainWindow" to true
set uses threaded animation of progress indicator "BusyBar" of window "MainWindow" to true
tell progress indicator "BusyBar" of window "MainWindow" to start
tell window "MainWindow" to update
if nicechecked = 1 then
set command to "nice -n 1 "
else
set command to ""
end if
set command to command & "\"" & run_mp3gain & "\" " & options & " > /tmp/.mp3gain_output 2>&1"
--display dialog command
try
ignoring application responses
do shell script command & "&"
end ignoring
end try
set running to true
set title of button "Start" of window "MainWindow" to "Cancel"
set enabled of button "Start" of window "MainWindow" to true
tell window "MainWindow" to update
end if
end if
else if name of theObject is "Choose Playlist" then
tell application "iTunes"
set allPlaylists to name of user playlists
end tell
activate
set playlist_choice to choose from list allPlaylists with prompt "Which playlist?" multiple selections allowed 0
if playlist_choice is false then --nothing selected, just stop
set ref_playlist to ""
set contents of text field "PlaylistName" of window "MainWindow" to "No playlist selected."
else
set ref_playlist to playlist_choice as string
set contents of text field "PlaylistName" of window "MainWindow" to ref_playlist
set ref_folder to ""
set contents of text field "FolderPath" of window "MainWindow" to ""
set state of button "Sub" of window "MainWindow" to false
set enabled of button "Sub" of window "MainWindow" to false
set enabled of button "Start" of window "MainWindow" to true
tell window "MainWindow" to update
end if
else if name of theObject is "Sub" then
set ischecked to state of button "Sub" of window "MainWindow" as integer
try
set contents of default entry "Sub" of user defaults to ischecked
end try
else if name of theObject is "Clip" then
set ischecked to state of button "Clip" of window "MainWindow" as integer
try
set contents of default entry "Clip" of user defaults to ischecked
end try
else if name of theObject is "Nice" then
set nicechecked to state of button "Nice" of window "MainWindow" as integer
try
set contents of default entry "Nice" of user defaults to nicechecked
end try
else if name of theObject is "Target" then
set targetchecked to state of button "Target" of window "MainWindow" as integer
try
set contents of default entry "Target" of user defaults to targetchecked
end try
if targetchecked = 1 then
set enabled of text field "TargetValue" of window "MainWindow" to true
set targetvalue to 89
try
set targetvalue to contents of default entry "TargetValue" of user defaults as integer
end try
set contents of text field "TargetValue" of window "MainWindow" to targetvalue
else
set enabled of text field "TargetValue" of window "MainWindow" to false
set contents of text field "TargetValue" of window "MainWindow" to 89
end if
else if name of theObject is "ARmatrix" then
set albumradio to current row of matrix "ARmatrix" of window "MainWindow" as integer
try
set contents of default entry "AlbumRadio" of user defaults to albumradio
end try
else if name of theObject is "Choose Folder" then
set ref_folder to choose folder with prompt "Choose the folder where the MP3/M4A files are stored"
set contents of text field "FolderPath" of window "MainWindow" to ref_folder as string
set ref_playlist to ""
set contents of text field "PlaylistName" of window "MainWindow" to ""
set state of button "Sub" of window "MainWindow" to true
set enabled of button "Sub" of window "MainWindow" to true
set enabled of button "Start" of window "MainWindow" to true
tell window "MainWindow" to update
end if
end clicked
on will finish launching theObject
-- display dialog "IN the will finish launching thing"
set running to false
set mypath to POSIX path of (path to me as string)
set aacgain to mypath & "Contents/Resources/aacgain"
set run_mp3gain to mypath & "Contents/Resources/run_mp3gain.pl"
try
make new default entry at end of default entries of user defaults with properties {name:"AlbumRadio", contents:1}
end try
set albumradio to 1
try
set albumradio to contents of default entry "AlbumRadio" of user defaults as integer
end try
set current row of matrix "ARmatrix" of window "MainWindow" to albumradio
my getpreferencebutton("Clip")
my getpreferencebutton("Sub")
my getpreferencebutton("Target")
my getpreferencebutton("Nice")
try
make new default entry at end of default entries of user defaults with properties {name:"TargetValue", contents:89}
end try
set targetvalue to 89
try
set targetvalue to contents of default entry "TargetValue" of user defaults as integer
end try
set contents of text field "TargetValue" of window "MainWindow" to targetvalue
set targetchecked to state of button "Target" of window "MainWindow" as integer
if targetchecked = 1 then
set enabled of text field "TargetValue" of window "MainWindow" to true
else
set enabled of text field "TargetValue" of window "MainWindow" to false
set contents of text field "TargetValue" of window "MainWindow" to 89
end if
set visible of progress indicator "BusyBar" of window "MainWindow" to false
tell window "MainWindow" to update
set visible of window "MainWindow" to true
end will finish launching
on will close theObject
quit
end will close
on changed theObject
set targetdb to integer value of text field "TargetValue" of window "MainWindow"
try
set contents of default entry "TargetValue" of user defaults to targetdb
end try
end changed
on idle
-- display dialog "idle " & running
if running is true then
set psout to ""
set stout to ""
try
set psout to do shell script "ps -auxww | grep \"" & run_mp3gain & "\" | grep -v grep"
set stout to do shell script "grep -a -v '^$' /tmp/.mp3gain_output | tail -1"
end try
if stout = "" then
if ref_playlist is not equal to "" then
set stout to "Processing iTunes playlist " & ref_playlist & " ..."
else
set stout to "Processing folder " & ref_folder & " ..."
end if
else
set stlen to length of stout
if stlen > 75 then
set firstpart to (characters 1 through 30 of stout) as string
set startlast to stlen - 30
set lastpart to (characters startlast through stlen of stout) as string
set stout to firstpart & "..." & lastpart
end if
end if
set contents of text field "StatusMessage" of window "MainWindow" to stout
tell window "MainWindow" to update
if psout is equal to "" then
set running to false
set title of button "Start" of window "MainWindow" to "Start"
tell progress indicator "BusyBar" of window "MainWindow" to stop
set visible of progress indicator "BusyBar" of window "MainWindow" to false
tell window "MainWindow" to update
set contents of text field "StatusMessage" of window "MainWindow" to "Processing complete."
set enabled of button "Start" of window "MainWindow" to false
set enabled of button "Choose Folder" of window "MainWindow" to true
set enabled of button "Choose Playlist" of window "MainWindow" to true
set enabled of button "Clip" of window "MainWindow" to true
set enabled of button "Sub" of window "MainWindow" to true
set enabled of button "Target" of window "MainWindow" to true
set enabled of button "Nice" of window "MainWindow" to true
set targetchecked to state of button "Target" of window "MainWindow" as integer
if targetchecked = 1 then
set enabled of text field "TargetValue" of window "MainWindow" to true
else
set enabled of text field "TargetValue" of window "MainWindow" to false
set contents of text field "TargetValue" of window "MainWindow" to 89
end if
set enabled of matrix "ARmatrix" of window "MainWindow" to true
set ref_folder to ""
set contents of text field "FolderPath" of window "MainWindow" to "No folder selected"
set ref_playlist to ""
set contents of text field "PlaylistName" of window "MainWindow" to "No playlist selected"
tell window "MainWindow" to update
end if
end if
return 1
end idle
on will quit theObject
if running is true then
try
set pids to do shell script "ps -auxww | egrep \"" & run_mp3gain & "|" & aacgain & "\" | grep -v grep | awk '{ print $2 }' | xargs kill"
end try
end if
end will quit
on getpreferencebutton(buttonname)
try
-- this is how to initialize the preferences mechanism...it will not reset the value if one exists already
make new default entry at end of default entries of user defaults with properties {name:buttonname, contents:0}
end try
set value to 0
try
set value to contents of default entry buttonname of user defaults as integer
end try
if value = 1 then
set state of button buttonname of window "MainWindow" to true
else
set state of button buttonname of window "MainWindow" to false
end if
end getpreferencebuttonhi riker123
it is written in applescript, but it is written for AppleScript Studio & Xcode which has now been superseded by AppleScriptObjC & Xcode, used under OSX 10.6
Looking at your Mac specs you could use AppleScript Studio & Xcode
to set this code up, you will find a copy of Xcode on your OSX installer disk.
Not to discourage you but Xcode needs a bit of work to get the hang off,
but that's part of the fun.
Budgie -
Hi,
I found this Apple script online and here's how it works:
tell application "QuickTime Player"
activate
try
if not (exists document 1) then display dialog "Please open a QuickTime movie." buttons {"Cancel"} default button 1 with icon 1
set thefile to (choose file name)
save document 1 in thefile
close document 1
end try
end tell
+I run the Apple script+
*1. It prompts me to open a movie file in Quicktime*
+I open a movie in Quicktime+
*2. It prompts me for an name and directory to save the new file in*
+I enter a name and directory+
*3. It saves a new reference movie in said directory with said name*
This is useful if I want to customize every file, but unfortunately, I just want to mass create reference movies for a whole bunch of files.
What I am looking for is for an Apple script that is a drag and drop application, so I can drop say 100 movie files or so, and have the Apple script create reference movie files with the same name and in the same directory automatically with no prompts.
Since I am unfamiliar with Apple script I was wondering if someone would be able to edit my existing script to do what I want.
Thanks so much for your help!Use Automator. It's great for repetitious tasks (like the one you've described), and it's very user-friendly. Open Automator, create a new workflow that executes the action you want, and you can apply that action to the resources you wish to edit.
Good resource here:
http://bit.ly/ -
Help with two scripts - Mounting remote DMG and Checking which network I'm connected to
Hey guys, I need some help with two separate scripts:
1. The first script I'm trying to create to mount a DMG stored remotely on another Mac using an AppleScript or shell script. Using the following:
set cmd to "hdiutil mount 'afp://username:[email protected]/Lion/Users/username/Desktop/Test.sparseim age'"
do shell script cmd
results in the following error:
error "hdiutil: mount failed - not recognized" number 1
I'm not very experienced regarding AppleScript or using hdiutil, could somebody point out what's wrong with my script?
2. The second script I'm working on to try and essentially prevent the 'Could Not Find Server' Finder dialog when a network mount is unavailable. I guess what I'd like it to do is detect which network I'm connected to, and if I'm connected to the correct network, then mount the shares, otherwise just fail silently without any errors. From the searching I've done, using try statements should do this, but they do not, and I'm still presented with an error dialog after the server cannot be found.
Does anybody have any suggestions on this script? Also, I've seen some tips regarding detecting which wireless network the Mac is connected to, which could work, but what about when connected via Ethernet?
Thanks!Edit: I need to clarify on my first script request:
I need to mount the DMG on the remote Mac, not on the Mac I'm running the script from. -
New folder and modify access rights
I have played around with a script.
My script looks like this:
#Variables
$GroupNameTIA="F_KSMCommon-common-ScanTIA_m"
$Directory = Read-Host "Folder name: "
$DirectoryPath = "z:\$Directory"
#Mount directory
Net use Z: \\stg-w75\ksmcommon\common\ScanTIA
#Create new folder
New-Item -Type directory -path $DirectoryPath
takeown.exe /F $DirectoryPath
#Read and modify ACL
$ACL = Get-Acl $DirectoryPath
$ACL.SetAccessRuleProtection($True, $True)
Set-Acl
$DirectoryPath $ACL
$user_Account = $GroupNameTIA
$Acl = (Get-Item $DirectoryPath).GetAccessControl(“Access”)
$Ar = New-Object system.Security.AccessControl.FileSystemAccessRule($user_account,
“FullControl”, “ContainerInherit, ObjectInherit”, “None”, “Allow”)
$Acl.Setaccessrule($Ar)
Set-Acl
$DirectoryPath $Acl
$Ace = New-Object System.Security.AccessControl.FileSystemAccessRule (
$GroupNameTIA,
"Delete",
[System.Security.AccessControl.InheritanceFlags]::None,
[System.Security.AccessControl.PropagationFlags]::None,
[System.Security.AccessControl.AccessControlType]::Allow
$SD = Get-Acl $DirectoryPath
$SD.RemoveAccessRule($Ace)
(Get-Item
$DirectoryPath).SetAccessControl($SD)
#delete mounted directory
net use /d z:
If I run this script I got an error:
Set-Acl : Attempted to perform an unauthorized operation.
At C:\PSScripts\NeuerScanOrdner.ps1:187 char:12
+ Set-Acl <<<< $DirectoryPath $ACL
+ CategoryInfo : PermissionDenied: (Z:\tia-test5:String)
[Set-Acl], UnauthorizedAccessException
+ FullyQualifiedErrorId : System.UnauthorizedAccessException,Microsoft.PowerShell.Commands.SetAclCommand
Set-Acl : Attempted to perform an unauthorized operation.
At C:\PSScripts\NeuerScanOrdner.ps1:193 char:12
+ Set-Acl <<<< $DirectoryPath $Acl
+ CategoryInfo : PermissionDenied: (Z:\tia-test5:String)
[Set-Acl], UnauthorizedAccessException
+ FullyQualifiedErrorId : System.UnauthorizedAccessException,Microsoft.PowerShell.Commands.SetAclCommand
It makes no difference whether I let
the script run with an administator
account or "run as administrator".
Although I am the owner of the folder, I get this
error message.
I do not know why this happend. Whats wrong?Set-Acl is a flawed cmdlet. It often tries to call the API to write the security descriptor with the flags to change the owner and SACL, both of which require privilege activation (doesn't matter if your account has the privileges, they need to be enabled,
too). There are a few bugs about this on the Connect site.
I get a more descriptive error than you did when I try to run your script, but maybe those differences are due to different PowerShell versions. Anyway, I almost never use Set-Acl, and instead use the .SetAccessControl() method of the file object (which
you already did at least once in your script).
The following worked for me, so let me know if it doesn't work for you (make sure you put back in the part where the $DirectoryPath and $GroupNameTIA variables are defined):
$ACL = Get-Acl $DirectoryPath
$ACL.SetAccessRuleProtection($True, $True)
# Apply rule protection and get the SD again:
(Get-Item $DirectoryPath).SetAccessControl($ACL)
$ACL = Get-Acl $DirectoryPath
# Give group full control:
$Ar = New-Object system.Security.AccessControl.FileSystemAccessRule (
$GroupNameTIA,
"FullControl",
"ContainerInherit, ObjectInherit",
"None",
"Allow"
$ACL.SetAccessRule($Ar)
# Now remove delete rights from folder
$Ace = New-Object System.Security.AccessControl.FileSystemAccessRule (
$GroupNameTIA,
"Delete",
[System.Security.AccessControl.InheritanceFlags]::None,
[System.Security.AccessControl.PropagationFlags]::None,
[System.Security.AccessControl.AccessControlType]::Allow
$null = $ACL.RemoveAccessRule($Ace)
# Apply the changes:
(Get-Item $DirectoryPath).SetAccessControl($ACL)
The
PowerShellAccessControl module has a function called Set-SecurityDescriptor that works like Set-Acl, except it won't try to set the owner or SACL unless needed. -
Help required to implement Cisco 2504 WLC and 1042 Access Points
Hi,
My name is Vidya Sagar. I am new to Wireless technology. We are planning to implement Wireless in our office. I have given the requirements below. Kindly go through the details and let me know how to start.
We have purchased Cisco 2504 Wireless Controller (One) and Ciscon 1042 Access Points (Five). At present I am going to use 3 access points only.
I have attached a simple diagram of our office network. We have more than 30 VLANs configured in Core Switch, we are planning to give wifi access to only 3 VLANs.
1. VLAN 121 ( IP Segment - 10.52.121.0 /24)
2. VLAN 116 ( IP Segment - 10.52.116.0 /24)
3. VLAN 100 ( IP Segment - 192.168.100.0 /24) (Guest)
Please give me a implementation plan to do this. I would like to use LDAP or ACS for authentication purpose.
Regards,
Vidya SagarLets just do this simple first before you start using ACS as that will require a certificate installed on the ACS for using PEAP.
So first off, the WLC we will say is in vlan 10. When you are going through the startup wizard, make sure you define the vlan tag to 10 on the management interface. Make sure your virtual interface is an IP address that is not routed in your network, like an out of band IP.
Make sure the WLC time is correct or use NTP!!!!
Now you should be able to http or https to the WLC. I would upgrade the code to v7.4 and install the FUS image. Please reference this link for the upgrade procedure. You don't have to upgrade now... I would wait till you get everything working first.
http://www.cisco.com/en/US/docs/wireless/controller/release/notes/crn74.html
Now I would connect the APs on the same vlan as the WLC for now. Make sure there is dhcp on that subnet. Once the APs have joined, then you can move them to any subnet you want. Since you don't have many APs it would be okay to leave them in the same vlan as the WLC management or out them on any other vlan you choose. The APs will be connected to an access port NOT a trunk port!!!!
The WLC will need to be connected on a dot1q trunk port only allowing vlans 10,100,116,121. The 2504 running v7.4 will support LAG (etherchannel). Any ways, your switch port should look like this for example only
Interface gigabit1/0/1
description WLC2504
switch port trunk encapsulation dot1q
switchoort mode trunk
switch trunk allowed vlans 10,100,116,121
spanning-tree portfast trunk
channel-mode group 10 mode on << only for v7.4 if you use lag
Don't connect all four ports right now, just port one!!!!
Your Guest vlan, you will need to create an ACL to block traffic from accessing the internal network. You might want to allow dhcp and DNS bit I would leave it open first until you can verify everything is working.
Now on the WLC you need to create a dynamic interface for vlan 100, 116, and 121. If you click on the Controller tab in the GUI and click on interfaces on the left hand side, that will take you to where you can add/delete/modify your interfaces. When creating these interfaces, make sure you add the dhcp server IP address for the primary and or backup.
Now that you have your dynamic interfaces created, its time I create your SSID. Now click on the WLAN tab on the GUI and click on WLAN and then on the too right select Create New and then click go. Select WLAN on the drop down menu and then for the profile name I would use the SSID name also for simplicity.lean e the WLAN id to 1 for this and 2 for the next and so on. After defining these and clicking Apply you can now define your SSID. On the General tab, enable the status and leave the radio policy to all for now, you can decide later what you want to use. Choose your interface you wan to place this SSID on and enable Broadcast SSID for now and leave everything else alone. Now click on the Security tab and on the layer 2 Security, leave it at WPA + WPA2, only check WPA2 Policy and for WPA2 encryption choose AES only. Now go to the bottom of that screen and choose PSk. We will do pre shared key for now so you get to understand the setup and make sure everything is working first. Now on the PSK format, choose ASCII and put your pre shared key in the input box. Make this simple to for testing. You don't want to put in symbols or anything like that. When you are don with that, check apply on the top right and test.
Now you can repeat this with your other SSIDs just to test. Your guest network you can leave open for now to test open authentication.
Here are some links for the WebAuth feature:
https://supportforums.cisco.com/docs/DOC-13954
http://www.cisco.com/en/US/products/ps6366/products_tech_note09186a0080b1a506.shtml
Now if you want to use ACS with PEAP, here is some links for that:
https://supportforums.cisco.com/videos/2499
http://www.cisco.com/en/US/products/ps10315/products_configuration_example09186a0080bd1100.shtml
https://www.google.com/url?sa=t&source=web&cd=8&ved=0CFQQtwIwBw&url=http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DWk_bRdmsQlA&ei=_BEyUeCYM8TdqAHHsICAAw&usg=AFQjCNF8PiVBQK1Kipb4j8AzD153bKtmgA&sig2=smHhNVmCr2of2NzbnDhGmw
Well that is it, hopefully you can get the wireless up for testing and verifying everything works!
Sent from Cisco Technical Support iPhone App -
Can iDVD create disc images from VIDEO_TS folder, and burn them?
That first question is pretty self-explanatory.
Background is this: I've downloaded some video folders/files from forum/torrent trading websites. When finished, I have a VIDEO_TS folder, often an EXTRAS_TS folder as well. A while back, I downloaded the app DVD IMAGER to create a disc image. Yesterday that stopped working effectively, so maybe I need to re-download, but I was wondering if there's just a better way? I also downloaded the app called BURN, but can't see yet how that creates disc images.
Once I create that disc image, I need to burn it, and I was using Disk Utility for that. I'm really looking for some help and advice on the best way to perform these processes.
Thank you, and let me know if I need to post in another forum.Additionally, do you have experience w/ DVD Imager?
Nope. Like I said, Roxio's Toast Titanium is the top application (and is probably the one that most experienced people use). -
How to create a shortcut of a folder and put it on the desktop using LabVIEW?
Anyone done this before?
Hi Ian,
Please see forum post below, I believe you can find your answer here.
http://forums.ni.com/t5/LabVIEW/create-shortcut-folder-in-desktop/td-p/1060801
Thanks
Jack. W
Applications Engineer
National Instruments -
Help Needed: InDesign Scripting: PDF Multiple Files and Pages Import
I am looking for a script to merge two PDFs in InDesign CS3 (Mac or PC);
with an interesting twist for print production.
We have one PDF that is 408 pages. The second PDF is only one page.
What we need to accomplish is importing the 408-page PDF file into InDesign,
then inserting the second 1-page 408 times PDF AFTER every page of the first
file.
This will make a 816-page file, where every other page is the "generic" PDF.
I've used PDFplacer.jsx and it does a great job of bringing in a PDF to
InDesign. I'm hoping that there is another script to bring in the second
1-page PDF and have it place this PDF after every page of the file.
Does anyone know of a script that will accomplish this task?
I'd also consider having this same scenario done in Acrobat, and then
sending this new 816 page file to print, if there is any benefit to creating
the file this way.
Any help and suggestions would be greatly appreciated.
Jim Lukens-Gable
JHL4 at PSU.EDUThanks, Robin,
I am really a novice at scripting . . . would you be able to modify the script and then send it to me/post it here?
Thank you!
Jim L-G -
Help with apple script for Chapter Markers (on each edit)
Hi,
My goal:
Add for each edit in the sequence a chapter marker til the end of the sequence.
(Bonus track would be: Name the marker like the current clipname )
so far I could work it out, with a lot of googling.... but:
Not working: character "a" is not typed, no idea why ?
Not working: goto begin of sequnce at the beginning
And: I need something like a loop til the end of the sequence
help very appreciated !
thanks
P.S.: I work tith FCP 7
Here's my code so far:
tell application "Final Cut Pro"
activate
tell application "System Events"
delay 0.5
key code 34 using {shift down} #Go to Begin
delay 0.5
key code 125 # Arrow Down, next edit
delay 0.2
key code 46 #Create a marker
delay 0.2
key code 46 #Edit the marker title
delay 0.2
key code 48 # TAB
delay 0.2
key code 50 # <
delay 0.2
key code 8 using {shift down} # C
delay 0.2
key code 4 # h
delay 0.5
key code 128 # a
delay 0.2
key code 35 # p
delay 0.2
key code 17 # t
delay 0.2
key code 14 # e
delay 0.2
key code 15 # r
delay 0.2
key code 50 using {shift down} # >
delay 0.5
key code 76 #Enter, Get out of marker window
delay 0.5
key code 125 # Arrow Down
end tell
end tellUse Automator. It's great for repetitious tasks (like the one you've described), and it's very user-friendly. Open Automator, create a new workflow that executes the action you want, and you can apply that action to the resources you wish to edit.
Good resource here:
http://bit.ly/ -
How do I create new user table in program and then access it?
I am writing an application where I check for the existence of user objects when the add on starts and run the setup if the objects do not exist. I can create the user tables and fields but after the setup completes these objects still are not visible.
If the user objects exist when the add on is first run everything is detected correctly.
When a user object is added in SAP the user is eventually prompted to restart so I suspect something needs to happen prior to the add on being able to use the new fields.
Does the add on need to wait for the DI Server to perform some action? Do I need to just quit the add on's class and rerun it, disconnect and reconnect to the company, or get a new Application and/or company object?
What I want to do is figure out a way for the add on to automatically run the configuration if the user tables and fields do not exist yet and then kick off the regular add on code. I haven't seen anyone else's code so I don't know what is recommended or required here.
Thanks for any assistance!I found that the add on can validate the existance of the user fields if I disconnect from the company object, set the SAPbouiCOM.Application and SAPbobsCOM.Company objects to null, set the new application, context, and company objects, and reconnect once more.
HOWEVER...
I still have to wait for the client to be restarted manually before I can run any of the form I added to the menu.
So, I'd still like to know what the best practice is here. Should I just exit after setting up the tables and tell the user to restart SAP? -
Need Help with EEM script for monitoring Rx and Tx load on Link
Hello,
I'm trying to implement a script, which monitors the Tx and Rx Load on the Link and sends a syslog in case the load is exceeded 200 mark (i.e If Rx or Tx load > 200)
I have implemented the following script. But it is not giving the required results.
event manager applet test
event interface name Tunnel111 parameter rxload entry-val 200 entry-op gt entry-val-is-increment true poll-interval 5000
action 1.0 syslog msg "Increase Load On the Link"
I'm trying to monitor the load on Tunnel 111 which is mapped to WAN interface.
Router (Cisco 2821) has following IOS
c2800nm-advipservicesk9-mz.124-25g.binHello Joseph,
As per your suggestion, we made some changes in our script and the following script is working fine. Its giving the required syslogs when the load is exceeded.
event manager applet test
event interface name Tunnel111 parameter txload entry-val 200 entry-op gt entry-val-is-increment false poll-interval 5
action 1.0 syslog msg "Increased Load On the Link"
Your prompt assistance is really appriciated.
Maybe you are looking for
-
Can anyone help me get back into my numbers App please?
-
Elimination of Intercomp Inventory (Assets)Profit due to markup sales price
Hi all I have a question regarding elimination of inventory profit when a company sells inventory at a profit to another company within the same parent. The scenario is company A produces 100 quantities of Product X for $100 ($1 per Product X - Cost
-
Import problems with LR 4.4
I am suddenly having problems importing photos with Lightroom. I get an error message "Some import operations were not performed. The following files were not imported because they could not be read." Doesn't matter what camera I am using. I can open
-
Can I have music play on my site through all the pages?
I figured out how to add a song to a specific page but I would like to know if there is a way to have a series of songs start playing when someone enters my site and keep playing as they navigate through the pictures, pages, etc. I just got a MacBook
-
What a basis person can do for MSS and ESS on NW04s (EP7)?
Is it to add the business packages only. Please advise. Thanks!