Quantcast
Channel: VBForums - Visual Basic 6 and Earlier
Viewing all articles
Browse latest Browse all 21237

Deleting Installation Proram

$
0
0
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

Viewing all articles
Browse latest Browse all 21237

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>