cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
devuranie
Level 3

How to share a folder in Installshield 2010 ?

The question is in the title : how to share a folder in Installshield 2010?

I have created a folder in the "Files and Folders" window in Installshield, with some files and others folders inside. But I want to share this folder. How can it be done?
Labels (1)
0 Kudos
(5) Replies
devuranie
Level 3

No answer ? Please, I need your assistance for this part. My installation is ready, there is just this sharing to do.
0 Kudos
rrinblue22
Level 9

Have you checked the Components view >> Destination permissions setting. This can be used to set permission on the folder….. If that helps you

Or you can call Windows API/VBScript which can do this task
0 Kudos
praveendanam
Level 5

hi,

Try to use net share in a script. It works, I tried long back.

-praveen
0 Kudos
devuranie
Level 3

I use this VBScript as custom action which is executed first.
Option Explicit

'Declare Constants
Const FileShare = 0
Const MaxConnxions = 25

'Declare Variables
Dim objWMIService
Dim objNewShare
Dim strComputer
Dim strSharePath
Dim strShareName
Dim strShareDesc
Dim colShares

On Error Resume Next

strComputer = "."
strSharePath = "C:\MyName"
strShareName = "MyName"
strShareDesc = "Public share for the MyName folder."

Set objWMIService = GetObject("winmgmts:" & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")

Set colShares = objWMIService.ExecQuery("Select * from Win32_Share Where Name = '" & strShareName & "'")
For Each objShare in colShares
objShare.Delete
Next

Set objNewShare = objWMIService.Get("Win32_Share")
errReturn = objNewShare.Create (strSharePath, strShareName, FileShare, MaxConnxions, strShareDesc)
MsgBox errReturn


There is no error, the folder is shared, but not with full control. How to fix it?
0 Kudos
DebbieL
Level 17

Perhaps see if the information in the following topic helps:
Securing Files, Folders, and Registry Keys in a Locked-Down Environment
0 Kudos