Any PB command that set "request admin mode" automatically

Just starting out? Need help? Post your questions and find answers here.
User avatar
viiartz
User
User
Posts: 70
Joined: Tue Mar 28, 2006 2:00 am

Any PB command that set "request admin mode" automatically

Post by viiartz »

Hi All,
Is there any PB command that set, when saved as an executable (EXE), the "request admin mode" even though I have not set that option in the project settings?
(PB 5.30 Win x86, jaPBe 3.13.4.880, Win 7 x86)
Thanks,
ViiArtz
Fred
Administrator
Administrator
Posts: 18162
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Re: Any PB command that set "request admin mode" automatical

Post by Fred »

No, it's set trough the manifest file, it's not command related.
User avatar
viiartz
User
User
Posts: 70
Joined: Tue Mar 28, 2006 2:00 am

Re: Any PB command that set "request admin mode" automatical

Post by viiartz »

So, any reason why this would be happening then?
Thanks,
ViiArtz
Fred
Administrator
Administrator
Posts: 18162
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Re: Any PB command that set "request admin mode" automatical

Post by Fred »

No, I don't know. I see you use JaPBe, may be a bug ?
User avatar
viiartz
User
User
Posts: 70
Joined: Tue Mar 28, 2006 2:00 am

Re: Any PB command that set "request admin mode" automatical

Post by viiartz »

Fred wrote:No, I don't know. I see you use JaPBe, may be a bug ?
I'm not so sure, I get the same issue with the PB editor as well! Anyway I poster the code below just in case you see something I don't!

Code: Select all

Global NewList WhiteList.S()
Global NewList BouncedList.S()
Global InputFile$ =""

Enumeration
  #BouncedList
  #WhiteList
  #NewWhiteList
EndEnumeration

Procedure.S OpenInputFile(title.S="Choose a file to open")
  StandardFile$ = "\"   ; set initial file+path to display
  Pattern$ = "Text (*.txt)|*.txt|All files (*.*)|*.*"
  Pattern = 0    ; use the first of the three possible patterns as standard
  File$ = OpenFileRequester(title, StandardFile$, Pattern$, Pattern)
  If File$ 
    ProcedureReturn File$
  Else
    Debug "No file selected, ending program!"
    End
  EndIf
EndProcedure

Procedure FindBouncedInWhiteList()
  ;CallDebugger
  ForEach WhiteList()
    ForEach BouncedList()
      ;Debug "D: "+BouncedList()
      ;Debug "W: "+WhiteList()
      If FindString(WhiteList(),BouncedList())<>0
        ;CallDebugger
        ; If FindString(WhiteList(),"*?*")=0
           ; WhiteList() = "*?*"+WhiteList()+"*?*"
        ; EndIf
        DeleteElement(WhiteList(),1)
      EndIf
    Next
  Next
EndProcedure
Procedure LoadList()
  If ReadFile(#WhiteList,OpenInputFile("White List"))
    
  While Eof(#WhiteList)=0
    If AddElement(WhiteList())
      WhiteList() = ReadString(#WhiteList)
    EndIf
    
  Wend
EndIf
CloseFile(#WhiteList)

If ReadFile(#BouncedList,OpenInputFile("Bounced List"))
  
  While Eof(#BouncedList)=0
    If AddElement(BouncedList())
      BouncedList() = ReadString(#BouncedList)
    EndIf
    
  Wend
EndIf
CloseFile(#BouncedList)
EndProcedure  

; Procedure DisplayList()
  ; Count=0
  ; SortList(WhiteList(),#PB_Sort_Ascending)
  ; ForEach WhiteList()
    ; Debug FormatI(Count,"[###]")+" "+WhiteList()
    ; Count+1
  ; Next
; EndProcedure

Procedure.S GetMyPath()
  ProcedureReturn GetPathPart(ProgramFilename())
EndProcedure

Procedure SaveNewWhiteList()
  ;CallDebugger
  asat$="_asat_"+ FormatDate("%dd-%mm-%yyyy",Date())
  SaveFilePath$=GetMyPath()+"EmailList"+asat$+".txt"
  If CreateFile(#NewWhiteList,SaveFilePath$)
    ForEach WhiteList()
      WriteStringN(#NewWhiteList,WhiteList())
    Next
  EndIf
  CloseFile(#NewWhiteList)
	MessageRequester("Save List","New Email list was saved: "+SaveFilePath$)
EndProcedure

;- Main
;CallDebugger
LoadList()
;CallDebugger
FindBouncedInWhiteList()
SaveNewWhiteList()
;CallDebugger

; IDE Options = PureBasic 5.30 (Windows - x86)
; Folding = ---
; EnableUnicode
; EnableXP
; Executable = EmailListUpdate.exe
Thanks,
ViiArtz
User avatar
p2hicy
User
User
Posts: 11
Joined: Fri Apr 25, 2003 5:31 pm
Location: Iceland
Contact:

Re: Any PB command that set "request admin mode" automatical

Post by p2hicy »

Windows heuristics sees the 'update' part in your executable name and automatically elevates it. You can turn it off in the compiler options by enabling "Request User mode for Windows Vista and above (no virtualisation)".

Source: http://technet.microsoft.com/en-us/libr ... 10%29.aspx
User avatar
viiartz
User
User
Posts: 70
Joined: Tue Mar 28, 2006 2:00 am

Re: Any PB command that set "request admin mode" automatical

Post by viiartz »

p2hicy wrote:Windows heuristics sees the 'update' part in your executable name and automatically elevates it. You can turn it off in the compiler options by enabling "Request User mode for Windows Vista and above (no virtualisation)".

Source: http://technet.microsoft.com/en-us/libr ... 10%29.aspx
Yep, that's what it was!
Thank so much for unravelling the mystery, Finally!
Thanks,
ViiArtz
Post Reply