WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

Compiler
plus
plus

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

Extract WIL DLL To Specified Directory

 Keywords: compiled large small .exe extract specified specify network

Question:

Is it possible to have a compiled LARGE .exe extract the files elsewhere besides the same directory as the executable? The issue is that this .exe is on a network share and users do not have the rights to write to that share. Also, having the issue that this winbatch .exe installs other programs, and one of those programs "turns off" the network connection for a moment during install. Everything works fine except for this one program that does this. Have run this winbatch .exe through about 50 different programs, and they all work. the only differnce is the network dropping. is there a way to have this work? I would love to be able to specify that I want the .dll files extracted to the system32 directory. I have thought about doing a small .exe and placing the .dll files in the same directory, then having the winbatch .exe just copy them to the local machine, but was not sure if the pathing of where those files were first detected would make a difference.

Answer:

As you know we recommend using the Small Exe compile option for networked PCs. However because something in your script is running that is tearing down the network connection, I can see how this would be a problem.

When you place a Large EXE on a the network and run it, the EXE looks for the DLL's it needs to run. It looks in the current directory and on the path. If the DLL's are not found in either of these places, it writes the DLL's to the current directory. If the directory is write protected, an error will occur.

The Compiler contains an 'option' to skip auto-extraction of extenders and "other files" from large EXE's. But the WIL DLL is always extracted from a large EXE, if necessary.

ExtractAttachedFile in your WinBatch.chm help file allows you to programmatically extract an embedded files from a compiled large EXE (except the WIL DLL).

You will still need to place the WIL DLL somewhere on the users system path, if you want the exe to be able to run.

One options is...

Compile as a small exe and use WinRAR, or a similar tool, to combine all the files together in a self-extracting archive. When the user clicks on the exe, it will self-extract to the user's temp folder, run your script, and then clean up after itself.

With WinRAR 3.80, the steps are:

  1. Select your files, right click, and select WinRAR Add to archive
  2. Check Create SFX Archive
  3. Click Advanced Tab and then SFX Options
  4. Under General tab in Run after extraction field, enter the name of your compiled script
  5. Under Modes tab, click Hide all
  6. Under Update tab, click Overwrite all files
  7. Click OK to save

Article ID:   W17693
Filename:   Extract WIL DLL To Specified Directory.txt
File Created: 2009:12:16:10:01:26
Last Updated: 2009:12:16:10:01:26