Old 7th September 2011, 15:48   #1
mezcalin
Junior Member
 
Join Date: Aug 2011
Posts: 11
nsExec::Exec won't work with quotes. please help

I have share the "Shared Virtual Machines"-folder for the user webGIS
I searched for a tool to make it as simple as possible...found RMTSHARE.EXE.
In the command prompt it works fine:
code:
C:\Daten\Installer\rmtshare \\computer\"Shared Virtual Machines"="C:\Users\Public\Documents\Shared Virtual Machines" /GRANT webGIS:F


But in my nsis-installer the following code will not work, but I don't know why at all.
code:
nsExec::Exec '"$R0 /C C:\Daten\Installer\rmtshare \\$0\"Shared Virtual Machines"="C:\Users\Public\Documents\Shared Virtual Machines" /GRANT webGIS:F"'


the same code for the folder "c:\Daten" will work:
code:
nsExec::Exec "$R0 /C c:\Daten\Installer\rmtshare \\$0\Daten=c:\Daten /GRANT webGIS:F"


I think, it's beause of the quotes, but I don't know how to make it work.
Please help.

BTW: $R0 is initialized by
code:
ReadEnvStr $R0 COMSPEC
mezcalin is offline   Reply With Quote
Old 7th September 2011, 16:08   #2
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,548
Why are you using COMSPEC? COMSPEC is picky about quotes and spaces...

IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote
Old 7th September 2011, 16:38   #3
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
You only put quotes around the executable path, not the entire string. So in this case, just around $R0. And yeah you don't need to use COMSPEC really; just call rmtshare.exe directly.

Stu
Afrow UK is offline   Reply With Quote
Old 8th September 2011, 12:43   #4
mezcalin
Junior Member
 
Join Date: Aug 2011
Posts: 11
thanks.
without comspec it works.
mezcalin 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