There are a few things that may be worth mentioning... " ExeCommand='[TARGETDIR]Windows\System32\net.exe user wsdUser wsdPasswd'"
That doesn't look right. TARGETDIR is your "application folder", typically the browsable one, and having it prefix the system folder seems wrong. Also, if you need the system folder you need a standard property like [SystemFolder] " Execute='immediate'" Strictly speaking you shouldn't be changing the state of the system during immediate custom actuions. They are usually deferred, in the transaction, and have a rollback CA to undo them. I prefer to make this kind of thing a configuration step separate from the actual install, have a "create account" or "change account" dialog in the actual app, rather than bundle it in with the install, if that applies in your case. I'd rather call code to do this - there are plenty of examples of NetUserAdd around - and you get the best control of any errors and telling the user what went wrong. I've run installs that I think do what yours does, and it's pretty annoying to get a message saying that the supplied password did not meet policy requirements and not be told exactly why. Phil W -----Original Message----- From: sergiocss [mailto:sergioc...@hotmail.com] Sent: Monday, July 02, 2012 11:45 AM To: wix-users@lists.sourceforge.net Subject: [WiX-users] How to save return code from a command line CustomAction? I have a CustomAction as follows: <CustomAction Id='wsdCreateUser' Directory='ProgramFilesFolder' ExeCommand='[TARGETDIR]Windows\System32\net.exe user wsdUser wsdPasswd' Execute='immediate' Return='check' /> Two issues: 1. After the wsdCreateUser custom action has executed I want to be able to save that result (success or failure) in a new property for further usage. I would like to trigger the execution of my custom action from a dialog box, maybe a check box or push button, then use the property with the saved result be used to call another CustomAction, but not until that property has been set, is this possible with WIX? 2. If I set the Return code to 'check' and the creation failed for whatever reason, the entire installation ends, I don't want that. Should I use ignore? and if so, would the return value from the executed command still be captured? I'm really trying to get (1) working, I don't really wanna have to write C# code or a dll just to save the return value of that custom action, is this possible with WIX, it would seem that it's a most basic feature in an installer, yet I can't seem to find any examples or information as to how to go about doing this. I'm no expert with WIX but I'm guessing there's got to be a way of getting this accomplished w/o writing a whole new executable or dll. Thank you in advance for any tips or sample you can send my way! Sergio -- View this message in context: http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/How-to-save-re turn-code-from-a-command-line-CustomAction-tp7579242.html Sent from the wix-users mailing list archive at Nabble.com. ---------------------------------------------------------------------------- -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users