Old 8th September 2005, 22:42   #1
denizh
Junior Member
 
Join Date: Sep 2005
Posts: 4
how to run a DOS command?

I am trying to run a DOS command with the nsis installer. It is a batch file I want to run during the installation that will register one of the DLLs for the program to work. How can I go about doing it?

thanks

white
denizh is offline   Reply With Quote
Old 9th September 2005, 03:12   #2
JasonFriday13
Major Dude
 
JasonFriday13's Avatar
 
Join Date: May 2005
Location: New Zealand
Posts: 916
You could go and read the documentation first before posting, but I will answer anyway. Use 'exec "C:\path\your_batch_file.bat"' or use execwait to wait for the batch file to finish.

"Only a MouseHelmet will save you from a MouseTrap" -Jason Ross (Me)
NSIS 3 POSIX Ninja
Wiki Profile
JasonFriday13 is offline   Reply With Quote
Old 9th September 2005, 06:09   #3
Yathosho
Forum King
 
Yathosho's Avatar
 
Join Date: Jan 2002
Location: AT-DE
Posts: 3,366
i guess you have to use ExecShell for a batch file
Yathosho is offline   Reply With Quote
Old 9th September 2005, 07:02   #4
denizh
Junior Member
 
Join Date: Sep 2005
Posts: 4
I checked the documentation, but I guess I did not know what to search for ....

I am still having trouble with the Exec command. I am getting a `error in script error`...

All I want to do is execute the following command:

regsvr32 c:\windows\system32\msstdfmt.dll

how do I go about doing it, where do i place the command?

I am very new at this, sorry if this is a dumb question.

thanks
denizh is offline   Reply With Quote
Old 9th September 2005, 07:16   #5
Yathosho
Forum King
 
Yathosho's Avatar
 
Join Date: Jan 2002
Location: AT-DE
Posts: 3,366
Exec "regsvr32.exe $SYSDIR\msstdfmt.dll"
or
nsExec::Exec "regsvr32.exe $SYSDIR\msstdfmt.dll"
Yathosho is offline   Reply With Quote
Old 9th September 2005, 08:05   #6
denizh
Junior Member
 
Join Date: Sep 2005
Posts: 4
Thank you very much that worked very well..

One more thing, when I use that string you suggested, during installation, it pops up a dialog box that confirms that the command was successful. How can I make that silent? So that the user is not distracted

thank you soo much....

white
denizh is offline   Reply With Quote
Old 9th September 2005, 08:15   #7
Instructor
Major Dude
 
Join Date: Jul 2004
Posts: 671
Silent DllRegisterServer:
code:

Exec "regsvr32.exe /s $SYSDIR\msstdfmt.dll"



Why not use NSIS "RegDLL"?
code:

SetOutPath $SYSDIR
RegDLL "$SYSDIR\msstdfmt.dll"

Instructor is offline   Reply With Quote
Old 9th September 2005, 08:49   #8
denizh
Junior Member
 
Join Date: Sep 2005
Posts: 4
You guys are the best thank you very very much.. I appreciate all your time...

white
denizh is offline   Reply With Quote
Old 25th September 2005, 17:44   #9
JATO
Junior Member
 
Join Date: Sep 2005
Location: Sacramento CA
Posts: 24
Smile

you guys also helped me.. I was searching the forums for the same answer.

thanks
JATO 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