Shell A Program As Administrator?
Mar 3, 2010I 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 RepliesI 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 RepliesI 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 Repliesi 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?
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]....
i've written a database program which runs fine from the ide (vs 2008).when i install this program, all database operations do not work.i tried running it as an administrator using an admin command prompt, it worked.now for my less tech savvy clients, is it possible that when they right click the programs icon they can use the 'run as administrator' menu item? how can i achieve this.if it's too much to implement, will moving the database from the application path to, say, documents?
View 3 RepliesI have wanted to ask. I have a table tlogin. user_nm the first field and second field pass. so when the login form, if I login as admin then there is a special menu for admin.
View 1 RepliesI want to display a prompt to the user as such: "Program requires Administrator privileges to continue, click OK to restart the program with administrator privileges". The question is how can I restart my program so that it asks for them?
View 7 RepliesMy.Computer.FileSystem.DeleteFile(My.Computer.FileSystem.CombinePath(My.Computer.FileSystem.SpecialDirectories.ProgramFiles, "Myprogramfile.txt"))But when I try this it will only work when the program runs with administrator rights. Is there a way to let the program work this way that no administrator rights are needed, or that the program may only boot up as administrator? So they won't be allowed to boot it up without administator rights. (I do not mean to force the administrator, but only to let them press "accept" or "cancel" in the UAC pupop
View 5 Replieshow can i programmatically set my program to 'run as administrator' without having to manually open the programs properties + selecting 'run as administrator
View 8 RepliesI am developing a VB.NET based application which requires administrative privileges in order to run properly. However I went through several tutorials online and it all mentioned how to do this using a mainifest file. The problem with this technique is that whenever the program is opened I need to type in the Administrator password, however I want this to happen automatically. (The user should not type the Admin password, the password must be entered from the code level)[code]...
View 4 RepliesIs there any way to force a setup project to install the program with administrative rights? (or asking the user por permission each time it runs)I coded an application on XP, and now I have problems on Vista/Win 7.
View 14 RepliesMy 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 RepliesWe have developed a 'deployment tool' (say program A) which need to modify system registry, etc info which requires admin rights. This program will be triggered by another program (say program B).
Question, when B call A, how can B initiate A with admin rights? is there any command like A.exe /runas admin or any other way to achieve this. Please note that both programs are developed using VB6.
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 RepliesI've been having huge problems having a VB.NET Windows Forms program run as a scheduled task under XP SP3. The program runs when I set the task up to use my non-admin network username and password, I can see the interface fine (albeit without the desired results - the program requires access to remote shares). When I set the task up with the network administrator account credentials, the task is "Running" but I do not see any interface. It doesn't error - it just kind of sits there happily in the background.
[Code]...
I am trying to execute the shell script in vb.net.[code]...
The script doesn't create the outfile mentioned in -out switch. The path mentioned is correct and also the command with switches is correct. It runs well in command prompt but not in the program. [code]...
I'm going to attempt to make a shell replacement for the Windows default shell: explorer.exe. I'm not sure if its possible using Vb.Net, but I can't seem why not. My end goal is to use a custom made shell for a Windows Preinstallation Environment instead of the default command prompt. I plan to use a 3rd party program to compile the program with the .NET Framework. Otherwise, it wouldn't work because Windows PE does not support the .NET Framework.
View 1 RepliesI'm launching an Access ADE, using Tony Toews auto FE program. The AutoFE programs will, if newer version available, copy the latest version of the ADE from the server, then launch it. My code looks like:
Dim stAutoFE As String = "V:Appsautofestartmdb.exe /cmd /inifile: " & """" & "V:AppsAutoFESSP.ini" & """"
Shell(stAutoFE, AppWinStyle.Hide, True)
System.Threading.Thread.Sleep(1000) ' Time delay
[code]....
I had to put the Sleep delay in, otherwise the GetObject would open the ADE a second time.But I don't know how long the copy from the server will take, so I need to remove that Sleep line and check that the ADE has opened.
So, let's say that I have a VBA application inside of whatever Office Application. I have created a command-line VB.net program to do all of the fun web-services stuff.Okay, the VBA application calls Shell() to run the command line program. Now, what is the best way to get information (a tracking number for a package) from the VB.net program back into the VBA program?
View 1 RepliesI'm trying to make a per-user shell for a Vista box to simplify use of a particular system for my users. I have no problem making a program that I want to use and I am familiar with the process of editin the registry to make my program the users shell but I've run into a snag.
Whenever a user with the custom shell logs on, there is a delay just after they enter their password where the system will sit at "Preparing Desktop" for about 30 seconds. I know for a fact that the user desktop is already made and this shouldn't be taking that long.
I've poked around on the web and see various places saying that winlogon is waiting for the shell to flag a "shell ready" flag of some sort but I am unfamiliar with any such flag.
Anyone know of such a fix for the long login time or anything about a shell ready flag?
visual basic 2010 after converting a program from visual basic 2008 is stating that the Shell function is a namespace and cannot be used as an expression. this can be fixed with the create sub feature but when debugging causes an error stating that there is a nohandled exception.
View 5 RepliesI need to be able to kick off a vb.net program on a windows server from a unix shell script on an AIX server. What what I need to do to make this possible? I'm a newbie on the .Net side, but I was thinking, maybe make the vb.net program some sort of web service then have the unix shell script invoke that somehow
View 2 RepliesWhenever I use this code, I get a File Not Found exception, even though the file paths are all correct. [code]...
View 3 Repliesim working on a little project what executes a bat file on a button click using this command:Interaction.Shell("read.bat", AppWinStyle.NormalFocus, True, -1)however when this is executed the program will become unresponsive while it is running... this may be simple but is there a way i can make my program be responsive and for it to execute in the background?
View 5 RepliesI have the following problem. I have a worker in VB .net (2010) which runs a shell-program. The shell program is a service and output stuff like:
Server initializing...
Server opening port...
more info...
I am able to 'catch' the output of the shell and add it to a textbox (using set text function). And I am able to Cancel the worker by clicking on a stopbutton, however when there is no more output by the shell I cannot stop the worker anymore. At least I suspect that's the case. I've tried checking for endofstream (commented section) but that doesn't work. I've also tried to same code with some test text in stead of 'clsProcess.StandardOutput.ReadLine' and that also works. So I came to the conclusion it must have something to do with clsProcess.StandardOutput.ReadLine being at the end?
Try
clsProcess.StartInfo.UseShellExecute = False
clsProcess.StartInfo.RedirectStandardOutput = True
clsProcess.StartInfo.RedirectStandardError = True
clsProcess.StartInfo.FileName = serverpath + config_executable
[Code] .....
I am using this statement
CODE:
The command procedure calls a Java program that opens a dialog box, the cmd and java exe shows up in task manager, so I know it is being called, but no dialog box. I know normally having anything show up on a server that requires user interaction is a bad idea, but in the case, the users remote into the server to do their work. (They have to because of the environment) So, there is no problem with them being able to respond to a dialog box. I just need it to show up.
(I cannot rewrite the Java program as the latest source is not the right version) Running, Framework 2.0, 3.5.
I am assuming there is a way to have this sub in? I am assuming Do Until Loop is the way to go[cod]e...
View 1 RepliesI'm trying to use the Shell to have my application call an external application but its not working...I don't understand why. I get the following error: 'System.windows.shell' is a namespace and cannot be used as an expression!
Heres my code....any ideas what I'm doing wrong. Its got to be a simple...stupid error.
Private Sub mnuUpgrade_Click(ByVal Ctrl As Microsoft.Expression.Web.Interop.Legacy.CommandBarButton, ByRef CancelDefault As Boolean) Handles mnuUpgrade.Click
[CODE].....................
I know that to start a program at startup, we should add this subkey
"C:Program Files<myprogram's path><nameoftheprog>.exe"
to
HKEY_CURRENT_USERSoftwareMicrosoftWindowsCurrentVersionRun
Alright!
But the problem is when my program has to delete a certain file in C:/ at startup, it just can't because it's not ran as administrator!
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")