Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - hanness

Pages: 1 ... 12 13 [14]
196
Wow - That's fantastic. Thanks once again for the help, guys!

197
I'd like to change the icon for an executable that I've created with QB64. Anyone know if there is a way to do this? I can't seem to find a solution that works.

198
Windows 10, 1809. I think my download of QB64 1.3 was one from within 24 hours of initial release. I'll try it with a newer download when I get a ch

199
Programs / Creating a program that will self-elevate
« on: April 18, 2019, 12:13:15 pm »
If you have a need to have your program run with elevated privileges, this code will take care of that for you. If the program is not run elevated then this code will re-launch the program elevated and terminate the original instance.
 

Code: QB64: [Select]
  1. ' This application needs to be run with elevated permissions. Perform a test to see if user started the program
  2. ' with elevated permissions. If not, then relaunch the program with elevated permissions and close the
  3. ' original instance of the program.
  4.  
  5. Cmd$ = ">nul 2>&1 " + CHR$(34) + "%SYSTEMROOT%\system32\cacls.exe" + CHR$(34) + " " + CHR$(34) + "%SYSTEMROOT%\system32\config\system" + CHR$(34)
  6. errorlevel = _SHELLHIDE(Cmd$)
  7. IF errorlevel <> 0 THEN
  8.     SHELL _HIDE "powershell.exe Start-Process " + CHR$(34) + (MID$(COMMAND$(0), _INSTRREV(COMMAND$(0), "\") + 1)) + CHR$(34) + " -Verb runAs"
  9.     SYSTEM
  10.  
  11. ' We reach this point when the program is run elevated.
  12.  
  13. PRINT "The program is now running elevated."

200
The previous post was marked as fixed so I wanted to post this to a new thread to make sure it is not overlooked.

I just figured out that it is the option to "Update all pages" in help that breaks help. As noted in my previous post, clicking on help topics was taking me to the wrong topic. Downloading the help files from the download page and replacing all the help files resolved the problem. However, if you choose "Update all pages" within QB64 it will break it again.

201
More information: It seems to be the option to "Update all pages" in help that breaks it. I had a suspicion that this might be the case so I just tried it again and sure enough it is now broken once again.

202
LOL. Just noticed that download was available myself and just tried it. That does indeed fix the issue.

Thanks!

Sorry that I didn't notice this until after I posted my question here.

203
I'm running QB64 1.3, 64-Bit. I go into Help, select the alphabetical listing, and click on a keyword but I'm taken to the wrong help topic.

Some examples:

Click on INKEY$ and I'm taken to the help page for $INCLUDE
Click on LOCK and I'm taken to the help for PRINT
Click on LOOP and it takes me to the LOG math function help
Click on ON KEY and it takes me to the help for ON COM
etc.

I have already chosen the option to refresh all help items but this has not helped.

Any ideas on how I might correct this?



204
Fantastic! Thanks again for the help.

205
QB64 Discussion / How to read parameters passed to a QB64 program
« on: April 14, 2019, 01:36:38 pm »
Say I create a QB64 program called MyProgram.exe. If I run that program and pass parameters to it, how can read those parameters?

Example:

MyProgram.exe 1 2 3

I want to be able to take those 3 parameters and save them to variables.

I've looked through the Help but I must be glossing over where this is discussed as I simply cannot seem to find it.

Thanks!

206
This may sound like a crazy question, but I'll explain in a minute why I want to do this.

Say my QB64 program is called MyProgram.exe but a user renames the executable to something else. Let's assume they call it NewProgram.exe.

I need the program to be able to determine the name with which it was launced.

More information: Thanks to this forum, I have code that let's the program determine if it was run elevated or not. I now also know how to re-launch the program in an elevated state if it was not run elevated initially. Effectively, if is now a self-elevating program. In order to do this, I need to know the name of the executable to launch. I could simply hard code the name of the execuable, but I would prefer to be able to determine the name in case someone renames it.


207
Thanks very much for the help.

208
I have a QB64 program on Windows that runs a lot of Windows commands via the "SHELL" command. Some of these need to be run with elevated permissions. If I right-click on my QB64 program and choose "Run as administrator" everything works flawlessly, otherwise, it will not.

Is there a way that I can do a check from within a QB64 program to see if the program was run elevated or not? The idea would be that I would display a message to a user if it was not run elevated and then exit the program.

Thanks!

209
QB64 Discussion / Re: [fixed] Difficulties with "Help" in QB64 1.3
« on: April 09, 2019, 02:19:07 pm »
Thanks for your help! I very much appreciate it.

The funny thing about the timing of version 1.3 is that I had literally just completed a major program (for me at least) hours before 1.3 was released on version 1.2. It's a program that completely automates a bunch of Windows Image related stuff like injecting Windows Updates into Windows ISO images, injecting updates into the images, creating bootable thumb drives, etc. I had been working on this on and off for the last two months or so and hours after completion 1.3 is released.

As soon as I saw 1.3 I recompiled my program on it and all is working perfectly!

Thanks for the help and such a wonderful program. I've been working with computers professionally since the early 80's, but I'm far from a professional programmer. However, I did spend many an hour writing simple programs in QuickBasic way back in the day. The beauty of QB64 was that I immediately felt at home and was able to become productive almost instantly.

Thanks again!


210
QB64 Discussion / [fixed] Difficulties with "Help" in QB64 1.3
« on: April 09, 2019, 02:47:43 am »
In help, I am not seeing any of the new commands  such as _ACCEPTFILEDROP, _TOTALDROPPEDFILES, _DROPPEDFILES$, and _ECHO.

In addition, when I select the Alphabetical Keyword Listing in help, I what is shown in my attached image.

I'm running the 64-Bit version of QB64 1.3.

Any suggestions on how I might correct this? Am I missing something simple here?

Pages: 1 ... 12 13 [14]