For username you could try passing the USERNAME or LogonUser property to
your custom action
(http://msdn.microsoft.com/en-us/library/aa372385.aspx &
http://msdn.microsoft.com/en-us/library/aa369780.aspx). That may also
give you the domain but as the MSDN pages don't tell you what the format
of those Properties are you might need to do some debugging to check it
first.
Password you'll need to prompt for, no other way around it.

Since you're writing a C# custom action things like domain & username
should be quite easy to pull in .NET using
System.Security.Principal.WindowsIdentity.GetCurrent() rather than
having to pass properties from Windows Installer but that's beyond the
scope of this discussion list.
 
Palbinder Sandher 
Software Deployment & IT Administrator
T: +44 (0) 141 945 8500 
F: +44 (0) 141 945 8501 

http://www.iesve.com 
**Design, Simulate + Innovate with the <Virtual Environment>**
Integrated Environmental Solutions Limited. Registered in Scotland No.
SC151456 
Registered Office - Helix Building, West Of Scotland Science Park,
Glasgow G20 0SP
Email Disclaimer

-----Original Message-----
From: Sagar1111 [mailto:sagarkavitak...@gmail.com] 
Sent: 29 March 2010 15:27
To: wix-users@lists.sourceforge.net
Subject: [WiX-users] Get Current User's Credentials in custom action


Hi,
I have a managed C# custom action which access a webservice hosted on a
machine over a network.
Now in this managed custom action i am getting unauthorized access error
because anonymous access is disabled on iis of that machine.

What i want is to pass the current users credentials to this c# custom
action.
Now how do i achieve this ?
Do i need to ask the user to enter his credentials in UI and then use it
in my C# custom action.
Or is there any other way to get the current users credentials (domain,
username, password).

Thanks in advance
Sagar
--
View this message in context:
http://n2.nabble.com/Get-Current-User-s-Credentials-in-custom-action-tp4
818201p4818201.html
Sent from the wix-users mailing list archive at Nabble.com.

------------------------------------------------------------------------
------
Download Intel&#174; Parallel Studio Eval Try the new software tools for
yourself. Speed compiling, find bugs proactively, and fine-tune
applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users



------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to