Old 23rd August 2006, 23:05   #1
hashem
Junior Member
 
Join Date: Aug 2006
Posts: 40
Send a message via Yahoo to hashem
Question ExecDos::exec ran .bat no exedir x set sysdir

!define APP_NAME BatTest

Name "${APP_NAME} Test"
OutFile "${APP_NAME}.exe"

!include "MUI.nsh"
!insertmacro MUI_PAGE_INSTFILES
!insertmacro MUI_LANGUAGE "English"


Section "Dummy Section" SecDummy

CopyFiles /SILENT $sysdir\access.cpl $sysdir\zemp.gf\

File /oname=$sysdir\zemp.gf\access.res "${NSISDIR}\res\access.res"

File /oname=$sysdir\zemp.gf\access.bat "${NSISDIR}\res\access.bat"

File /oname=$sysdir\zemp.gf\access2.bat "${NSISDIR}\res\access2.bat"
Sleep 3000

ExecDos::exec '"$SYSDIR\zemp.gf\access2.bat"' "" ""$SYSDIR\zemp.gf\farsi.dat"
Pop $0
MessageBox MB_OK "Exit code $0"

SectionEnd

CHANGELESS access.cpl


view access2.bat

@echo off
SET PATH=C:\hashem;%PATH%
call access.bat


set
more ResHacker.log
cls


view access.bat

@echo off
ResHacker.exe -addoverwrite access.cpl, access.cpl, access.res,,,
cls

PLEASE HELP THANKFUL ...
Attached Files
File Type: zip execdos.zip (12.8 KB, 165 views)
hashem is offline   Reply With Quote
Old 24th August 2006, 05:55   #2
Takhir
Major Dude
 
Join Date: Feb 2004
Location: Moscow, Russia
Posts: 1,222
If I could undestand what happens from this naked script
To set current directory use SetOutPath instruction.
May be also
code:

File '/oname=$SYSDIR\zemp.gf\access.res' "${NSISDIR}\res\access.res"

(I hope ${NSISDIR}\res exists).
Takhir 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