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.jpgand 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.