View Full Version : custom action: script or executable

02-12-2016, 03:08 PM
As part of my install, I need to create a local group. I've figured two different ways of doing this with custom actions.

1. I can launch an executable
executable: <SystemFolder>net. exe
command line: localgroup "My Group Name" /COMMENT:"Description of my group" /ADD

2. I can run a VBscript

Set objComp = GetObject("WinNT://.")
Set objGroup = objComp.Create("group", "My Group Name")
objGroup.Description = "Description of my group"

Set objGroup = Nothing
Set objComp = Nothing

Is one of these solutions better than the other? Why?
Is there a third solution that's better than either of these?


(PS I had to put a space between "net." and "exe". If I didn't, it wouldn't let me post this message.)