Archive: Capture .vbs File Stdout


Capture .vbs File Stdout
  Hi everyone,

very nice forum here. I have achieved a lot in NSIS through reading here.

My current problem proves to be a little to much for me (or i am just a little stupid)

I am going at the task of making a user member of the local Administrators group using "net localgroup >Administrators group> <Username> /ADD"

The problem now is that depending on the language of the OS that group is named different (English: Administrators, German: Administratoren, French: Administrateurs and so on)
So i though i use the SID (S-1-5-32-544) for the Administrators group since that SID is the same no matter what language the OS has.

So i created a little VBS Script that queries WMI to find out the name of the Administrators group, which works fine.....

The VBS Script writes its result to stdout, and this is where i do not get farther, i use:


nsExec::ExecToStack 'wscript.exe $PLUGINSDIR\\GetAdminGroupName.vbs'

>Pop $0
MessageBox MB_OK
|MB_ICONEXCLAMATION|MB_DEFBUTTON1 $0
>
to test if i get the groupname wich i don't i get a nice little '0' telling me my script executed nicely (which is not bad either but not quite what i want).

Any ideas on how to get to stdout of my VBS ? I guess i could take the detour and create a file that contains what i want, but i would like to do it with stdout.

I have checked various plugins (Exec_CMD, Exec_Dos) and most of the documentation as well as the forum, to no avail. If i have overlooked something please just point me in the right direction.

Thanks.

You need another Pop.

Stu


Arrghh

i actually tried that before and it didn't work, now it does.

Thanks a lot ! :up: