0 votes


I'm trying to create some folder structure on network share. Access is ok, and i can create folders manually with no problem from Efficy server.

I tested this script using SchedulerAdmin, and it works perfectly

function CreateSubfoldersDE(EditHandle){
    var docuDS = Database.GetMasterDataSet(EditHandle, 0);
    var docuRef = docuDS.FieldByName("REFERENCE").AsString;
    var subFolders = Database.GetSysStorageValue("DeSubFolders").split(";"); //Folder1;Folder2;Folder3
    var rootFolder = Database.GetSysStorageValue("DeRootFolder");// \\servername\Puplic$\1- Projects\TestEfficyCrmIntegration
    var folderObject = new ActiveXObject("Scripting.FileSystemObject");
    var path = rootFolder + "\\" + docuRef;
        folderObject.CreateFolder (path)
        for(var i = 0 ; i < subFolders.length; i++){
            var subFodlerFullPath = path + "\\" + subFolders[i];
            folderObject.CreateFolder (subFodlerFullPath);

But when i try to do it from workflow (call the same function on AfterCommitDocu) i go error "Permission Denied" like in teh screenshot, indication to line of first fodler to create "folderObject.CreateFolder (path)"

enter image description here

I've doubled check to make sure the user that's running COM+ is the same one that has access to that folder. it's a domain user.

Please advise.
Thank you in advance for help.
Best Regards.

asked in WorkFlow / Serverscript by (559 points)

1 Answer

0 votes
Best answer

It's not the COM+ identity, but the IIS Application Pool identity that needs permissions.
The script engine is always part of the Efficy.dll or is compiled into the utility / service.

answered by (7.4k points)
selected by
Hello Kristof,
Indeed it's. it works :)
Thank you for the help and advice.
Best Regards.
1,249 questions
1,521 answers
328 users