PDA

View Full Version : creating a network share - urgent



trsellers
10-23-2004, 08:45 PM
I need to create a network share .... but having lots of problems doing it... I've been trying to use custom actions .... so far i've created "New EXE" custom actions that pull an environment variable as it's path ....

I create this system environment variable:
DATADIR=[INSTALLDIR]SWDB
....whichends up looking like....
DATADIR=C:\MTS\SWDB

My custom exe action ("File Exists on Target Computer" in [SystemFolder]):
net.exe share SWDB=%DATADIR%
(Wait for Action = Yes)

After the network share is created, I have a service installed through another custom exe action:
service.exe /install

If the network share isn't present, the service throws an error. No matter what I do, the share never seems to create!!

I've also tried using this custom exe action to make the share:
cmd.exe /c net share SWDB=%DATADIR%

All of these work perfectly if ran through the command prompt, but none of them will function when I try to have installshield run them as a custom exe action!

CAN ANYONE PLEASE HELP !?!?!?!?!? We have a release due out on Monday (2 days from now - 10/25/04) and this issue could delay the release!

ANY HELP IS GREATLY APPRECIATED !!!

colorofox
11-01-2004, 03:41 AM
svCmdLine="share "+svName+"="+svDir;

LaunchAppAndWait("net.exe",svCmdLine,LAAW_OPTION_WAIT)<0);

hope to help