Results 1 to 5 of 5

Thread: somebody help!!!

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Jun 1999
    Location
    Victoria, Australia
    Posts
    23

    Post

    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

  2. #2
    So Unbanned DiGiTaIErRoR's Avatar
    Join Date
    Apr 1999
    Location
    /dev/null
    Posts
    4,111

    Post

    setups usually come with a setup.ins look there

    ------------------
    DiGiTaIErRoR

  3. #3
    Member
    Join Date
    May 1999
    Posts
    49

    Post

    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.

  4. #4

    Thread Starter
    Junior Member
    Join Date
    Jun 1999
    Location
    Victoria, Australia
    Posts
    23

    Post

    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

  5. #5
    Member
    Join Date
    May 1999
    Posts
    49

    Post


    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!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width