|
|
#1 |
|
Junior Member
Join Date: Sep 2006
Posts: 9
|
Hello,
At install time I extract an EXE to $PLUGINSDIR. On a page in the installer I attempt to shell out to this EXE as so: ExecCmd::exec '"$PLUGINSDIR\myexe.exe" param1 param2 etc' A certain Windows user is logged in with account username "Bob & Gina". The command shell attempt fails. Filemon reveals that ExecCmd is looking here: C:\Documents and Settings\Bob & Gina\Desktop\G~1\LOCALS~1\Temp\nsw557.tmp\myexe.exe When it should be looking here: C:\Documents and Settings\Bob & Gina\LOCALS~1\Temp\nsw557.tmp\myexe.exe Notice that "Desktop" is included in the incorrect path. This is because that is where the installer EXE is located and run from. If the installer EXE path changes, that is reflected in the path ExecCmd attempts to execute MYEXE.EXE from. All other references to $PLUGINSDIR are evaluated properly -- installer INI files, etc. are correctly located. This is why I believe the problem resides with ExecCmd. Any ideers on this? FYI SetOutPath has no effect on this, in case that was a coming suggestion. ![]() Thanks in advance! |
|
|
|
|
|
#2 |
|
Forum King
Join Date: Mar 2006
Location: Ath. GR
Posts: 2,078
|
Seems like you're right. What about included nsExec ?
Does it produce the same issue ? Quick AVI Creator - Quick and easy convert from DVD/MPEG/AVI/MKV to AVI/MP4/MKV Quick AVI Creator entirely edited with NSIS and entirely upgraded to Unicode NSIS |
|
|
|
|
|
#3 |
|
Junior Member
Join Date: Sep 2006
Posts: 9
|
Haven't tried nsExec.
I will say that it appears in the ExecCmd source that the code responsible for expanding $PLUGINSDIR and passing it to the plugins resides in NSIS itself. In other words, I would expect any plugins to have this same issue. ExecCmd just takes what it is given as far as the command line is concerned. I would have thought this issue would have surfaced long before now. Or no? Any things I can do like escaping the ampersand, etc. to get this working without a huge refactor like switching to nsExec? |
|
|
|
|
|
#4 |
|
M.I.A.
[NSIS Dev, Mod] Join Date: Oct 2001
Location: Israel
Posts: 11,343
|
The code that expands $PLUGINSDIR is indeed not present in any plug-in but in the installer itself. But as you said, it works fine in other places and the same expansion code is used everywhere so it's probably a problem with ExecCmd.
NSIS FAQ | NSIS Home Page | Donate $ "I hear and I forget. I see and I remember. I do and I understand." -- Confucius |
|
|
|
|
|
#5 | |
|
Junior Member
Join Date: Sep 2006
Posts: 9
|
Quote:
What about the NSIS code that takes the plugin parameters and parses them into the array of strings for handoff to the plugin? |
|
|
|
|
|
|
#6 |
|
M.I.A.
[NSIS Dev, Mod] Join Date: Oct 2001
Location: Israel
Posts: 11,343
|
That's the code I meant. It's all the same for both plug-ins and other script parts.
NSIS FAQ | NSIS Home Page | Donate $ "I hear and I forget. I see and I remember. I do and I understand." -- Confucius |
|
|
|
|
|
#7 |
|
Junior Member
Join Date: Sep 2006
Posts: 9
|
nsExec works in this situation. I've changed my installer to that effect. No big deal.
![]() Thanks to all who helped on this. |
|
|
|
|
|
#8 |
|
Major Dude
Join Date: Feb 2004
Location: Moscow, Russia
Posts: 1,222
|
Strange issue, might be good to have script sample. May be even reproducing situation without creation of special account
![]() In ExecDos following 2 lines only work with path to executable So I hope plug-in not changes path. To be sure I testedcode: and this worked fine (while Windows permits ampersands in file/dir names).code: |
|
|
|
![]() |
|
|||||||
| Thread Tools | Search this Thread |
| Display Modes | |
|
|