Archive: Newbie Problem


Newbie Problem
I am sooo new to this it's not even funny. Well...just a little bit. Anyway my problem is that I have a setup.exe file which will need to be installed on a pocket pc device. No problem, I created the setup.exe file in embedded visual basic. Now I need the setup.exe file to be installed in the desktop program folder first then into the pocket pc. Cool..this is where NSIS comes in. I read the Modern UI read me file to see if i can use one of the scripts to accomplish this. I found a script to help me run the setup.exe after it is installed on the desktop program folder. The problem is after the NSIS installer asks me if I want to run the program "setup.exe", I get an error that says " error reading setup ini ". Does anyone know what this means and what I have to do to have the setup.exe launch. I appreciate any help at this point.


Looks like an error of your other setup application.


1. Extract the setup.exe program to $DESKTOP
2. Use SetOutPath to set the working directory
3. Use Exec to run it, or if it's a command-line dos program use nsExec::Exec to run it hidden.

-Stu


The setup.exe program runs fine before I incoporate it into NSIS. It's afterwards when I get the error reading setup ini.


So your setup program requires an ini file to run?

Do you have the setup.ini file?
Maybe you should try:

File "/oname=$DESKTOP\setup.exe" "setup.exe"
File "/oname=$DESKTOP\setup.ini" "setup.ini"
SetOutPath $DESKTOP
nsExec::Exec "$DESKTOP\setup.exe"

Or similar.

-Stu


But NSIS doesn't have any message like the one you've quoted. Try to do what Afrow UK suggested. Setting the working directory is probably what's missing. If the working directory is not set correctly it might not be able to find the INI file it's looking for.


I figured out why I'm getting this problem. Duh!! The setup.exe isn't a real exe file. It's actually launching a cab file. So when i put the setup.exe into NSIS that's why it comes with the ini error because they all have to be together to launch from the desktop. So..I figured that out. I'm confused what to do now. Any suggestions?


So, you just need to place the setup and cab files in the same directory, and then execute the setup.exe

What is the problem with that?

-Stu


Sorry Stu. This is all new to me. I know some don't have the patience for people like me. It's a hugh learning curve. Thanks for your help.


Well, like I posted above with a slight modification;
File "/oname=$DESKTOP\setup.exe" "setup.exe"
File "/oname=$DESKTOP\setup.cab" "setup.cab"
SetOutPath $DESKTOP
nsExec::Exec "$DESKTOP\setup.exe"

-Stu


Cool. I'll work on it now.

thanks!


Note the above code assumes the following:
* setup.exe is in your nsi file's dir
* The cab file is called setup.cab, and is also in your nsi file's dir
* You want the files to be extracted to the desktop

Heres a bit of info on what they do:
The first File parameter /oname sets the output path & name.
The second File parameter sets the source of the file being compressed.
SetOutPath will set the working directory for setup.exe (so setup.exe will look for the cab file in the working directory set, which is $DESKTOP)
nsExec::Exec will run the setup program invisibly (nsExec is a plugin)

-Stu