Programming and Requiring Admin Rights [VB2010]

A lot of the API calls used to interact with the PalTalk client have been restricted on Windows Vista/7. In order to use the restricted API calls, you must run your application as Administrator. To debug code that includes these restricted APIs, you must start your VB with elevated rights. To do this, right click on your VB program and select the Run As Administrator.


9 thoughts on “Programming and Requiring Admin Rights [VB2010]

  1. k, so I tried installing it on C:ProgramDataPaltalk Bot and still got the damn access denied so i end it up installing it on C:imFilesPaltalk Bot without any admin privilege and its working great 🙂 and the redot and bounce is working fine, the bot still selecting the nicks 🙂

  2. There are a long list of things that require running with elevated permissions. One of those things is to write to any file in the Program Files directory (or sub folders). If you store your application data to the AppData location, you do not need elevated permissions.

    But, since the API to interact with the Nic list writes to another applications memory, I believe that you still need the elevated permissions to interact with the nic list.

    Play with it and see.

  3. Thanks man, i just did this on the Paltalk Bot. One question thou. It seems that the permission is needed only for the text file saving if I install the text files in the user folder. Will the bot work properly or will it have issues connecting to paltalk and stuff since I will take the admin right needed thing off? So users don’t get the message every time the user opens the program.

  4. In the Windows Settings, you will follow the directions and change it to “requireAdministrator”.

    Now when you compile your app, the resulting icon will have the shield on it to denote that it requires administrative rights to run.

  5. Now that you can debug your code and know that it works, you do not want to make your users have to right click and run as admin every time they start your application, so we can set it to require Admin rights before we compile it. To do this, you go to the project properties window and select “View Windows Settings”.

  6. I did install everything besides the text files in Program Files the issue I was having is when I install the text files in


    I still was getting acces denied, but when I install it on


    it work 🙂 But only works on the user login, if you tried to use the bot in another user of the pc the files are not foud 🙄

  7. Normally, you still install the Application into Program Files, but put the data files (that your app writes to) into the CommonAppData location.

    Dim sDataPath As String = IO.Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData), Application.CompanyName, Application.ProductName)
    Dim sAdminList As String = IO.Path.Combine(sDataPath, "Admin.txt")

Leave a Reply

You must Register or Login to comment on Programming and Requiring Admin Rights [VB2010]