Question : How do I set permissions on folder app installed to so everyone has write access

How can I set the install folders permission so everyone has write access when I install the app?

Answer : How do I set permissions on folder app installed to so everyone has write access

Hi,

This will set Full control for 'Everyone' in your folder while maintaining current permissions on that folder:
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
Function SetPermissions()
	Dim strHomeFolder, strHome, strUser
	Dim intRunError, objShell, objFSO

	strHomeFolder = "C:\Test"

	Set objShell = CreateObject("Wscript.Shell")
	Set objFSO = CreateObject("Scripting.FileSystemObject")
	If objFSO.FolderExists(strHomeFolder) Then
		intRunError = objShell.Run("%COMSPEC% /c Echo Y| cacls " _
		& strHomeFolder & " /e /c /g everyone:F ", 2, True)
		
		If intRunError <> 0 Then
			Wscript.Echo "Error assigning permissions for user " _
			& strUser & " to home folder " & strHomeFolder
		End If
	End If
End Function
Random Solutions  
 
programming4us programming4us