Creating And Deleting Registry Value On Install And Uninstall?

Dec 20, 2006

I have program that on first run will run after installed will setup a server connection. The next times the program is run it will not execute this code to setup the server as it was done in the first run.

I can't use clickOnce IsFirstRun as the customer doesn't want that used for installation.I am using MSI to create the setup. I right click setup / view / Registry. I create a key value, example "HKEY_CURRENT_USERSoftwareReality", "App", "Installed"I set the property AlwaysCreate = false, and DeleteAtUninstall = true.

My big question I don't want to create the key value when the application is first installed. Only delete it when uninstalled.My code for checking for the key value:

Code:If (My.Computer.Registry.GetValue("HKEY_CURRENT_USERSoftwareReality", "App", Nothing) <> "Installed") Then 'The program is running for the first time so create key value My.Computer.Registry.SetValue("HKEY_CURRENT_USERSoftwareRealitySolutions", "CodeRed", "Installed") 'Setup server for the fist time Else 'The key exists so go no need to setup the server'Do something else End If

The key value deletes on the uninstalled - which is what i want it to do. However, it always creates the key value when installed. i don't want it to do this. It should only create the key value in the code.Can any tell me, when setting up the registry in the setup project, is there a way to stop it from creating the key value when the program is installed.

View 4 Replies


ADVERTISEMENT

.net : Uninstall Older Version On New Install?

Jul 12, 2011

how can i uninstall previous version of my windows applcation which is with different name and location? on installing new versions?

View 3 Replies

How To Uninstall Older Version On New Install

Jan 28, 2009

how can i unistall previous version of my windows applcation which is with different name and location? on installing new versions?

View 36 Replies

Uninstall And Install At The Same Setup Msi File

Jul 23, 2010

I created a myapp setup project and set "RemovePreviousVersions = true". I have to uninstall previous myapp first and then install new one. Is there any any way to create a setup msi file to uninstall and install at the same step?

View 7 Replies

Add Printer As Part Of Install And Delete (Uninstall)

Mar 30, 2005

I'm trying to add a printer as part of my install and then remove that printer as part of the uninstall, and I'm not having much luck. I can add the printer using a shell command and the "printUI.dll" but when I try to use the addprinter() from the windows API, nothing happens. When I try to delete a test printer with the deleteprinter() function, it executes fine... but doesn't actually remove the printer. Everything I've been able to find on it seems to indicate that my code is right, but obviously I'm missing something because its not working.

VB
Module Module1
Public Declare Auto Function OpenPrinter Lib "winspool.drv" _
(ByVal pPrinterName As String, _
ByRef phPrinter As IntPtr, _
ByVal pDefault As PrinterDefaults) As Int32
[Code] .....

View 15 Replies

C# - Monitor Install/Uninstall Of Fonts On Windows?

Sep 4, 2010

I'm kind of shooting in the dark here - searches don't seem to be productive on this. I want to create a .NET program to monitor the install and uninstall of fonts. If something is installed or uninstalled, I want to run a program to do something.

I thought maybe a Windows Service, but haven't gotten very far with figuring out how to monitor fonts. Is this the right way and if so, what am I overlooking? If not, is there a different way to do this?

View 3 Replies

Reading From Registry's Uninstall Section?

Apr 5, 2007

I'm trying to read keys in the HKLM Uninstall section in my attempt to do a software inventory. I tried the WMI, it works but it doesn't show everything. I decided to just read each of the sub keys in the Uninstall section, but it doesn't show everything.

The code works, but it's just not showing some items.

Dim UninstallKey, SubKey As RegistryKey
Dim SubUninstallKeyNames() As String
UninstallKey = RegistryKey.OpenRemoteBaseKey(RegistryHive.LocalMachine, "\" &

[Code]....

View 4 Replies

Enumerate Uninstall Registry Key To Get Displayname & Displayversionvalue

Sep 17, 2010

I am trying to enumerate the

HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindowsCurrentVersionUninstall

registry key and check the displayname & displayversion registry value for all the sub keys under the uninstall key then compare the displayname & displayversion value with a if statement.

For example if one of the the displayname = "Adobe Flash Player 10 ActiveX" & displayversion = "10.1.82.76" then textbox.text = "Your adobe flash is up to date"

This is the code I been using to check a specific registry value to see if quicktime 7.67.75.0 is installed i figured it would be best to enumerate the subkeys and check the displayname & displayversion because im checking like 6 programs to see if the version is current.

Dim quicktime As String
quicktime = My.Computer.Registry.GetValue _
("HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindowsCurrentVersionUninstall{EB900AF8-CC61-4E15-871B-98D1EA3E8025}", "DisplayVersion", Nothing)

[Code].....

View 1 Replies

Can Uninstall Functionality Be Modified To Catch Other Instances Of Application / Also Uninstall Them?

Jun 23, 2011

Have a VB.net application that installs initially from CD and then when the user gets into the internet the application updates. In order to better support problems with this application is has been suggested in the past to uninstall it and do a fresh re-install. However, in investigation it was determined that the uninstall does not consider all installed objects and does not uninstall the CD install.Can the uninstall functionality be modified to catch the other instances of this application and also uninstall them?

View 11 Replies

Deleting A Registry Value?

Apr 20, 2011

I have this code which should make my application start on startup or stop it from starting on startup depending on whether a checkbox is checked or not:

If MnuItemAutoStart.Checked = True Then
My.Settings.Startup = True
'This code all works fine, it creates the registry key like clockwork
Dim oReg As RegistryKey = Registry.LocalMachine

[code]....

I have tried running the program as administrator, using a different registry value, turning off all of my antivirus & firewalls and loads of other stuff. The strange thing is that I can delete the registry key in regedit, or any other program, it's just my program won't do it. It works on another program with exactly the same code (same startup code, different program).

View 3 Replies

Deleting Registry Key?

Feb 9, 2009

I have been looking for ages trying to find a way to delete a registry key in vb.net - This works: My.Computer.Registry.LocalMachine.DeleteSubKey

But my problem is that the key I want to delete has a different name on every computer. I.E. "KL Deployment Wrapper5444789417547544987"

I have played arround with: My.Computer.Registry.LocalMachine.GetSubKeyNames.Find

View 1 Replies

Deleting A Registry String Value?

Jun 30, 2009

I need to delete a registry string value.The registry string value that I'm trying to delete is:

HKEY_LOCAL_MACHINESoftwareMicrosoftMSDN SetupDefaultSet

I've tried googling for results, but none of the sample scrips I have located have done the trick.They all seem to throw a bunch of errors in Visual Basic 2008 Express Edition.

View 9 Replies

VS 2010 VB And Deleting From Registry

Dec 5, 2011

I have access to VS 2010 through work and I'm having a bit of a play. I'm trying to create a small program to show the installed software from GP and have the ability to delete a selected registry key from a list. Am using a checked list box and 2 buttons. Also have 2 labels on the form but just using them as a visual check as to what the string says.

The program starts alright and gives the list of installed software from Group Policy. I'm having the problem deleting the ticked item. Here is the code I'm using. I think the problem is when it comes to the .deletesubkey line and what I have entered. I want it to delete the selected item rather than have the specific key name entered.

Imports Microsoft.Win32

Public Class Form1

Private Sub Form1_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load

[CODE]...

View 2 Replies

On Install Add Registry Key?

Jan 27, 2009

upon install in clickonce application is there away to add a registry key?

I want to add a reference for startup.

View 2 Replies

Creating And Deleting A Temp File?

Jul 15, 2009

I have a function that is called getWinTemp, it is below, the point in this is to create a temp file in the directory and then stuff it full of calculations and then delete it when the code has finished with it, does this code do that in .net??

Public Sub cleanInput(infile As String, width As Integer)
tempfile = getWinTemp
Name infile$ As tempfile
Open tempfile For Input As #1

[code]....

View 4 Replies

Creating, Running, Deleting A Batch In .NET?

Dec 6, 2009

i know how to shell an existing batch file with shell, however, the code inside the batch i want to change depending on a certain variable,so is there a way i can write a textfile and save it as a .bat then run it, and delete it after, so the user does not really ever see the .bat file (so it seemingly looks like the program itself is running the commands)

View 4 Replies

Creating An Installer File To Install SQL Server?

Jun 4, 2010

I have an application that uses a SQL Server backend. I wish to be able to create an Install project where the it can install SQL Server and/or an instance on the users machine. Has anyone ever done this before? If so, how is it done? Any examples, etc.

View 2 Replies

Creating Install Directory - Automatically Find The Desktop For Xp

Aug 19, 2010

im an amateur programmer making a program for somebody else. i need to get it to run out of the box no problems and i need to find a way to automatically find the desktop for xp but it would be nice if the same code worked on vista/7 to but thats only if its convenient.

View 4 Replies

Deployment :: Publish And Install A Win App Without Creating Start Menu Entry

Aug 19, 2009

I've built a couple of Apps successfully, but having published them to a Network Folder, Non-Admin Users can't install them themselves because the Install attempts to create an Entry in the Start Menu. There may be other Security issues (I need 4 of the permissions included if I publish it as a Partial Trust Applications, which I think affect this) after this point that I'm not aware of, but yeah, it fails when trying to create a Start Menu item -

+ Access to the path 'C:Documents and SettingsJameOStart MenuProgramsMynas' is denied.

I think excluding the right is just part of the SOE, but is there some way I can create this and have it NOT create a Start Menu item, haven't been able to find any?

View 4 Replies

VS 2010 Creating Install File With Additional Programs In VB Express?

Mar 16, 2012

I'm sure there is an easy answer to this, and it may be "no," but is it possible to create an install file in VB Express 2010 and have that file deploy additional .exe files?

I developed a windows form program that calls fortan routines (in seperate .exe files) for different purposes. I would like to create an install file that deploys not only my VB program, but all of the supporting code.

Is this possible with VB Express 2010? I tried to search for threads about this, but didn't find any that explicitily answered this question.

View 2 Replies

Creating A Registry Key?

Jul 12, 2011

Im trying to create a register key at

HKEY_CURRENT_USER\Software\Microsoft\Windows\Cur�rentVersion\Run to make my program run at startup (and no its not a keylogger ) i got this code but it just create a directory called "cur-rentVersion" (because CurrentVersion already exist)

[code].....

View 4 Replies

File I/O And Registry :: Deleting Lines In A Sequential Text File?

Mar 22, 2009

I know that Deleting a specific line in a sequential text file is impossible but instead copy the needed lines and not copying the unneeded ones to an output file .. killing the old one and renaming the new one with the same.. I can't make this step...

That is my record file

Code:
Input #1, CustomerName, CustomerHomeAddress, CustomerBussAddress, CustomerTel1, CustomerMob1, CustomerID, DateRent, CarRegPin

Code:
"Josek Sam","68 West Land Street","149 Union of States","4524563","45635463","JOSKSAM1",#2009-03-02#,"MILANCGLZ2008"
"Josef Malm","142 Unions Street","64 Hamersters Street","452504","42542054","JOSFMALM2",#2009-03-06#,"MILANCGLZ2008"
"Dave Green","131 Oxford Street","96 BlueBane Route","452542452","43254345","DAVGRN3",#2009-03-07#,"MILANCGLZ2008"

I made a form that when you put your CustomerID in Text3 Box.. it access the records and make some calculations. now.. The customer will return the car.. Then his data should be deleted.. I want to know how to make that when I enter the CustomerID and press on the Command button .. It copies the other lines to a new output folder and doesn't copy these ... So it appears to be deleted using this way..

View 3 Replies

File I/O And Registry :: Publishing Access File And Then Referencing After Install?

Apr 28, 2010

i have a problem where i've hard coded the file path of an access database i'm using with a VB.net program. this means that if i publish the program the database doesn't publish with it and i have to "ship" the program with the the database file separately and create another form so the user can say where the file is held. i don't want to do this.is there any way to get the access database file to publish with the program and then access that file path by code? for example the database file is held in the same folder as the installed program and then is accessed by code so there is no need to use a specific file path.

View 1 Replies

VS 2008 Creating Registry Folder?

Jan 22, 2010

I tried googling it, but I couldn't find it.How do I create a new folder (not key!) in the registry?

eg:
HKEY_LOCAL_MACHINESOFTWAREMyProgam

View 4 Replies

VS 2010 Creating A Binary Value In Registry

Aug 22, 2011

i want to make a VB code that enters the Binary type data in a subkey with the name as NoEntries and data as some string like 02 00 00 00. I have written a code :

[Code]...

View 9 Replies

Create A Setup Installer To Auto-install Fonts When User Install Apps?

Jan 26, 2010

Is it possible to create a setup installer that will auto install fonts when user install the applications?

View 6 Replies

Deployment :: Create Install File Without The Need For User To Install SQL Server?

Jun 6, 2009

I have a project that i have created in Visual Studio express and SQL server express. i want to create an install file so that i can send to others to install. Currently it is requiring the user to install SQL server Express and 3.5 .net framework.what steps can i take to stop the user having to install these 2 so that it is a simple install for them.

View 2 Replies

Make A Simple Install Wizard To Install The Program?

Nov 10, 2009

I'm looking to make a simple install wizard to install my program (I know Visual Studio 2010 already has an installer) but anyway, I would like to make it myself, kind of line reinvent the wheel?

View 3 Replies

File I/O And Registry :: Creating A Text File, And Using It Among Different Windows Users

May 31, 2009

I created an application that when a user logs onto their Windows account, a Form is displayed outlining the current Computer Usage policy set by the insitution and gives the user two options either Agree or Dis-Agree. The two options are in the form of buttons, with events that depending on what the user clicked, will create a log text file at a specified location, with enteries of Date,Time,CurrentUser, and if they agreed or disagreed. If they agreed the application after creating/amending the file will then terminate, otherwise it will update the file and then force Windows to logoff the current user.

Now I made a shortcut of the .exe of the application and placed it in the startup for all users, and yes the application loads at startup for all the users following the procedures mentioned above. The problem I am facing is, that if the current user logs off, or is forced to log off, and another user logs onto Windows, goes through the whole ordeal mentioned above, the application is denied access to the logfile that was created under the previous user, and thus crashes.

So my question is, how can I created a text file using vb 2008 application, that is accessible by multiple Windows users. I have even tried changing the location of the created file to the shared folder, but the end result is the same.

View 1 Replies

Click Install Feature Will The Application Install On A MAC?

Mar 30, 2010

With the on-line one click install feature will the application install on a MAC?

View 2 Replies







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