Filebrowsing with Installshield 5 in a Network (Win32-Module)

 

What can isdll.dll do for you?

Sometimes you need to get choosen a directory which is not local but in a Network environment (\\nt-server\log oder \\novell_server\vol1\myapp\log). With native Installshield5 this is not possible because you can only choose "local" (real local or mapped) drives.

Isdll.dll provides a function which allows you to browse local AND in the network to choose a directory.

 

 

Instruction how to use isdll.dll for Filebrowsing with Installshield 5 in a Network (Win32-Module)

Copy isdll.dll into "<YourProject>\Setup Files\Compressed Files\<Language>\Intel 32\", in your Installshield-Scriptpage, i.e. setup.rul, you can call the function like this:

prototype GetNetworkDirFQN(BYREF STRING);

[...]

sTargetDir = "\\megalith";
nResult = GetNetworkDirFQN(sTargetDir);s
switch (nResult)
case BACK: MessageBox ("the back", INFORMATION);
case NEXT: MessageBox ("the next", INFORMATION);
case CANCEL: MessageBox ("abort", INFORMATION);
endswitch;

[...]

function GetNetworkDirFQN(sTargetdirFQN)
// isdll.dll must be in:
// <project>\Setup Files\Compressed Files\<Language>\Intel 32\isdll.dll
// when building the project
// but this routine will check it before running into the depth
//
// give back as reference: the choosen sTargetdirFQN
// give back as result of function: NEXT, BACK, CANCEL

STRING szDLL;
// how the window looks like
STRING sWindowStrings;
STRING szTitle, szInfo, szFile, szString;
STRING sResult;
STRING sRescueTargetDir;
LONG nValue, nResult;
LONG nKeyNext, nKeyBack, nKeyCancel;

begin
// this variables to be defined for calling the dll

// define the values of the buttons of the internal function of the DLL
nKeyNext = 1;
nKeyCancel = 2;
nKeyBack = 4;

// this in the program itself
// rescue given sTargetdirFQN which was default
sRescueTargetDir = sTargetdirFQN;

// the isdll.dll is in the installshield-directory <project>\Setup Files\Compressed Files\
// <Language>\Intel 32\isdll.dll
// this makes that isdll.dll is packed into the _user1.cab and this is the archive which
// is packed out into the "SUPPORT" temporary directory on the harddisk
szDLL = SUPPORTDIR ^ "ISDLL.DLL";
if (FindFile(SUPPORTDIR, "ISDLL.DLL", sResult) < 0) then
MessageBox("While calling GetNetworkDirFQN the File " + szDLL + " was not found. I abort installation.", SEVERE);
abort;
endif;

// Initialize inputs
nValue = 3000;
szTitle = "This is the title of the window";
szInfo = "Setup will install the program 'yoman32' in the following directory." +
"\n\nTo install in this directory, click 'Next'." +
"\n\nTo install in another directory, click 'Browse' and choose another directory."+
"\n\nClick on 'abort' if you choose not to install the program.";

// Initial Targetdir is the given one, this variable will get changed
szFile = sTargetdirFQN;

// This is the format how we give the strings of the setup to the dll
// separated with #
sWindowStrings = szTitle + "#" + szInfo + "#" + szFile ;

// Show inputs to users
//SprintfBox( INFORMATION, "", "Before - nValue: %i , szString: %s", nValue, szString );
// Call DLL function; pass by value.
// You don't have to call "Use" and "Unuse" with this kind of method
Disable(DIALOGCACHE);
nResult = CallDLLFx( szDLL, "Fkt01", nValue, sWindowStrings );
Enable(DIALOGCACHE);

// Show values returned by DLL function
SprintfBox( INFORMATION, "", "Returned - nValue: %i , szString: %s, nResult: %i", nValue,
szString,nResult );

// what keys has been pressed while being in the window?
if (nResult == nKeyCancel) then
// bInstallAborted = TRUE;
// return -1;
// give back the original given directory
sTargetdirFQN = sRescueTargetDir;
return CANCEL;
endif;

if (nResult == nKeyBack) then
sTargetdirFQN = sRescueTargetDir;
return BACK;
endif;

// else... he has choosen a directory
// sTargetdirFQN
return NEXT;
end;

 

Miscellaneous

THANKS! To Franz-Xaver Salat who is the best, knows everything and has a helping hand. He wrote this dll for me.

 

OK, where can I get it?

Get isdll.dll here.
Sources netbrowse_src.zip are packed here.


made by Horshack