Vbs:
Dim objfso, myfile
Set objfso = Createobject ("scripting. FileSystemObject ")
If not objfso. folderexists (designpath & "\" & projectname) then
Objfso. createfolder (designpath & "\" & projectname)
End if
If not objfso. folderexists (designpath & "\" & projectname & "\" & designname) then
Objfso. createfolder (designpath & "\" & projectname & "\" & designname)
End if
'Grant preview to the designer (layout Engineer) and owener (hardward Design Engineer)
Set objshell = Createobject ("wscript. Shell ")
'Msgbox "Grant. bat "& designpath &" \ "& projectname &" \ "& designname &" & PBA & "& designname &""""
Objshell. run "Grant. bat "& designpath &" \ "& projectname &" \ "& designname &" & PBA & "& designname &" PBA"
DOS :( Grant. BAT) file xcacls. vbs required
Cscript.exe xcacls. vbs % 1/T/e/g % 2: F
NET Share % 3 = % 1/Grant: % 2, change
'The xcacls. vbs support is required. If not, you need to download it on your own. This is an official Microsoft product. For systems later than win7, You need to modify the OS version to determine.