| | |
Geting XP - Vista with a program
Please support our VB.NET advertiser: Intel Parallel Studio Home
Thread Solved |
•
•
Join Date: Oct 2009
Posts: 47
Reputation:
Solved Threads: 0
well hi this is my second thread the first one still unsolved lets see about this one.
how can i do that when my program is open and its run in a Vista computer, it have to show a MsgBox and says Error please run as admin and when it is run as admin it wont appear ?
XP don't need to open as admin
P.S sorry for my English. and I'm sorry that i didn't explain good.(i think)
how can i do that when my program is open and its run in a Vista computer, it have to show a MsgBox and says Error please run as admin and when it is run as admin it wont appear ?
XP don't need to open as admin
P.S sorry for my English. and I'm sorry that i didn't explain good.(i think)
•
•
Join Date: Jun 2009
Posts: 271
Reputation:
Solved Threads: 55
2
#2 Oct 16th, 2009
to require admin privileges add into your app.manifest this line
<requestedExecutionLevel level="requireAdministrator" uiAccess="false"/>
to check for privileges:
<requestedExecutionLevel level="requireAdministrator" uiAccess="false"/>
to check for privileges:
vb Syntax (Toggle Plain Text)
if not My.User.IsInRole(ApplicationServices.BuiltInRole.Administrator) then msgbox "Sorry you have to be an administrator" end if
•
•
Join Date: Oct 2009
Posts: 47
Reputation:
Solved Threads: 0
•
•
•
•
to require admin privileges add into your app.manifest this line
<requestedExecutionLevel level="requireAdministrator" uiAccess="false"/>
to check for privileges:
vb Syntax (Toggle Plain Text)
if not My.User.IsInRole(ApplicationServices.BuiltInRole.Administrator) then msgbox "Sorry you have to be an administrator" end if
VB.NET Syntax (Toggle Plain Text)
<requestedExecutionLevel level="requireAdministrator" uiAccess="false"/>
i just do this
VB.NET Syntax (Toggle Plain Text)
Dim MymessageBox2 From load If Not My.User.IsInRole(ApplicationServices.BuiltInRole.Administrator) Then MymessageBox2 = MsgBox("Please Run as Administrator", MsgBoxStyle.Critical) If MymessageBox2 = MsgBoxResult.Ok Then Me.Close()
Thank you my problem is solve
![]() |
Similar Threads
- Program Won't Work With Vista (C#)
- problems with my program installed on Vista (C++)
- Vista freeze ups/lock ups,weird behavior HELP!!!! (Windows Vista and Windows 7)
- Vista Program files c++ code issue (C++)
- Windows vista and bearshare (Windows Vista and Windows 7)
- Xp is ending June 30, Petition to keep it, You might decide you dont like Vista later (Windows Vista and Windows 7)
- help program for Vista? (Windows Software)
Other Threads in the VB.NET Forum
- Previous Thread: db4o,vb.net and my sql
- Next Thread: [URGENT]Convert String("2009") to Date(Year)
Views: 306 | Replies: 2
| Thread Tools | Search this Thread |
Tag cloud for VB.NET
.net .net2008 2008 access advanced application array basic beginner browser button buttons center class click client code combo convert cuesent data database datagrid datagridview date datetimepicker design designer dissertation dissertations dissertationtopic eclipse excel exists fade filter forms function html images lib listview map mobile module msaccess net number objects open panel pdf picturebox picturebox2 port position print printing problem read refresh regex richtextbox right-to-left save search serial settings shutdown socket sorting sqldatbase sqlserver studio temperature textbox timer timespan transparency txttoxmlconverter usercontol validation vb vb.net vb2008 vba vbnet visual visualbasic visualbasic.net visualstudio.net visualstudio2008 web webbrowser winforms winsock wpf wrapingcode xml year





