PDA

View Full Version : Create Folder fails



NewsArchive
07-25-2008, 01:38 AM
Attempting to create a folder fails repeatedly on my 2 XP machines, displaying
the message box in the script below:

Set Variable %FAXSERVERPATH% to "%PROGRAMFILESDIR%\PROENTRY4\AFE_SRVR"
...

If %_SB_SETUPTYPEID% Equals (Ignore Case) "FAX Server" Then

::Create Folder "%FAXSERVERPATH%" (FAX Server)

If %FAXSERVERPATH% File or Folder doesn't exist Then
Display Message Box "FAX Server folder: %FAXSERVERPATH% does not exist ..." -- "Error"
Exit Installation
End
...
End

At runtime, %FAXSERVERPATH% is C:\Program Files\PROENTRY4\AFE_SRVR. Also,
creating C:\AFEData fails as well.

Any advice would be very much appreciated!

Greg Fasolt

NewsArchive
07-25-2008, 01:39 AM
Greg,

>
> Any advice would be very much appreciated!
>

Works fine here (see attached demo script). C:\Program
Files\PROENTRY4\AFE_SRVR is created.

HTH,

--
Friedrich Linder
Lindersoft
www.lindersoft.com
+1.954.252.3910

"point. click. ship" - that's SetupBuilder
Create Windows Vista ready installations in minutes

-- Official Comodo Code Signing and SSL Certificate Partner

NewsArchive
07-27-2008, 06:42 AM
Hi Friedrich,

Thanks for the reply and taking the trouble to build the example. It does work
just fine, as did my simple test. The difficulty is in my real installer and I
cannot understand why it doesn't work.

Background: Starting with my rather complicated web-based installation, I want
to add an option to install Lee White's Automated Fax Engine. When a user
selects this Setup Type, I hide several dialogs including the Select Install
Folder for %_SB_INSTALLDIR% (C:\Program Files\PROENTRY) and unhide Select
Install Folders for my %FAXSERVERPATH% (C:\Program Files\PROENTRY\AFE_SRVR) and
%FAXBASEPATH% (C:\FAXData).

In the normal (non-AFE) mode, all works perfectly, creating many folders,
installing files, and optionally MS SQL Express, etc. However, the folder
creation fails everytime when using the AFE Server Setup Type. Obviously the
code is being executed because the "If %FAXSERVERPATH% File or Folder doesn't
exist" code is executed.

What could possibly cause the folder creation to fail? What should I look for
in such a case?

Greg Fasolt

NewsArchive
07-27-2008, 06:42 AM
Hi Greg,

> What could possibly cause the folder creation to fail? What should I look
> for in such a case?

The SetupBuilder "Create Folder" function is a call to the the CreateFolder
Windows API:

http://msdn.microsoft.com/en-us/library/aa363855.aspx

Friedrich

--
Friedrich Linder
Lindersoft
www.lindersoft.com
+1.954.252.3910

"point. click. ship" - that's SetupBuilder
Create Windows Vista ready installations in minutes

-- Official Comodo Code Signing and SSL Certificate Partner

NewsArchive
07-27-2008, 06:43 AM
Greg,

If you are interested, you can send your script to support@lindersoft.com
and we'll review your code over the weekend.

Friedrich

NewsArchive
08-01-2008, 12:42 PM
Hi, Greg,

I have had issues like that before, only to find out that somewhere along
the way, but var was getting reset by something.
Make sure that isn't happening by messaging it our right before the create.
I've also done really smart things like misspelling the var!

I know these are simple things, but sometimes it's the trick. Especially in
a complicated script.

Thanks,
-Glenn.

NewsArchive
08-04-2008, 01:25 AM
Lindersoft spen many hours on the problem. It turns out that, while my feature
showed a check mark, none of the files, directories, etc. associated with that
feature were installed. Appears to have beeen a problem in my SB file. Removing
the check and adding it back restored normal operation. Thanks to Lindersoft,
life is much better now.

Greg Fasolt