.net - Compiling A Click-once App That Requires Administrator?

May 25, 2010

A lot of my programs require the ability to write files to the hard drive. When I first made these programs for XP they worked great. Now I'm less ignorant about UAC (got a new laptop recently). And for future customers...I've noticed the potential for a LOT of annoying error messages....and quite frankly if the program can't write data to the hard drive or thumb drive it's on...there's no point to running it....

I've tried multiple times to build in the manifest a requirement for administrator or user access....I'm not sure if anything less would solve the problem...but have failed because click-once has security features in place to prevent me from doing so.I'd rather not have to tell my customers how to make the program run as an administrator by editing the file's properties...I'd much rather have a convenient pop up like what you'd see new programs such as Itunes or Filezilla show if they were in conflict with UAC requesting the privileges they need.

I'd really like to do this but have had little success.

View 1 Replies


ADVERTISEMENT

C# - Unit Testing Using InternalsVisibleToAttribute Requires Compiling With /out:filename.ext?

May 13, 2010

In my most recent question: Unit Testing Best Practice? / C# InternalsVisibleTo() attribute for VBNET 2.0 while testing?, I was asking about InternalsVisibleToAttribute.I have read the documentation on how to use it, and everything is fine and understood. However,I can't instantiate my class Groupe from my Testing project.I want to be able to instantiate my internal class in my wrapper assembly, from my testing assembly.

EDIT #1

Here's the compile-time error I get when I do try to instantiate my type:

Erreur 2 'Carra.Exemples.Blocs.ActiveDirectory.Groupe' n'est pas accessible dans ce contexte, car il est 'Private'. C:OpenProjectsExemplesSrcCarra.Exemples.Blocs.ActiveDirectoryCarra.Exemples.Blocs.ActiveDirectory.TestsGroupeTests.vb 9 18 Carra.Exemples.Blocs.ActiveDirectory.Tests

(This says that my type is not accessible in this context, because it is private.) But it's Friend (internal)

EDIT #2

Here's a piece of code as suggested for the Groupe class implementing the Public interface IGroupe:

#Region "Importations"
Imports System.DirectoryServices
Imports System.Runtime.CompilerServices[code]........

View 3 Replies

Click Once 2010 .net 4 Windows Program Running As An Administrator?

Jun 28, 2011

My VB.net framework 4 windows program work fine for the users on Windows XP machines if they are in the local Administrator Group. I would like to setup this click once application to run as an administrator so the user doesn't need to be in the Administrator group. The program is reading the"C:Documents and Settings" & User & "Local SettingsTemp" folder looking for files with extension like "emf", "tmp" and "htm" and then deleting the files if they are older than 24 hours. We have a third party application that adds these file and doesn't delete them so I need the users to run this cleanup program.

View 2 Replies

Creating A Program That Requires The User To Click A Checkbox?

Apr 27, 2009

I am creating a program that requires the user to click a checkbox and then select a date in a Date Time Picker Control. There will be up to 20 entries. I need to know how to take all of the dates entered and display on a diffrent form the latest date selected by the user from all the entries on a form. All the options will be training selected and when the last training item is selected and a date entered I need to be able to output the training completion date wich will be the latest date entered in the form.

View 4 Replies

Allow Administrator Rights To StartupPath Only, On A Non Administrator O.s?

Nov 26, 2009

i currently have a project that needs to edit a few files in the startuppath folder. on a non administrator o.s., if my app. is installed in ( c:program filesmy crappy little app ), i cannot write to those files. in win7, it does not even ask for administrator approval, just the option to save to my documents.. this can be quite a hassle to work with, specially on closing the app, since i have quite a few files that need to be updated.

View 7 Replies

Compiling Error 'The Value "Ctrl" Can't Be Found' While Compiling VB2008 Imported Project

Feb 15, 2010

In one of my forms witch I imported from VB2008 there are all properties saved in the *.resx file. One Property, of the Type System.Windows.Forms.Keys, can contain the Value 'Ctrl+F1' witch compiles fine in VB2008, but not in VB2010. To reproduce, simply add the following to any resx file:

<data name="cmdFenster.ShortcutKeys" type="System.Windows.Forms.Keys, System.Windows.Forms">
<value>Ctrl+F1</value>
</data>

It will compile fine with VB2008, but not with VB2010. Notice: The VB2010 also generates this Code in the resx file

View 2 Replies

Compiling DLL On XP?

Dec 21, 2011

I'm trying to compile old Visual Basic dll code on XP, and it gives me error message "Error in loading DLL". I don't know exacty which dll is it, but the project references external dll created in visual studio 2008.

View 2 Replies

Compiling Exe(s) Into MSI?

Jun 21, 2010

I am using VB .NET 2010 express, thought I don't know how much that matters. I was wanted to create an MSI installation of a bunch of EXE patches. How can I do this?

I already have a program made that downloads all the patches and places them in a folder. I just need something to takes all those and make them into 1 .msi file.

View 8 Replies

Run A .vbs Script As An Administrator

Mar 26, 2012

I have a script I have created and If i just call it with process.start, it fails.

if i right click the script, and select run as administrator it works.

Is there a programaticall way of doing this with process.start?

Right now I have

Process.start("c:test.vbs")

View 4 Replies

Run Shell() As Administrator?

Nov 14, 2009

I have an update app, which can be updated itself by another update app (so, the second app is an updater of the main updater). Both apps must have administrator permissions because of writing in the Program Files folder. Is it possible that when the main updater is running (under administrator rights) it can use Shell() to let the second updater run with administrator rights without a UAC confirm dialog popping up again?

View 3 Replies

Compiling A .net Application With Either A 32-bit Or 64-bit Dll?

Aug 17, 2010

I have an application that we wrote here at work that uses the SharpSVN wrapper for SVN. It has served us well of the past few years. However, we have started bringing in 64-bit systems and our application cannot seem to access the SharpSVN dll on these systems. I have downloaded the 64-bit version of the SharpSVN dll and I am wondering what to do next. I cannot stop my 32-bit users from using the application, so I need to be able to compile for both platforms. Luckily, with this application, we split different layers of the ntier stack into separate projects within the solution so my business layer that utilizes the SharpSVN dll is on its own.How would I go about compiling both a 32-bit and 64-bit version of my application without having to maintain two copies of the project?

View 2 Replies

Compiling An Exe With A Database

Feb 1, 2010

My program is a database one. I need it to compile to an exe. And be able to be put on a cd and sent into school with the database working? How do i ?

[Code]...

View 6 Replies

Compiling In 64 Bits With A 32 Bit Dll?

Nov 4, 2010

I have a 3rd party dll, and I can't have it referenced while compiling for 64 bit. Is there a way around this? I'm guessing it is because the dll is a 32 bit one, but I'm not sure about that.

View 7 Replies

App Needs Administrator Priviliges To Save To Db?

Jan 30, 2010

i made one form database app and make it full trust app then i run it on non administrator user and when i try to save data it gives me exception but works very well on administrator user !!can i make the app works well on non administrator user?

View 4 Replies

Can't Access The Administrator Account

Jul 15, 2009

I created a vb application and I'm trying to deploy it. However, it needs to be run as administrator, which is not ideal as several machines I'm deploying it to can't access the administrator account. The odd part is that the development environment isn't on an administrator account. When I double click the compiled executable it runs fine. When I right click and choose Run As Current User the program crashes and gives me the same error I got when trying it on the target machines(without access to the administrator account.)

[Code]...

View 13 Replies

Getting Administrator Privileges Error

Sep 1, 2010

I am using following code to get a directory of files with a particular extension. It throws an error that you donot have administrator privileges.[code]...

View 3 Replies

Local Administrator On A Workstation To Run VB6?

Sep 22, 2010

I would like to know if it is necessary to be Local Administrator on a Workstation to run VB6 I mean, just run VB6, write code and compile it.I do not mean to register DLLs, write in registry, etc.My question is just asked at the VB6 application level.

View 8 Replies

Log In As Local Administrator Account?

Aug 11, 2010

In order to install a windows app in user's laptop, I need to log in as local administrator account. To install app, there are two option:

Every one
Just me

Which option should I select in admin account? If I select "Just me", once admin log off and user log in, does user can run app?

View 2 Replies

Opening A File As Administrator?

Aug 21, 2009

I am developing an Excel workbook at work and I've got a problem. I'd like to save information entered in the workbook and save it in another one (called List, for example purposes), using a macro. The problem is that the file in which I want to save the information is located on a server. When people open List.xls, it's Read Only. So, when my macro executes, it opens a Read Only workbook...I'd like to do "Open As", just like you could do by right-clicking on any file in Windows XP. The result would be that the macro would log on as administrator only to open List.xls, write in it and save it under the same name.

View 3 Replies

Run Application In Administrator Mode

Mar 24, 2009

I am developing an application in vb.net2008,Sql Server 2005But there is a problem while running my application on Customer Machine. It throws some security related issues Access Denied or so on....And also my application does not run in Windows Vista.I am changing in my app.manifest file like this ....

[Code].....

View 1 Replies

Run ClickOnce Application As Administrator

Jun 28, 2011

I have a vb.net clickonce application that will be used by low-level personnel with no administrator accesses. However, the application itself needs to save files to a folder on the server that is hidden and only allows read/write access to administrators. I need for these users to be able to interact with this folder using the application without giving them the ability to browse to the folder on their own. I've tried using several impersonation techniques, none have worked.

[Code]...

View 2 Replies

Run External Exe With Administrator Privilage?

Jul 31, 2009

I want to make a VB program that able to run another exe with administrator credentials. The problem is I have a user log in to pc which has XP OS, and he log in using AD account as user, the program he want to run (from another company) require that he should have administrator privileges.

I want to make a program that when he double click on it it will run that program c:companyfile.exe with administrator privileges. I search the internet and most of what I found is very lengthy code, i read the below if a fast way since this is new to me.

[Code]...

View 13 Replies

Running A BAT File As Administrator

Apr 19, 2010

I have a program I am making in VB.NET [ 2010 ], and I can get the BAT file I want to run start, but it's not in 'Elevated Mode' - Is there a way to accomplish this easily? This is the code I have to run the BAT file, which needs to be 'Run as Administrator':

[Code]...

View 27 Replies

Running Program As Administrator??

Nov 14, 2010

i have a visual basic program, and it has a button where, when clicked:

Process.Start("Mover.exe")

Now that works fine, except mover.exe needs to be run as administrator to do its job properly,

is there any way that the vb program could run it with admin privelages?

View 6 Replies

Set Administrator Privileges Selectively?

May 15, 2010

how can i set administrator privileges selectively in my application depending on whether it needs to write a registry value or not?my app needs the elevated privileges once, then each subsequent execution needs standard permission.

View 2 Replies

Shell A Program As Administrator?

Mar 3, 2010

I am writing a setup program that runs as administrator. If I shell a program from the setup program will it also run as administrator?

View 6 Replies

ShortdateFormat Of Application Changes If Run As Administrator

Feb 14, 2011

I have a VB.net application that has datagridviews and date control in windows forms. I have the short date format set in the date controls and short date format is some columns of the datagridview.If I run the application on server 2008 it picks up the wrong short date format. I have the server 2008 regional settings as "en-AU" but for some reason the app picks up en-US as the current culture.If I run the app as the Administrator it seems to pick up the proper culture.[code]

View 1 Replies

This Program Will Not Work When Run As Administrator

Jan 7, 2011

I found a vb.net code, you can drap and drop the image files to picuture box, i have tested on Windows 7 OS, double-clicked the exe file, it worked well, but when i ran this exe as administrator, it did not work, why? i want to run as administrator. The code is below:

Imports System.Text
Public Class Form1
Inherits System.Windows.Forms.Form
Implements IMessageFilter

[code]....

View 7 Replies

VS 2008 Restarting Without Administrator [UAC]

Apr 6, 2010

I've made an application that is meant to be run without administrator privileges in Windows Vista / 7, because UAC disables drag and drop events from lower applications into higher ones, because they could pass bad information into the high trust ones [for example, standard explorer cannot pass files into my program that a user might run in administrator].

[Code]....

View 4 Replies

After Compiling A Project Can't Open The .EXE?

Aug 20, 2010

when i compile the project and run it get the error Project Project has encountered a problem and needs to close. If you were in the middle of somthing, the information you were working on might be lost[ Close ]

View 4 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved