Re: [WiX-users] How to install a new user?

2014-12-17 Thread patrickpirzer
Thank You very much Phill!
You're absolutely right and i had totally forgotten, that there is a tiny
difference between german and english OS.
I always tried to add my user to the group Administrators but it had to be
Administratoren.

I heeded Your advice and used Your C#-code in my GUI-ViewModel to read the
names of the local groups Administrators and Users.
Then i defined two bundle-variables, which get the names of the local groups
and - finally - i give the variables to the MsiProperties.

That works; my new user was created and added to the adminstrators group -
as i could see with the tool lusrmgr.msc.

Thanks a lot Phill!
I wish You merry christmas and a happy new year!





--
View this message in context: 
http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/How-to-install-a-new-user-tp7598529p7598619.html
Sent from the wix-users mailing list archive at Nabble.com.

--
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration  more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=164703151iu=/4140/ostg.clktrk
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


Re: [WiX-users] How to install a new user?

2014-12-16 Thread Patrick Pirzer
Hello Phil,

Thank You for Your answer, but this doesn't help.

I have set the InstallPrivileges to elevated, as You can see here:

Package InstallerVersion=405
 Compressed=yes
 InstallScope=perMachine
 InstallPrivileges=elevated /

But even when i execute my setup as an administrator, i get the following 
messages in the log.

1. The user is created (That's ok).

MSI (s) (D8!78) [09:04:18:661]: PROPERTY CHANGE: Adding CreateUser 
property. Its value is '**'.
Action finished on 09:04:18: CreateUserRollback. Returnvalue 1.
MSI (s) (D8!78) [09:04:18:661]: Doing action: CreateUser
Action started on 09:04:18: CreateUser.
Action finished on 09:04:18: CreateUser. Returnvalue 1.

2. The user shall be a member of the group Users.

MSI (s) (D8:B4) [09:04:19:599]: Invoking remote custom action. DLL: 
C:\Windows\Installer\MSI2254.tmp, Entrypoint: CreateUser
MSI (s) (D8:6C) [09:04:19:599]: Generating random cookie.
MSI (s) (D8:6C) [09:04:19:599]: Created Custom Action Server with PID 4428 
(0x114C).
MSI (s) (D8:A8) [09:04:19:599]: Running as a service.
MSI (s) (D8:F0) [09:04:19:599]: Hello, I'm your 32bit Elevated custom 
action server.
CreateUser:  Error 0x80004005: Failed to get group 'TESTPC/Users'.
CreateUser:  Error 0x80004005: failed to add user: ProSoftAdmin to group 
Users
Fehler 26403. Failed to add user to group.  (-2147467259   ProSoftAdmin   
Users   )
MSI (s) (D8!74) [09:08:35:848]: Produkt: Staffdirector -- Fehler 26403. 
Failed to add user to group.  (-2147467259   ProSoftAdmin   Users   )

CustomAction CreateUser returned actual error code 1603 (note this may not 
be 100% accurate if translation happened inside sandbox)
MSI (s) (D8:BC) [09:08:35:888]: Note: 1: 2265 2:  3: -2147287035 

And my User-element looks like this (I removed the Domain-property from the 
util:User):

util:Group Id=Users
Name=Users
Domain=[ComputerName] /
Component Id=CreateUserAccount
   Guid=AEE91491-99FA-40A9-AB47-1E9FC2DDEF2A
   Directory=TARGETDIR
util:User Id=SQLUser
   Name=[DBUSER_PROP]
   Password=[DBPW_PROP]
   UpdateIfExists=no
   CreateUser=yes
   PasswordNeverExpires=yes
   PasswordExpired=no
   RemoveOnUninstall=no
util:GroupRef Id=Users /
/util:User
/Component

So what's going wrong?


-Ursprüngliche Nachricht-
Von: Phil Wilson [mailto:phildgwil...@gmail.com] 
Gesendet: Montag, 15. Dezember 2014 20:45
An: General discussion about the WiX toolset.
Betreff: Re: [WiX-users] How to install a new user?

The answer to you in StackOverflow is accurate - it doesn't matter if someone 
is an administrator or not. Nobody has admin privileges unless they elevate.

---
Phil Wilson


On Mon, Dec 15, 2014 at 1:19 AM, Patrick Pirzer patrick.pir...@prosoft.net 
wrote:
 Okay, now the creation of the new user seems to be started, but i get an 
 privilege error.
 That's curious because my user is an administrator on the virtual machine, 
 where i'm testing my setup.
 My actual version for the creation of the user looks now like that:

 util:Group Id=Administrators
 Name =Administrators
 Domain=[ComputerName] /
 Component Id =CreateUserAccount
Guid=AEE91491-99FA-40A9-AB47-1E9FC2DDEF2A
Directory=TARGETDIR
 util:User Id =SQLUser
Name=[DBUSER_PROP]
Password=[DBPW_PROP]
UpdateIfExists=no
CreateUser=yes
PasswordNeverExpires=yes
PasswordExpired=no
RemoveOnUninstall=no
Domain=[ComputerName]
 util:GroupRef Id =Administrators/
 /util:User
 /Component

 --
  Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT 
 Server from Actuate! Instantly Supercharge Your Business Reports and 
 Dashboards with Interactivity, Sharing, Native Excel Exports, App 
 Integration  more Get technology previously reserved for 
 billion-dollar corporations, FREE 
 http://pubads.g.doubleclick.net/gampad/clk?id=164703151iu=/4140/ostg.
 clktrk ___
 WiX-users mailing list
 WiX-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wix-users

--
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server from Actuate! 
Instantly Supercharge Your Business Reports and Dashboards with Interactivity, 
Sharing

Re: [WiX-users] How to install a new user?

2014-12-16 Thread Phill Hogland
You have  'TESTPC/Users'  The separator should be a backslash.
Try  'TESTPC\Users'

Another issue that you may want to consider is that Group names are
localized.  I use an mba to get the localized name, and then pass that in a
Burn variable (in this case the name of the Administrators group).

string aSID = new
SecurityIdentifier(WellKnownSidType.BuiltinAdministratorsSid,
null).ToString();
string domain_adminsGroupName = new
System.Security.Principal.SecurityIdentifier(aSID).Translate(typeof(System.Security.Principal.NTAccount)).ToString();
this._adminsGroupName =
domain_adminsGroupName.Split('\\').Last();

If using WixStdBA you could a BAFunctions.DLL or literal strings in a wxl
file.  In a MSI (without a bundle) use a CA.



--
View this message in context: 
http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/How-to-install-a-new-user-tp7598529p7598601.html
Sent from the wix-users mailing list archive at Nabble.com.

--
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration  more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=164703151iu=/4140/ostg.clktrk
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


Re: [WiX-users] How to install a new user?

2014-12-16 Thread Phill Hogland
It is curious that the error message has a forward slash, rather than a
backslash:
CreateUser:  Error 0x80004005: Failed to get group 'TESTPC/Users'. 

Both the Users group and the Administrators group are in the 'Builtin'
domain, but the name of the group might be localized so using the English
name won't work on a German OS.
http://technet.microsoft.com/en-us/library/cc756898%28v=ws.10%29.aspx

In my mba I use code like this to get the localized name of the Group.
string aSID = new
SecurityIdentifier(WellKnownSidType.BuiltinAdministratorsSid,
null).ToString();
string domain_adminsGroupName = new
System.Security.Principal.SecurityIdentifier(aSID).Translate(typeof(System.Security.Principal.NTAccount)).ToString();
this._adminsGroupName =
domain_adminsGroupName.Split('\\').Last();

You could use some other method like a bafunctions.dll in wixstdba or a ca
if the msi is not burn driven.  But noticed that I pass the domain\\name, as
returned, string returned to the Name attribute of util:Group.  (It appears
this is a contrast to your approach and may indicate an issue with the
extension.)

util:Group Id=AdminGroup Name=[ADMINSGROUPNAME]/
util:User Id=AdminUser Domain=[MYDOMAIN] Name=[MYACCOUNT]
CreateUser=no 
  util:GroupRef Id=AdminGroup/
/util:User
 
This approach is working for me.



--
View this message in context: 
http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/How-to-install-a-new-user-tp7598529p7598602.html
Sent from the wix-users mailing list archive at Nabble.com.

--
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration  more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=164703151iu=/4140/ostg.clktrk
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


Re: [WiX-users] How to install a new user?

2014-12-15 Thread Patrick Pirzer
Okay, now the creation of the new user seems to be started, but i get an 
privilege error.
That's curious because my user is an administrator on the virtual machine, 
where i'm testing my setup.
My actual version for the creation of the user looks now like that:

util:Group Id=Administrators
Name =Administrators
Domain=[ComputerName] /
Component Id =CreateUserAccount
   Guid=AEE91491-99FA-40A9-AB47-1E9FC2DDEF2A
   Directory=TARGETDIR
util:User Id =SQLUser
   Name=[DBUSER_PROP]
   Password=[DBPW_PROP]
   UpdateIfExists=no
   CreateUser=yes
   PasswordNeverExpires=yes
   PasswordExpired=no
   RemoveOnUninstall=no
   Domain=[ComputerName]
util:GroupRef Id =Administrators/
/util:User
/Component

--
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration  more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=164703151iu=/4140/ostg.clktrk
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


Re: [WiX-users] How to install a new user?

2014-12-15 Thread Phil Wilson
The answer to you in StackOverflow is accurate - it doesn't matter if
someone is an administrator or not. Nobody has admin privileges unless
they elevate.

---
Phil Wilson


On Mon, Dec 15, 2014 at 1:19 AM, Patrick Pirzer
patrick.pir...@prosoft.net wrote:
 Okay, now the creation of the new user seems to be started, but i get an 
 privilege error.
 That's curious because my user is an administrator on the virtual machine, 
 where i'm testing my setup.
 My actual version for the creation of the user looks now like that:

 util:Group Id=Administrators
 Name =Administrators
 Domain=[ComputerName] /
 Component Id =CreateUserAccount
Guid=AEE91491-99FA-40A9-AB47-1E9FC2DDEF2A
Directory=TARGETDIR
 util:User Id =SQLUser
Name=[DBUSER_PROP]
Password=[DBPW_PROP]
UpdateIfExists=no
CreateUser=yes
PasswordNeverExpires=yes
PasswordExpired=no
RemoveOnUninstall=no
Domain=[ComputerName]
 util:GroupRef Id =Administrators/
 /util:User
 /Component

 --
 Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
 from Actuate! Instantly Supercharge Your Business Reports and Dashboards
 with Interactivity, Sharing, Native Excel Exports, App Integration  more
 Get technology previously reserved for billion-dollar corporations, FREE
 http://pubads.g.doubleclick.net/gampad/clk?id=164703151iu=/4140/ostg.clktrk
 ___
 WiX-users mailing list
 WiX-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wix-users

--
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration  more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=164703151iu=/4140/ostg.clktrk
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


Re: [WiX-users] How to install a new user?

2014-12-15 Thread Patrick Pirzer
Thank You Phil!
I saw it this morning and will make a new test run.


-Ursprüngliche Nachricht-
Von: Phil Wilson [mailto:phildgwil...@gmail.com] 
Gesendet: Montag, 15. Dezember 2014 20:45
An: General discussion about the WiX toolset.
Betreff: Re: [WiX-users] How to install a new user?

The answer to you in StackOverflow is accurate - it doesn't matter if someone 
is an administrator or not. Nobody has admin privileges unless they elevate.

---
Phil Wilson


On Mon, Dec 15, 2014 at 1:19 AM, Patrick Pirzer patrick.pir...@prosoft.net 
wrote:
 Okay, now the creation of the new user seems to be started, but i get an 
 privilege error.
 That's curious because my user is an administrator on the virtual machine, 
 where i'm testing my setup.
 My actual version for the creation of the user looks now like that:

 util:Group Id=Administrators
 Name =Administrators
 Domain=[ComputerName] /
 Component Id =CreateUserAccount
Guid=AEE91491-99FA-40A9-AB47-1E9FC2DDEF2A
Directory=TARGETDIR
 util:User Id =SQLUser
Name=[DBUSER_PROP]
Password=[DBPW_PROP]
UpdateIfExists=no
CreateUser=yes
PasswordNeverExpires=yes
PasswordExpired=no
RemoveOnUninstall=no
Domain=[ComputerName]
 util:GroupRef Id =Administrators/
 /util:User
 /Component

 --
  Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT 
 Server from Actuate! Instantly Supercharge Your Business Reports and 
 Dashboards with Interactivity, Sharing, Native Excel Exports, App 
 Integration  more Get technology previously reserved for 
 billion-dollar corporations, FREE 
 http://pubads.g.doubleclick.net/gampad/clk?id=164703151iu=/4140/ostg.
 clktrk ___
 WiX-users mailing list
 WiX-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wix-users

--
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server from Actuate! 
Instantly Supercharge Your Business Reports and Dashboards with Interactivity, 
Sharing, Native Excel Exports, App Integration  more Get technology previously 
reserved for billion-dollar corporations, FREE 
http://pubads.g.doubleclick.net/gampad/clk?id=164703151iu=/4140/ostg.clktrk
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

--
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration  more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=164703151iu=/4140/ostg.clktrk
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


Re: [WiX-users] How to install a new user?

2014-12-14 Thread Patrick Pirzer
   Key=Software\prosoft\staffdirector
   Name=installed
   Type=integer
   Value=1
   KeyPath=yes /
/Component
/Directory
/Directory
/Directory

!-- Complete feature which will be installed. --
Feature Id=Complete
 Title=Prosoft Staffdirector
 Level=1
 Display=expand
 ConfigurableDirectory=INSTALLLOCATION

!-- Main content of the Complete feature. --
Feature Id=MainContent
 Title=MyWeb Website
 Description=The website content
 Level=1

!-- Include IIS Configuration. --
ComponentGroupRef Id=WebsiteIssConfiguration /

!-- Include web content. --
ComponentGroupRef Id=SourceComponentGroup /
/Feature
/Feature
/Product
/Wix

-Ursprüngliche Nachricht-
Von: Phill Hogland [mailto:phogl...@rimage.com] 
Gesendet: Donnerstag, 11. Dezember 2014 15:00
An: wix-users@lists.sourceforge.net
Betreff: Re: [WiX-users] How to install a new user?

Every component needs a keypath and if it does not include a File or Registry 
element it must have a Component/@Directory which implies that you define a 
directory tree.

There is an example directory structure here.
http://wixtoolset.org/documentation/manual/v3/howtos/files_and_registry/add_a_file.html

You might consider this  blog
http://robmensching.com/blog/posts/2010/5/2/the-wix-toolsets-remember-property-pattern/
and use the registry entry for saving your property as the keypath (which still 
needs the driectory tree).




--
View this message in context: 
http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/How-to-install-a-new-user-tp7598529p7598530.html
Sent from the wix-users mailing list archive at Nabble.com.

--
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server from Actuate! 
Instantly Supercharge Your Business Reports and Dashboards with Interactivity, 
Sharing, Native Excel Exports, App Integration  more Get technology previously 
reserved for billion-dollar corporations, FREE 
http://pubads.g.doubleclick.net/gampad/clk?id=164703151iu=/4140/ostg.clktrk
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

--
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration  more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=164703151iu=/4140/ostg.clktrk
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


Re: [WiX-users] How to install a new user?

2014-12-11 Thread Phill Hogland
Every component needs a keypath and if it does not include a File or Registry
element it must have a Component/@Directory which implies that you define a
directory tree.

There is an example directory structure here.
http://wixtoolset.org/documentation/manual/v3/howtos/files_and_registry/add_a_file.html

You might consider this  blog
http://robmensching.com/blog/posts/2010/5/2/the-wix-toolsets-remember-property-pattern/
  
and use the registry entry for saving your property as the keypath (which
still needs the driectory tree).




--
View this message in context: 
http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/How-to-install-a-new-user-tp7598529p7598530.html
Sent from the wix-users mailing list archive at Nabble.com.

--
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration  more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=164703151iu=/4140/ostg.clktrk
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users