PDA

View Full Version : %CURDIR% in Test / Debug Mode



NewsArchive
10-13-2005, 04:53 AM
Hi All,

The system variable %CURDIR% (Current Directory) does not seem to have
the correct value when used in either the Test or Debug mode. Although
I am running in a folder several layers down from the root, it is
reporting the current directory as "C:\". When run in the compiled exe
version, it does have the correct version.

Am I missing something here? It kind of makes testing of a new script
difficult.

Barton Whisler
Dir. Programming
Prosoft Inc.

NewsArchive
10-13-2005, 04:53 AM
Barton,

The followling script part sets the %CURDIR% variable:

! --- Define standard installer variables ---
Set Variable %WINVER% to {WINVER}
Set Variable %CURLNG% to {CURLNG}
Set Variable %SRCDRV% to {SRCDRV}
Set Variable %CURDIR% to {CURDIR} ! <! HERE!!!!!!!!!!!!!!!!
Set Variable %TMPDIR% to {TMPDIR}
Set Variable %WINDIR% to {WINDIR}
Set Variable %SYSDIR% to {SYSDIR}
Set Variable %PROGRAMFILESDIR% to {PROGRAMFILESDIR}
Set Variable %COMMONFILESDIR% to {COMMONFILESDIR}
Set Variable %PRIVILEGES% to {PRIVILEGES}

If it is c:\ then the GetCurrentDirectory (to retrieve the current folder)
Windows API returned "C:\" when the above variable was initialized.

Friedrich

--
Friedrich Linder
CEO, Lindersoft
www.lindersoft.com
1.954.252.3910

"point. click. ship" - that's SetupBuilder 5

NewsArchive
10-13-2005, 04:54 AM
Just tested this.

On our machines %CURDIR% is C:\ in debug and non-debug mode.

So when the variable was initialized, the current folder was c:\

I'll add a new "Get Current Folder" function to "Get System Information"
to retrieve the current folder. Then you can set your own variable
(or update %CURDIR% if the current folder changed).

--
Friedrich Linder
CEO, Lindersoft
www.lindersoft.com
1.954.252.3910

"point. click. ship" - that's SetupBuilder 5

NewsArchive
10-13-2005, 04:54 AM
Added! In the next build you can use "Get System Information"
(Current Folder) to retrieve the current folder anywhere in
your script.

--
Friedrich Linder
CEO, Lindersoft
www.lindersoft.com
1.954.252.3910

"point. click. ship" - that's SetupBuilder 5

NewsArchive
10-13-2005, 04:54 AM
Thanks!

Barton Whisler
Dir. Programming
Prosoft Inc.