[DONE] Administrator mode for Vista

TailBite specific forum

Moderators: gnozal, ABBKlaus, lexvictory

User avatar
ts-soft
Always Here
Always Here
Posts: 5756
Joined: Thu Jun 24, 2004 2:44 pm
Location: Berlin - Germany

[DONE] Administrator mode for Vista

Post by ts-soft »

can you add the manifest for "Request Administrator mode for Windows Vista", please
Without this i can tailbite only using if i start the PB-IDE with admin-privileges.

greetings
Thomas
PureBasic 5.73 | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.
Image
ABBKlaus
Addict
Addict
Posts: 1143
Joined: Sat Apr 10, 2004 1:20 pm
Location: Germany

Post by ABBKlaus »

normally this would be the case :?
I compiled with the newest beta 4.30 Beta 1 but unfortunately i just returned my new Vista System (Quadcore-CPU+Mainboard) to ALTERNATE.

I will test this asap :wink:

Regards Klaus


TailBite Installer Build.pb :

Code: Select all

PBCompile(SrcDirName$+"TBUpdater.pb", SrcDirName$+"TBUpdater.exe", " /ADMINISTRATOR /XP", 0, "", 1)
PBCompile(SrcDirName$+"TBManager.pb", DirName$+"TBManager.exe", " /ADMINISTRATOR /XP", 1, "", 1)
PBCompile(SrcDirName$+"TailBite.pb", DirName$+"TailBite.exe", " /ADMINISTRATOR /XP", 1, "", 1)
ABBKlaus
Addict
Addict
Posts: 1143
Joined: Sat Apr 10, 2004 1:20 pm
Location: Germany

Post by ABBKlaus »

Did you modified the user privileges on the PureBasic installation directory ?
If that´s the case TailBite won´t ask for Admin-Privileges.
User avatar
ts-soft
Always Here
Always Here
Posts: 5756
Joined: Thu Jun 24, 2004 2:44 pm
Location: Berlin - Germany

Post by ts-soft »

ABBKlaus wrote:Did you modified the user privileges on the PureBasic installation directory ?
I have nothing changed
ABBKlaus wrote: If that´s the case TailBite won´t ask for Admin-Privileges.
I start tailbite normal from the ide, but it doesn't do anything. If i start the
ide with admin priviliges (right click: as admin), so tailbite works normal,
without prompting.
I have test tailbite direct, it prompts by directclick :o
My pbinstallation is in "Program Files (x86)" and tailbite is a subdir ob pb

greetings
thomas
PureBasic 5.73 | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.
Image
ABBKlaus
Addict
Addict
Posts: 1143
Joined: Sat Apr 10, 2004 1:20 pm
Location: Germany

Post by ABBKlaus »

Thomas can you test this :

Code: Select all

Procedure.s GetLastError()
  err=GetLastError_()
  buffer.l=0
  ferr=FormatMessage_(#FORMAT_MESSAGE_ALLOCATE_BUFFER|#FORMAT_MESSAGE_FROM_SYSTEM,0,err,GetUserDefaultLangID_(),@buffer,0,0)
  If buffer<>0
    errormsg$=PeekS(buffer)
    LocalFree_(buffer)
    ProcedureReturn RemoveString(errormsg$,Chr(13)+Chr(10))
  EndIf
EndProcedure

ApplicationName$="C:\Program files\TailBite\TailBite.exe"
;ApplicationName$="C:\Windows\notepad.exe"
Verb$="";runas
Dir$=GetCurrentDirectory()

#Test=0 ; 0=Test RunProgram / 1=Test ShellExecuteEx_()
CompilerIf #Test=0
  Res=RunProgram(ApplicationName$)
  If Res=0
    MessageRequester("RunProgram()",GetLastError())
  EndIf
CompilerElse
  si.SHELLEXECUTEINFO
  si\cbSize=SizeOf(SHELLEXECUTEINFO)
  si\fMask=0
  si\hwnd=0;-1 <- use this value to see the bug !
  si\lpVerb=0;@Verb$
  si\lpFile=@ApplicationName$
  si\lpDirectory=@Dir$
  si\nShow=0
  
  Res=ShellExecuteEx_(si)
  If Res=0
    MessageRequester("ShellExecuteEx_()",GetLastError())
  EndIf
CompilerEndIf
I think the bug is in runprogram !

The parameter for hwnd is not set correctly, at least i get the UAC warning but not maximised :?

Image
User avatar
ts-soft
Always Here
Always Here
Posts: 5756
Joined: Thu Jun 24, 2004 2:44 pm
Location: Berlin - Germany

Post by ts-soft »

Code: Select all

#Test=0
Message wrote:---------------------------
RunProgram()
---------------------------
Ungültiges Fensterhandle
---------------------------
OK
---------------------------

Code: Select all

#Test=1
Message wrote:---------------------------
TailBite
---------------------------
Anwendung:
TailBite.exe <Quelldatei.pb> </Optionen>
TailBite Manager starten?
---------------------------
Ja Nein
---------------------------
With Shellexecute comes the UAC prompt!
PureBasic 5.73 | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.
Image
ABBKlaus
Addict
Addict
Posts: 1143
Joined: Sat Apr 10, 2004 1:20 pm
Location: Germany

Post by ABBKlaus »

@ts-soft : it´s fixed in Beta 2, can you confirm ?
User avatar
ts-soft
Always Here
Always Here
Posts: 5756
Joined: Thu Jun 24, 2004 2:44 pm
Location: Berlin - Germany

Post by ts-soft »

ABBKlaus wrote:@ts-soft : it´s fixed in Beta 2, can you confirm ?
i can, confimed!
PureBasic 5.73 | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.
Image
Post Reply