Results 1 to 10 of 10

Thread: [RESOLVED] A Couple of Problems with My Application!

Threaded View

  1. #1

    Thread Starter
    New Member
    Join Date
    Apr 2010
    Posts
    8

    [RESOLVED] A Couple of Problems with My Application!

    Hi guys, I just have a few problems regarding my application, any suggestions would be great, thanks. (I'm quite new to this stuff, making an application(s) for fun haha.)

    1) I'm planning to distribute this application, but the problem is if I send it to another computer the user will most likely not be "Home2" and this code wouldn't work right?.
    Code:
            If (File.Exists("C:\Documents and Settings\Home2\Start Menu\Programs\Startup\example.exe")) = True Then
                File.SetAttributes("C:\Documents and Settings\Home2\Start Menu\Programs\Startup\example.exe", attribute)
            ElseIf (File.Exists("C:\Documents and Settings\Home2\Start Menu\Programs\Startup\example.exe")) = False Then
            End If
    2) How would I make this application download a file off a direct link?
    EX. Here's the direct link:
    http://download772.mediafire.com/jyz...ds_Country.jpg
    and uhm...I want it so if I open the application, it would automatically save this into my C:\Documents and Settings.

    3) Also..how would I make my application run on startup for a MacBook(Only used one once or twice..)? I'm currently putting the application in the startup folder as well as in "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run\example", but these don't work for a MacBook I'm assuming.

    4) My last question is if the codes would cause any errors when my application is used in a Mac...Say for example this code:
    Code:
    Dim FileName As String
            Dim FilePath As Object
            Dim RegistryKey As Object
            FileName = "example.exe"
            FilePath = Path.GetFullPath(FileName)
            RegistryKey = CreateObject("WScript.Shell")
            RegistryKey.RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run\example", FilePath)
    or maybe..
    Code:
    If (File.Exists("C:\WINDOWS\system32\drivers\etc\example.exe")) = False Then
                File.Copy(Application.ExecutablePath, "C:\WINDOWS\system32\drivers\etc\" & My.Application.Info.AssemblyName & ".exe")
            ElseIf (File.Exists("C:\WINDOWS\system32\drivers\etc\example.exe")) = True Then
            End If
    That's it I guess(for now lol), if you have any suggestions for me, please post them! Thanks.

    Not yet answered. Answered.
    Last edited by Bryvx; Apr 25th, 2010 at 05:41 PM.

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