Does any one know if wise script has any functionality to check if the current logged on user has local admin rights and if so, continue the installation. I know I can achieve this using an MSI, but wanted to find out if it can also be done with wise script.

Let me know if you know of any other method that would allow me to check if the current logged on user is local admin and if so, return a value.
0 Comments   [ + ] Show Comments

Comments

Please log in to comment

Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.

Answers

0
Have a search on AppDeploy for 'computerperformance'. One of my posts containing that text will have a number of links to scripting sites (including computerperformance.co.uk) where you'll find some VBSs for testing group membership. If VBS isn't your thing, I'm sure the code could be adapted.

BTW, if the WiseScript is destined to be in an MSI, why not simply use the test 'IsAdmin' or 'Privileged' (one supercedes the other, I can never remember which is which...) as a condition on whatever feature/component/CA you're concerned with?
Answered 04/18/2009 by: VBScab
Red Belt

Please log in to comment
0
My situation is that I have a vendor EXE which requires local admin rights to install properly. If the user doesn't have local admin right, then it doesn't install all of the features.

I need a script that would check to see if a user is local admin and if so, continue with the script and launch install for the application. I was thinking of using 2 separate WiseScripts to achieve my this goal. My first script would try to create a registry key under HKLM->Software. I assume that if a user has local admin rights, then the script should be able to create the registry key under HKLM->Software. If the user isn't local admin, then the script would fail, but basically either way, I would have my 2nd script search for a string within the log file of the first script.

Do you think this is a good design for my script? You thoughts are very much appreciated!

Thanks!
Answered 04/18/2009 by: justinSingh
Blue Belt

Please log in to comment
0
My situation is that I have a vendor EXE which requires local admin rights to install properly. In what way does that differ from every other vendor install? Anything which requires write access to the file system and/or registry will require local admin rights.

Do you think this is a good design for my script? Why are you making things so complicated? First, any install will require admin rights. Second, I'd highly recommend capturing it as an MSI and working from there.
Answered 04/19/2009 by: VBScab
Red Belt

Please log in to comment
0
first script would try to create a registry key under HKLM->Software

Make sure you clean up afterwards - otherwise your second script will assume that anyone subsequently logging on to that computer is admin :-)
Answered 04/20/2009 by: revizor
Third Degree Blue Belt

Please log in to comment
0
You can try using ifmember.exe which checks whether a particular user is member of a particular group.


http://www.microsoft.com/downloads/details.aspx?FamilyID=07C2F6D7-815E-4FA0-9043-4E4635CCD417&displaylang=en

This works like a charm and returns exit code which can be used for scripting.
Answered 04/20/2009 by: blacklisted_packager
Orange Belt

Please log in to comment
0
Sorry VBScab! I forgot to mention that the vendor installation is already a MSI wrapped in a EXE. The EXE has some logic built-in which passes the info contained in the .dat file for the app installation to use. I've tried logging the MSI installation and looking in the "Commandline" section of the log to see what properties or parameters were being passed by the EXE to the MSI. I didn't find any parameters I haven't already tried passing to the MSI directly and even if I run the MSI just with the /qb switch, I get the installation, but not the information contained within the .def file.

BTW, the app I'm working with is Clear Case 7.

I do appreciate everyone's time and advice on this. Thank you!
Answered 04/20/2009 by: justinSingh
Blue Belt

Please log in to comment
Answer this question or Comment on this question for clarity