Click to See Complete Forum and Search --> : somebody help!!!
VB-LEANER
Dec 14th, 1999, 01:34 PM
i want to make a program that monitors for installations and setups, so that i can prevent unwanted installtion and setups on the computer
is there any way i can do that??
is there a file which setups and installtions
access so i can disable it??
please help
thanx in advance
DiGiTaIErRoR
Dec 14th, 1999, 03:23 PM
setups usually come with a setup.ins look there
------------------
DiGiTaIErRoR
richie
Dec 14th, 1999, 03:27 PM
How do you mean? Do you want your Install Set up to check if the program is installed, or your exe? I could mail you code that looks for such and such a file in the System folder - no matter what that folder is called - if you want.
VB-LEANER
Dec 14th, 1999, 03:53 PM
yeah, i'd like that code please
maybe to clear things up more - i'd like to make a program that stops and installation or any type. Wheather it may be an ICQ setup or a Nestscape Installtion. I want to stop any installation with my .EXE!!
thanx
richie
Dec 15th, 1999, 12:45 AM
Well, I still don't know what you want to do but if it's any help to you:
On a form put a label called lbldir. Then, in the form, put the code:
Option Explicit
Private Sub Form_Load()
Dim sBuffer As String
Dim TheFile As String
Dim Results As String
Dim Message As String
Dim buttonsandicons As Integer
Dim title As String
sBuffer = Space$(MAX_PATH)
lblDir(1) = GetSystemDirectory(sBuffer, MAX_PATH)
lblDir(1) = Left$(sBuffer, Len(sBuffer) - 1)
TheFile = lblDir(1) & "\filename.txt"
Results = Dir$(TheFile)
If Results = "" Then
Message = "To work this program you need to install" & vbCrLf & "install it. Sorry!"
buttonsandicons = vbOKOnly + vbExclamation
title = "Lingua-Master"
MsgBox Message, buttonsandicons, title
Exit Sub
Else
Load detector2
End If
End Sub
In a module put:
Option Explicit
Public Const MAX_PATH = 260
Declare Function GetWindowsDirectory Lib "kernel32" Alias "GetWindowsDirectoryA" (ByVal lpBuffer As String, ByVal nSize As Long) As Long
Declare Function GetSystemDirectory Lib "kernel32" Alias "GetSystemDirectoryA" (ByVal lpBuffer As String, ByVal nSize As Long) As Long
Make the form the first one in your program. Make it invisible. It automatically looks for the file called 'filename' on the computer's Windows/System folder. If the file is there (you could install it when the person installs your Setup) your App loads as usual. If not there, the message 'Sorry!' pops up.
Hope this helps!
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.