Author |
Topic: Associating files? (Read 732 times) |
|
datwill
Guest
|
 |
Re: Associating files?
« Reply #5 on: May 12th, 2015, 08:47am » |
|
I know, I just remembered last night as I was going to bed, I'll make an app and run as admin (even though I am one on my own computer...)
|
|
Logged
|
|
|
|
Richard Russell
Administrator
member is offline


Posts: 1348
|
 |
Re: Associating files?
« Reply #6 on: May 12th, 2015, 09:28am » |
|
on May 12th, 2015, 08:47am, Daniel Atwill wrote:| I'll make an app and run as admin |
|
You don't have to make an EXE to test it - you can run LBB 'as administrator' and do it that way (although it would be wise to quit LBB as soon as you have finished testing so you don't leave it running with admin privileges for too long).
Richard.
|
|
Logged
|
|
|
|
datwill
Guest
|
 |
Re: Associating files?
« Reply #7 on: May 12th, 2015, 10:32am » |
|
OK! Also, I've tried to look up ways of finding out a users status (i.e. Admin or not), and I got as far as finding a user name... I'll keep looking in MSDN but do you know how to do this?
EDIT: Would GetTrusteeTypeA fit my need? MSDN Quote:| The GetTrusteeType function retrieves the trustee type from the specified TRUSTEE structure. This value indicates whether the trustee is a user, a group, or the trustee type is unknown. |
|
I've found a whole list of security API calls, but don't know which one to use  https://msdn.microsoft.com/en-us/library/windows/desktop/aa446674%28v=vs.85%29.aspx
|
| « Last Edit: May 12th, 2015, 10:50am by datwill » |
Logged
|
|
|
|
Richard Russell
Administrator
member is offline


Posts: 1348
|
 |
Re: Associating files?
« Reply #8 on: May 12th, 2015, 11:35am » |
|
on May 12th, 2015, 10:32am, Daniel Atwill wrote:| I've tried to look up ways of finding out a users status (i.e. Admin or not) |
|
Code: CALLDLL #shell32, "IsUserAnAdmin", admin AS LONG
IF admin THEN
PRINT "User is an admin"
ELSE
PRINT "User is not an admin"
END IF (The function is deprecated, but seems to work in Windows 8.1. It is not available in Windows 2000.)
Richard.
|
|
|
|
datwill
Guest
|
 |
Re: Associating files?
« Reply #9 on: May 12th, 2015, 4:03pm » |
|
Wow, I didn't know it was that easy... I'm a bit ashamed actually... Thanks
|
| « Last Edit: May 12th, 2015, 4:03pm by datwill » |
Logged
|
|
|
|
|