Click here to Skip to main content
15,891,184 members

Comments by oppai_kamu (Top 3 by date)

oppai_kamu 2-Jul-12 7:36am View    
Thank you for the answer i have tried the code but it is returning empty string.

so i have opened the registry and checked and the InstallLocation is empty. So i tried to set the value during installation using the following code.


Public Overrides Sub Install(ByVal stateSaver As System.Collections.IDictionary)
InstallDir = Me.Context.Parameters("dir")

Try
Dim regKey As RegistryKey = Registry.LocalMachine.OpenSubKey("Software\Microsoft\Windows\CurrentVersion\Uninstall",True)
regKey.SetValue("InstallLocation", InstallDir)
regKey.Close()

But it is not updating the value.

SK
oppai_kamu 19-Jun-12 8:09am View    
Thank you for the reply
I have
1.added a Installer class to the project.
2.Install method is overwritten as shown above.
3.Uninstall method is written as below
MyBase.Uninstall(savedState)
InstallDir = Me.Context.Parameters("dir")
Try
Directory.Delete(folder1)
Directory.Delete(folder2)
Catch ex As Exception
MsgBox(ex.Message)
End Try
4.to custom actions i have added primary output by right clicking on uninstall.

Am i am missing something?
i am uninstalling through Add/Remove in the control Panle
please advice.
oppai_kamu 7-Jun-12 4:36am View    
thank you for the reply.but i have to modify a part of the binary file.
to be more specific each record contains on integer variable and 5 strings.
i am reading them using binary reader by opening file in
Pwd_FS = New FileStream("test.bin", FileMode.Open, FileAccess.Read)
after reading the contents of the record i will assign new values to the recorod
writing back should i use
Pwd_FS = New FileStream("test.bin", FileMode.Append, FileAccess.Write)
Append will go to the end of the file whereas the record is at the starting and i cannot seek to the starting using fseek.
please suggest how to write back.