Trouble with subst when using FBCMD.exe

Hi,

I wrote a windows service to connect our system with FinalBuilder. FBCMD.exe is called by the following lines (C#):

Process objProcess = new Process();
objProcess.StartInfo.FileName = sConfig.strPathFinalBuilder;
objProcess.StartInfo.Arguments = strParams.ToString();
objProcess.StartInfo.WindowStyle = ProcessWindowStyle.Normal;
objProcess.Start();
objProcess.WaitForExit();

 

The FinalBuilder project I use has some script lines like:

CreateObject("Scripting.FileSystemObject").DriveExists("t")

which suddenly failed.

 

I checked it from outside. My test-script failed for all drives mapped by the FinalBuilder-process which was started from the windows service.

What have I to do? Which permissions must be set and where?

 

Thanks. Regards,

Christian

Hi Chistian,

You will need to use the "Subst Drive" action in your FinalBuilder project before any actions attempt to read from the drive. The reason for this is that subst drives are configured on a per user basis, they are not shared between user accounts.

Regards,
Paul.

Hi Paul,

it seems to be a little bit more tricky. Until now, the problem occurred only a single time. My project looks like:
1. create directory (randomly named via variable)
2. remove mapping from “T:” ( Condition: CreateObject(“Scripting.FileSystemObject”).DriveExists(“t”) )
3. map directory on “T:”
4. …

The problem was, that the condition (2) failed and the mapping was not removed. But a mapping for “T:” already exists so (3) failed. I could see the mapping for “T:” using “subst” on the command line. But even my new created test script did not found anything. I could remove the mapping by hand using “subst t: /d”. After that, I mapped the same directory by hand and suddently it detected by the script. I tried my windows service a few more times after that, but it worked normal. Weird.

Regards,

Christian

Funny but I had the same problem with my nightly build, also mapped to t: . This is the relevant part from the log :

[Unmap Network Drive [ T: ]]
Command line : net use T: /yes /delete
The network connection could not be found.

More help is available by typing NET HELPMSG 2250.

Action Failed with Return Code : 2

[Map Drive T [ \\MRBUILDER\ExternalBuilds\3.9.0 ]]
Error : Drive T: already exists.

The deletion of  T didn't succeed.

Thanks Daphna

 

Hi Daphna,

In your case, is it possible that the mapping was created by a different user to the user who tried to delete it? I think this might explain what was going on...

 

Christian,

I'm glad you got yours working OK!

 

Regards,

Angus

Sometimes I run the Interactive program and sometimes the Batch mode, but always from my user (Daphna), does it matter?
Daphna

Hi,

it happend again. I had to stop the service.

Regards,

Christian