Jump to content


This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
Photo

How can i share an folder?


1 reply to this topic

Healy

Healy
  • Full Members
  • 21 posts

Posted 20 August 2003 - 13:14

I use the following code in Installshield 7.0 SP4

#include "netops.rul"

...

function OnFirstUIAfter()
STRING szTitle, szMsg1, szMsg2, szOption1, szOption2;
NUMBER bOpt1, bOpt2;
begin
Disable(STATUSEX);

bOpt1 = FALSE;
bOpt2 = FALSE;
szMsg1 = SdLoadString(IFX_SDFINISH_MSG1);
SdFinishEx(szTitle, szMsg1, szMsg2, szOption1, szOption2, bOpt1, bOpt2);

AddShareNet("ShareName", INSTALLDIR);

end;

After setup all folder exists. But INSTALLDIR isn't shared. ???



BASnow

BASnow
  • Members
  • 9 posts

Posted 22 August 2003 - 23:01

I know nothing about install script so here is how to create a network share in vbScript. Of course you will have to enter your own directory info.

Also this would have to be done from a deffered action so you will not have access to session.property values at this time and will have to place these into a value accessable as CustomActionData to be retreived by this script later.

If you are unsure how to accomplish this just reply back to this post and I will post back a walkthough how to do it.

Good Luck

Const FILE_SHARE = 0
Const MAXIMUM_CONNECTIONS = 25
strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set objNewShare = objWMIService.Get("Win32_Share")
errReturn = objNewShare.Create _
("C:\Finance", "FinanceShare", FILE_SHARE, _
MAXIMUM_CONNECTIONS, "Public share for the Finance group.")
Wscript.Echo errReturn