Announcement

Collapse
No announcement yet.

JK-IDE Version 2.0 including Visual Designer V 1.0

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Tested that code, no error (only the 'normal' error on OUTPUT)

    Click image for larger version

Name:	Error2.png
Views:	139
Size:	1.6 KB
ID:	784227
    Regards,
    Peter

    Comment


    • What about Mikael´s idea?

      Comment


      • I don't have ELEVATE entries there for any program. (only RUNASADMIN...)
        Regards,
        Peter

        Comment


        • It might be faster and better to start with a new registry by going directly to Windows 1903 with a clean install.
          It would also avoid any more updates to 1809 series and moving forward some corrupted registry entries.
          It is a major jump from Windows 7 to Windows 10 1903.
          Clone drive.
          Download Media Creation Tool to a USB https://www.microsoft.com/en-us/soft...load/windows10

          Reinstall takes a long time, but is often worth it.
          https://duckduckgo.com instead of google

          Comment


          • I'll do that later (as last resort)
            Can't miss my PC at the moment. To get a clean install working properly takes several days.
            (I just did an install on this PC that took me several days before all worked as I wanted)
            Regards,
            Peter

            Comment


            • I don't have ELEVATE entries there for any program. (only RUNASADMIN...)
              So why not try "REG_SZ "ELEVATECREATEPROCESS" for jk-ide.exe?

              Comment


              • No difference...

                All has got an unexpected positive effect:
                Disabling FHT totally made File Explorer much faster (it was also in FTH's 'victims' list)
                The preview pane now works much faster and doesn't skip items as it did before...
                Regards,
                Peter

                Comment


                • Phew... still no hit. I would go for testing it with a new and virgin admin account as Jim proposed, otherwise i´m out of ideas for the moment.


                  JK

                  Comment


                  • Did you try this?
                    OPEN "test.set" FOR OUTPUT SHARED AS #1
                    ? STR$(ERR)
                    What is error code?
                    If it works, try excluding the folder from virus checker and malware checker (even if disabled.)
                    https://duckduckgo.com instead of google

                    Comment


                    • Same error #5...
                      Tried PBCC5 compiler, same error as PBWIN10
                      Regards,
                      Peter

                      Comment


                      • Using this code you can tell, if it runs as user or as admin:

                        Code:
                        #Compile Exe
                        #Dim All
                        #Debug Error On
                        #Debug Display On
                        
                        
                        #include "win32api.inc"
                        
                        
                        Function PBMain () As Long
                          Local lhFile, lCnt As Dword, lBuff As String
                          '------------------------------------------------------------------------------------------------
                          lhFile = FreeFile
                        
                        
                          MSGBOX "IsUserInAdminGroup: " & IIF$(isUserInAdminGroup <> 0, "yes", "no"),, "IsUserInAdminGroup"
                        
                        
                          Open "Test.set" For Output As #lhFile
                          For lCnt = 1 To 4
                            lBuff = "Test line " & Format$(lCnt)
                            Print #lhFile, lBuff
                          Next
                          Close #lhFile
                        
                        
                          msgbox "Done"
                        
                        
                        End Function
                        
                        
                        '***********************************************************************************************
                        ' thanks to Pierre !
                        '***********************************************************************************************
                        
                        
                        #INCLUDE "LmAccess.inc"
                        
                        
                        FUNCTION IsUserInAdminGroup AS LONG ' Return: 1=Yes, 0=No
                          LOCAL siaNtAuthority     AS SID_IDENTIFIER_AUTHORITY
                          LOCAL pTokenGroups       AS TOKEN_GROUPS POINTER
                          LOCAL sInfo              AS STRING
                          LOCAL hAccessToken       AS DWORD
                          LOCAL psidAdministrators AS DWORD
                          LOCAL index              AS LONG
                          LOCAL InfoSize           AS LONG
                        
                          IF OpenProcessToken(GetCurrentProcess, %TOKEN_QUERY, hAccessToken) THEN 'Open current process
                            GetTokenInformation(hAccessToken, BYVAL %TOKENGROUPS, BYVAL 0, BYVAL 0, InfoSize) 'Get needed size for sInfo
                            sInfo = NUL$(InfoSize) 'Size from previous GetTokenInformation call
                            IF GetTokenInformation(hAccessToken, BYVAL %TOKENGROUPS, BYVAL STRPTR(sInfo), LEN(sInfo), InfoSize) THEN 'Get token info
                              siaNtAuthority.Value(5) = 5 ' = %SECURITY_NT_AUTHORITY
                              IF AllocateAndInitializeSid(siaNtAuthority, 2, %SECURITY_BUILTIN_DOMAIN_RID, _ 'Create an admin sid for comparaison
                                                          %DOMAIN_ALIAS_RID_ADMINS, 0, 0, 0, 0, 0, 0, psidAdministrators) THEN
                                pTokenGroups = STRPTR(sInfo) 'Pointer to a TOKEN_GROUPS array
                                FOR index = 0 TO @pTokenGroups.GroupCount - 1 'Scan all sid
                                  IF EqualSid(BYVAL psidAdministrators, BYVAL @pTokenGroups.Groups(index).pSid) THEN 'In admin group
                                    FUNCTION = 1 : EXIT FOR
                                  END IF
                                NEXT
                                FreeSid(BYVAL psidAdministrators)
                              END IF
                            END IF
                            CloseHandle(hAccessToken)
                          END IF
                        
                        END FUNCTION

                        JK

                        Comment


                        • Click image for larger version

Name:	error.png
Views:	123
Size:	1.4 KB
ID:	784241

                          I will updrage Windows tonight. Maybe that will solve it.
                          (there are other network problems with 180x version of W10 in some cases I see on MS support)
                          Regards,
                          Peter

                          Comment


                          • All,
                            Before I upgraded to 1903 my 1809 PCs were showing some age. Many issues. Once 1903 was installed I created new Admin accounts. Very nice now.

                            Comment


                            • After a long wait Windows is upgraded to 1903. And...: problem is gone!
                              Everything compiles and runs without error!

                              (I didn't have much hope, but it seems they fixed things)

                              I still don't understand how they succeeded in failing in only one program (while Createfile worked normally)
                              Let's say that Bill works in mysterious ways...

                              Thanks for all investigating help, especially Juergen...

                              When installing Process Explorer, I found another potential culprit:

                              If you checkmark Properties -> Compatibility -> Run as administrator, it's not always sure it's really executed.
                              I found that out, because process explorer said it had insufficient rights.

                              In that case you'll have to check if Properties -> Shortcut -> Advanced -> Run as administrator is also checkmarked.
                              That isn't always so, and then it looks like you have admin rights but in fact you don't...



                              There are numerous descriptions of network bugs in the 180x release. Although different, it makes you think. One of them:

                              Certain operations, such as rename, that you perform on files or folders that are on a Cluster Shared Volume (CSV) may fail with the error, “STATUS_BAD_IMPERSONATION_LEVEL (0xC00000A5)”.
                              Regards,
                              Peter

                              Comment


                              • Peter,


                                That´s really good news - glad to hear that! Thanks for informing us and thanks to all others contributing.


                                JK

                                Comment


                                • Others have had the problem. Glad the update fixed whatever it was.
                                  https://windowsreport.com/error-open...e-for-writing/
                                  https://duckduckgo.com instead of google

                                  Comment


                                  • Peter,
                                    Simply marvelous!

                                    NOTE:
                                    When they removed HomeGroup I believe they created some unnecessary but significant problems to iron out.

                                    Comment


                                    • Originally posted by Peter
                                      After a long wait Windows is upgraded to 1903. And...: problem is gone!
                                      That is great news.

                                      Originally posted by Peter on 20 Aug 2019
                                      Since a few days I had to go from Windows 7 to Windows 10.
                                      This may seem a daft question but how come you went from Win7 to Win10 1809 rather than Win10 1903?

                                      Of course, at the time, Peter, you did not know that "There are numerous descriptions of network bugs in the 180x release." As it turns out four years after Win10's release it was terrible luck that you landed on the one version which had the potential to give you grief.

                                      Perhaps Microsoft only offered 1809? [1]

                                      Anyway it is water under the bridge now, and I am just curious.

                                      The 19H2 release is not far away so you have that to look forward to. However, my understanding is that it "is intended to be delivered as cumulative update to the May 2019 Update" so it should 'come in' a little faster than the usual biannual saga.

                                      [1] That could be the case - I have just read that the May 2019 Update is still being rolled out - blimey!

                                      Comment

                                      Working...
                                      X