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)
Any PB command that set "request admin mode" automatically
Any PB command that set "request admin mode" automatically
Thanks,
ViiArtz
ViiArtz
Re: Any PB command that set "request admin mode" automatical
No, it's set trough the manifest file, it's not command related.
Re: Any PB command that set "request admin mode" automatical
So, any reason why this would be happening then?
Thanks,
ViiArtz
ViiArtz
Re: Any PB command that set "request admin mode" automatical
No, I don't know. I see you use JaPBe, may be a bug ?
Re: Any PB command that set "request admin mode" automatical
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!Fred wrote:No, I don't know. I see you use JaPBe, may be a bug ?
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
ViiArtz
Re: Any PB command that set "request admin mode" automatical
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
Source: http://technet.microsoft.com/en-us/libr ... 10%29.aspx
Re: Any PB command that set "request admin mode" automatical
Yep, that's what it was!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
Thank so much for unravelling the mystery, Finally!
Thanks,
ViiArtz
ViiArtz