Hi, all. I want to make my installation program a "run once only" program.
So I currently have the installation program install the compiled VB.
When the VB.exe is run, I have the following code:
Public Shared Function Exists _
(ByVal path as String) _
as Boolean
Public Shared Sub Delete _
(byVal path as String)
Dim setup as boolean
setup = File.Exists(installationprog)
if setup = true then
File.Delete(installationprog)
End If.
When I run this (development mode) VB stops on the word Function with the error message
Compile Error: Expected: Identifier
What am I doing wrong? How should I do this?
BTW, I want this deletion to occur without regards to user privileges, and silently. (That is, no "Are you sure you want to delete this file?" message.)
Suggestions will be appreciated.
Hal W
So I currently have the installation program install the compiled VB.
When the VB.exe is run, I have the following code:
Public Shared Function Exists _
(ByVal path as String) _
as Boolean
Public Shared Sub Delete _
(byVal path as String)
Dim setup as boolean
setup = File.Exists(installationprog)
if setup = true then
File.Delete(installationprog)
End If.
When I run this (development mode) VB stops on the word Function with the error message
Compile Error: Expected: Identifier
What am I doing wrong? How should I do this?
BTW, I want this deletion to occur without regards to user privileges, and silently. (That is, no "Are you sure you want to delete this file?" message.)
Suggestions will be appreciated.
Hal W