Old 28th July 2006, 01:13   #1
seelke
Junior Member
 
Join Date: Jul 2006
Posts: 2
Send a message via ICQ to seelke Send a message via AIM to seelke Send a message via Yahoo to seelke
Too Many Vars

I have tried finding the answer for this, but I'm not even sure what to look for. I have the following in a script, but when it runs, it errors sating too many vars. Any help would be greatly appreciated.

PHP Code:
FileWrite $'for /f "tokens=1" %%i IN ('support\compname /?s') do if %%i==VMware-56 set COMPUTERNAME=VMWARE$\r$\n' 
I know it's not PHP, but there is no code button.

Eddie
seelke is offline   Reply With Quote
Old 28th July 2006, 02:14   #2
Comperio
Major Dude
 
Comperio's Avatar
 
Join Date: Jan 2005
Location: Oregon Coast
Posts: 737
I can say that I've never seen that error before. But, I do see that there may be an issue with the quotes. Notice how you start the command with single quotes, but then when you get the 'supportcompname' command, you are trying to encase those in single quotes. I'm thinking that when it hits the 2nd single quote, it's trying to end the command there.

Assuming the quotes need to be written to the file, you might need to split this into 2 lines of code like this:
code:

FileWrite $9 'for /f "tokens=1" %%i IN ('
FileWrite $9 "'supportcompname /d ?s') do if %%i==VMware-56 set COMPUTERNAME=VMWARE$\r$\n"

Comperio is offline   Reply With Quote
Old 28th July 2006, 02:56   #3
seelke
Junior Member
 
Join Date: Jul 2006
Posts: 2
Send a message via ICQ to seelke Send a message via AIM to seelke Send a message via Yahoo to seelke
That did it!

Thanks you very much!
seelke 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