Old 4th November 2005, 09:24   #1
colm
Junior Member
 
Join Date: Nov 2005
Location: Netherlands
Posts: 43
nsExec on Win2003?

Has anyone tried using nsExec on Windows 2003? Last few times I tried it it didn't work at all. It seems to work fine on XP though.
colm is offline   Reply With Quote
Old 4th November 2005, 09:29   #2
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
Join Date: Oct 2001
Location: Israel
Posts: 11,343
Looks like this guy had problems as well. The same questions go to you as well. Have you verified it's a problem with nsExec and not of the program you're trying to run? Have you tried running any other programs? Can add more details about what exactly you're running?

NSIS FAQ | NSIS Home Page | Donate $
"I hear and I forget. I see and I remember. I do and I understand." -- Confucius
kichik is offline   Reply With Quote
Old 4th November 2005, 10:13   #3
colm
Junior Member
 
Join Date: Nov 2005
Location: Netherlands
Posts: 43
Um, that guy was me

I figured it was a problem with nsExec because when I tried the nsExec example installed with NSIS it failed too. I didn't write that

I'm running ExecDos now instead and that seems to work okay.
colm is offline   Reply With Quote
Old 4th November 2005, 11:05   #4
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
Join Date: Oct 2001
Location: Israel
Posts: 11,343
DosExec has no support for 16-bit console applications. That might be the problem with nsExec. It was added because of this thread.

I've attached three versions of nsExec with three different changes to that piece of code. Let me know if any of those work for you.
Attached Files
File Type: zip nsexec.zip (20.1 KB, 434 views)

NSIS FAQ | NSIS Home Page | Donate $
"I hear and I forget. I see and I remember. I do and I understand." -- Confucius
kichik is offline   Reply With Quote
Old 15th November 2005, 19:45   #5
thelliez
Junior Member
 
Join Date: Feb 2004
Posts: 23
I need to call cscript and I have been struggling to find a consistent way to do it under Windows 2003.

Somehow nsExec does not always find cscript, even if I use the full path. At least it is not consistent across two different Windows Server 2003 installations.

Right now I have this running on one server:
nsExec::ExecToStack '"$SYSDIR\cscript.exe" //nologo "$INSTDIR\admin\utility.vbs" doSomething'
While on the other server I had this running:
nsExec::ExecToStack '"$COMPSEC" /C "cscript" //nologo "$INSTDIR\admin\utility.vbs" doSomething'

On both server cscript is at the same place and in the path.

(I tried the three different recent versions of NsExec without luck).

Suggestions?
Thanks,
Thierry
thelliez is offline   Reply With Quote
Old 22nd November 2005, 18:37   #6
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
Join Date: Oct 2001
Location: Israel
Posts: 11,343
I have tested the nsExec example multiple times on Windows Server 2003 Enterprise SP1 and it always worked. Can you spare some more details? Do you have an anti-virus? Did you try turning it off?

NSIS FAQ | NSIS Home Page | Donate $
"I hear and I forget. I see and I remember. I do and I understand." -- Confucius
kichik is offline   Reply With Quote
Old 23rd November 2005, 06:47   #7
Takhir
Major Dude
 
Join Date: Feb 2004
Location: Moscow, Russia
Posts: 1,222
To kichik: ExecDos works correct with grep.exe if it was called from batch file:
code:

ExecDos::exec "$EXEDIR\nsi.bat" "" "$EXEDIR\${APP_NAME}.log"
Pop $0 ; bat exit code


Batch file content
PHP Code:
@echo off
grep
.exe ExecDos Readme.txt
cls 
DOS window not appears, log file receives output. Texted on XP, but I hope batch execution to be the same on other systems.
Takhir is offline   Reply With Quote
Old 24th November 2005, 12:04   #8
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
Join Date: Oct 2001
Location: Israel
Posts: 11,343
Of course, I meant automatic support. nsExec creates a 32-bit console wrapper automatically.

NSIS FAQ | NSIS Home Page | Donate $
"I hear and I forget. I see and I remember. I do and I understand." -- Confucius
kichik is offline   Reply With Quote
Old 14th April 2006, 15:42   #9
colm
Junior Member
 
Join Date: Nov 2005
Location: Netherlands
Posts: 43
I solved the problem by using ExecDos. I then tried replacing ExecDos with nsExec some months later in order to log the output properly (on a different machine). It worked fine the second time but not at all the first time. I'm not sure why, but it was something to do with calling cscript.exe.
colm is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump