
http://uk.geocities.com/charlie.pegwell ... /snake.bmp
Moderators: gnozal, ABBKlaus, lexvictory
@nco2k[14] AUG 13th 2007 TailBite v1.3 PR 1.852
- fixed problem where the PureBasic registry key was not found (nco2k)
- fixed problem with usb-stick installation
when this update does not fix your problem, could you pm me your TailBite.prefs file located in %APPDATA% or in your TailBite folder.the installation works fine, but i have that problem with TBManager.exe & TailBite.exe.
Code: Select all
Procedure.s GetPBFolder()
Protected hKey1.l, Type.l, Res.l, Folder$, lpbData.l, cbData.l
cbData = (#MAX_PATH*2)+2
lpbData = AllocateMemory(cbData)
Folder$=""
hKey1=0
Type=0
Res=-1
Select OSVersion()
Case #PB_OS_Windows_95,#PB_OS_Windows_98,#PB_OS_Windows_ME
Debug "Detected OS : Windows 95/98/ME"
Res=RegOpenKeyEx_(#HKEY_LOCAL_MACHINE, "Software\Classes\PureBasic.exe\shell\open\command", 0, #KEY_ALL_ACCESS, @hKey1)
Case #PB_OS_Windows_NT3_51,#PB_OS_Windows_NT_4,#PB_OS_Windows_2000,#PB_OS_Windows_XP,#PB_OS_Windows_Server_2003
Debug "Detected OS : Windows NT/2000/XP"
Res=RegOpenKeyEx_(#HKEY_CLASSES_ROOT, "Applications\PureBasic.exe\shell\open\command", 0, #KEY_ALL_ACCESS, @hKey1)
Case #PB_OS_Windows_Vista,#PB_OS_Windows_Server_2008,#PB_OS_Windows_Future
Debug "Detected OS : Windows Vista/Server 2008"
Res=RegOpenKeyEx_(#HKEY_CURRENT_USER, "Software\Classes\PureBasic.exe\shell\open\command", 0, #KEY_ALL_ACCESS , @hKey1)
EndSelect
If Res = #ERROR_SUCCESS
If RegQueryValueEx_(hKey1, "", 0, @Type, lpbData, @cbData)=#ERROR_SUCCESS
Folder$ = PeekS(lpbData)
Folder$ = GetPathPart(Mid(Folder$, 2, Len(Folder$)-7))
EndIf
RegCloseKey_(hKey1)
EndIf
If lpbData
FreeMemory(lpbData)
lpbData=0
EndIf
ProcedureReturn Folder$
EndProcedure
Debug GetPBFolder()
i will create a zip archive containing all needed files in http://www.tailbite.com/downloads/src/TailBite.zipAnyway, could you provide Tailbite as a ZIP archive (including source)
Code: Select all
Debug #PB_OS_Windows_95
Debug #PB_OS_Windows_NT_4
Debug #PB_OS_Windows_ME
I use the following code :Debug wrote:10
20
40
Code: Select all
Procedure.s GetPurebasicFolder() ; Retrieves Purebasic folder [empty string if not installed]
Protected hKey1.l, Type.l, cbData.l, *lpbData, Folder.s
cbData = (#MAX_PATH * 2) + 2
*lpbData = AllocateMemory(cbData)
If *lpbData
If GetVersion_() & $FF0000 ; Windows NT/XP
If RegOpenKeyEx_(#HKEY_CLASSES_ROOT, "Applications\PureBasic.exe\shell\open\command", 0, #KEY_ALL_ACCESS, @hKey1) = #ERROR_SUCCESS
If RegQueryValueEx_(hKey1, "", 0, @Type, *lpbData, @cbData) = #ERROR_SUCCESS
If *lpbData
Folder = PeekS(*lpbData)
Folder = GetPathPart(Mid(Folder, 2, Len(Folder) - 7))
EndIf
EndIf
RegCloseKey_(hKey1)
EndIf
If Folder = "" ; VISTA ... ?
If RegOpenKeyEx_(#HKEY_CURRENT_USER, "Software\Classes\PureBasic.exe\shell\open\command", 0, #KEY_ALL_ACCESS, @hKey1) = #ERROR_SUCCESS
If RegQueryValueEx_(hKey1, "", 0, @Type, *lpbData, @cbData) = #ERROR_SUCCESS
If *lpbData
Folder = PeekS(*lpbData)
Folder = GetPathPart(Mid(Folder, 2, Len(Folder) - 7))
EndIf
EndIf
RegCloseKey_(hKey1)
EndIf
EndIf
Else ; The same for Win9x
If RegOpenKeyEx_(#HKEY_LOCAL_MACHINE, "Software\Classes\PureBasic.exe\shell\open\command", 0, #KEY_ALL_ACCESS, @hKey1) = #ERROR_SUCCESS
If RegQueryValueEx_(hKey1, "", 0, @Type, *lpbData, @cbData) = #ERROR_SUCCESS
If *lpbData
Folder = PeekS(*lpbData)
Folder = GetPathPart(Mid(Folder, 2, Len(Folder) - 7))
EndIf
EndIf
RegCloseKey_(hKey1)
EndIf
EndIf
FreeMemory(*lpbData)
EndIf
ProcedureReturn Folder
EndProcedure
Yes, the path is correct now.ABBKlaus wrote:Hi Gnozal,
i changed my routine, could you redownload the latest version and test it![]()
no need. works fine now. thanks!ABBKlaus wrote:@nco2kwhen this update does not fix your problem, could you pm me your TailBite.prefs file located in %APPDATA% or in your TailBite folder.the installation works fine, but i have that problem with TBManager.exe & TailBite.exe.