Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / January 2008

Tip: Looking for answers? Try searching our database.

installer problems on Vista

Thread view: 
patrick - 08 Jan 2008 18:57 GMT
Is there a way to determine from within a java application running on
Windows Vista what type of account the user is logged on as. i.e. standard
or administrator?

TIA
Andrew Thompson - 08 Jan 2008 21:54 GMT
>Is there a way to determine from within a java application running on
>Windows Vista what type of account the user is logged on as. i.e. standard
>or administrator?

JOptionPane.showMessagedialog(
 null,
 "logged on as admin?",
 JOptionPane.QUESTION_MESSAGE);

A more interesting question is.. what are you intending to
offer the end-user, that requires this feature?

Signature

Andrew Thompson
http://www.physci.org/

patrick - 08 Jan 2008 22:30 GMT
I want to advise the user to log in as administrator so that my updater
works.
 I cannot get  the updater (a downloaded install.exe file) to install to
the Program Files install folder from a standard Vista account.
But all works fine from admin account.Ive tried Vista execution levels of
"as invoker","highest available","require administrator"  from standard
account
but it pops up a dialog saying it cannot write for each file to be
updated.(Maybe its because it doesnt want to overwrite these files.dunno.)
Putting up an option pane question is possible ok, but not nice.People might
not even know their account type.

>>Is there a way to determine from within a java application running on
>>Windows Vista what type of account the user is logged on as. i.e. standard
[quoted text clipped - 7 lines]
> A more interesting question is.. what are you intending to
> offer the end-user, that requires this feature?
Andrew Thompson - 09 Jan 2008 04:24 GMT
Please refrain from top-posting.  I find it very confusing.

>I want to advise the user to log in as administrator so that my updater
>works.

Well put.  That clarifies much.

>  I cannot get  the updater (a downloaded install.exe file) to install to
>the Program Files install folder from a standard Vista account.
[quoted text clipped - 3 lines]
>but it pops up a dialog saying it cannot write for each file to be
>updated.(Maybe its because it doesnt want to overwrite these files.dunno.)

When you say 'it' do you mean the OS or the installer
software?  What installer are you using?  I am only (a
little) familiar with NSIS.

Doesn't the *installer* offer some way to check if the
operations will be allowed, and if not, pop a dialog to
warn the user (to log in as administrator)?

>Putting up an option pane question is possible ok, but not nice.People might
>not even know their account type.

That is true, best find some way to test it programmatically,
and only ever bother the user with 'account types' if it fails.

Signature

Andrew Thompson
http://www.physci.org/

patrick - 09 Jan 2008 09:16 GMT
>>  I cannot get  the updater (a downloaded install.exe file) to install to
>>the Program Files install folder from a standard Vista account.
[quoted text clipped - 7 lines]
> software?  What installer are you using?  I am only (a
> little) familiar with NSIS.

Using Install4j.  think it is install4j pops up the dialog boxes.
Roedy Green - 09 Jan 2008 14:10 GMT
> Is there a way to determine from within a java application running on
>Windows Vista what type of account the user is logged on as. i.e. standard
>or administrator?

There won't be a way in Java since this a Vista-specific thing.

So look for a utility and exec it.
See http://mindprod.com/jgloss/exec.html

OR

look around in the Windows C++ API. Then wrap it up in JNI.
See http://mindprod.com/jgloss/jni.html
Signature

Roedy Green Canadian Mind Products
The Java Glossary
http://mindprod.com



Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.