PDA

View Full Version : Please go to the Control Panel to install & configure system components



tmangan
02-05-2004, 01:48 PM
Decided to try publishing my autorun menu to a single compressed executable file. Everything works fine until I try to access the setup.exe that's in the same directory as my autorun.exe file - I'm calling it as follows:

File.Run("setup.exe", "", "", SW_SHOWNORMAL, false);

Clicking on the button that runs the above line results in the following error:

'Please go to the Control Panel to install & configure system components."

So far, I've tried specifying the working folder as "{_SourceFolder}" but I'm running into the same problem.

Again, as always, any pointers/help would be appreciated.

Lorne
02-05-2004, 02:16 PM
Try this:


File.Run(_SourceFolder.."setup.exe", "", "", SW_SHOWNORMAL, false);

The .. joins two strings together. In this case, it joins the contents of the _SourceFolder variable (a string) with the literal string "setup.exe".

This is called "concatenation," and the .. is called the "concatenation operator." Search for "concatenate" in the help file to learn more. :)

tmangan
02-05-2004, 02:58 PM
Thanks for the suggestion Lorne,

With that code in place, I am no longer getting the error, but, setup.exe is never run, I do think I know why this is happening.

Some details about what I'm doing.
I've created a setup program in SetupFactory that is to be placed, along with this autorun.exe, at the root of my CD.

The function [ function installProduct () ] that I'm trying to call my setup.exe program from is called when the install button is clicked - and then following code is run:

function installProduct ()
Application.Minimize();

-- File.Run("setup.exe", "", "", SW_SHOWNORMAL, false);

Dialog.Message("The value of InstallType is:", _SourceFolder);

File.Run(_SourceFolder.."setup.exe", "", "", SW_SHOWNORMAL, false);

end

I have commented out the previous File.Run line and have used the one posted above.

The value returned from _SourceFolder is:
C:\DOCUME~1\tmangan\LOCALS~1\Temp\1\ir_ext_temp_4
(which is nowhere close to being correct, but answers why it can't see the setup.exe)

If I don't compile this into the single executable, and allow AMS to create the directory structure it wants to the installer runs as it should, it's only when I have AMS create a single file that I run into this problem.


Thanks again for any help!

tmangan
02-05-2004, 04:02 PM
One thought I had on this was that the compressed single file executable is taking the directory that it's unzipped before execution to and assigning that path to _SourceFolder?

Sequence of events (from what I can tell)
* Run compressed exe from CD-Rom
* Files are unzipped to a temp directory
* exe to start up GUI is run
* _SourceFolder is set in that temp directory.

If this turns out to be true, what method have others used to make sure that the value of _SourceFolder contains the path from the CD-Rom?