AutoRun LWMenu

If you are currently developing portable freeware or planning to do so, use this forum to discuss technical implementation, seek out like-minded developers for partnership, or solicit interested users for beta testing.
Message
Author
lwc
Posts: 191
Joined: Tue Jun 26, 2012 10:40 pm
Contact:

Re: AutoRun LWMenu

#16 Post by lwc »

I've just updated my post, please download again and try. Do you see a prompt?

TP109
Posts: 571
Joined: Sat Apr 08, 2006 7:12 pm
Location: Midwestern US

Re: AutoRun LWMenu

#17 Post by TP109 »

No prompt. Just the Array dialog and nothing else.

lwc
Posts: 191
Joined: Tue Jun 26, 2012 10:40 pm
Contact:

Re: AutoRun LWMenu

#18 Post by lwc »

To rephrase, I meant the dialog.

So now that we know the specific calls need a bypass too, here's a version that does it.
Please test if it finally works for you:
[temp link removed]
Last edited by lwc on Mon May 29, 2017 1:52 pm, edited 1 time in total.

TP109
Posts: 571
Joined: Sat Apr 08, 2006 7:12 pm
Location: Midwestern US

Re: AutoRun LWMenu

#19 Post by TP109 »

Yes. Version 1.3.1.6 and autorun.inf are working. Below is the screenshot.

Image

lwc
Posts: 191
Joined: Tue Jun 26, 2012 10:40 pm
Contact:

Re: AutoRun LWMenu

#20 Post by lwc »

Good, I'm glad I got it bypassed. Thanks for your patience!
I hope you'll consider voting to make it public now (see the OP).

Is there anything else before I release it as a new version?

TP109
Posts: 571
Joined: Sat Apr 08, 2006 7:12 pm
Location: Midwestern US

Re: AutoRun LWMenu

#21 Post by TP109 »

Nothing else. Will consider that.

lwc
Posts: 191
Joined: Tue Jun 26, 2012 10:40 pm
Contact:

Re: AutoRun LWMenu

#22 Post by lwc »

New version released.

lwc
Posts: 191
Joined: Tue Jun 26, 2012 10:40 pm
Contact:

Re: AutoRun LWMenu

#23 Post by lwc »

Just updating that it's now open source. The file listing was updated accordingly, please consider voting to make it public.

freakazoid
Posts: 1212
Joined: Wed Jul 18, 2007 5:45 pm

Re: AutoRun LWMenu

#24 Post by freakazoid »

Hey lwc, came across your LWMenu when you mentioned it as a possible yaP replacement in this topic - viewtopic.php?p=105101.

I checked the [BUTTON5] example from autorun.inf and the parameters I'm interested in the most are:

registry=HKCU\Software\advanced +HKCU\Software\advanced,accept,1
deletefolders=data +dataempty
deletefiles=program.tmp


So it looks like we can back up registry options and we can delete folders and files after a program has run, but there doesn't seem to be an option to backup a 'directory' or 'file'. Is there a parameter to backup a directory or file in LWMenu? If not, would it be possible to implement it? This would help bring LWMenu closer to yaP.
is it stealth? ;)

User avatar
Midas
Posts: 6710
Joined: Mon Dec 07, 2009 7:09 am
Location: Sol3

Re: AutoRun LWMenu

#25 Post by Midas »

:idea: On a marginal note, it would be great if someone would come up with an updated portability utility to succede yaP...

lwc
Posts: 191
Joined: Tue Jun 26, 2012 10:40 pm
Contact:

Re: AutoRun LWMenu

#26 Post by lwc »

freakazoid wrote: Sun Jul 09, 2023 10:53 pm So it looks like we can back up registry options and we can delete folders and files after a program has run, but there doesn't seem to be an option to backup a 'directory' or 'file'. Is there a parameter to backup a directory or file in LWMenu? If not, would it be possible to implement it? This would help bring LWMenu closer to yaP.
If you think it will stop comments like Midas', I might just do it :wink:
You can see the explanations in the same autorun.inf:
;use registry= to delete registry keys after the program exists or create(+) them before launching it
;use deletefolders= to delete folders after the program exists or create(+) them before launching it
;use deletefiles= to delete files after the program exits
In other words, if you manually save a backup then yes, you can restore it using the + options, but it's partial:
  1. Registry is the most complete because you can actually restore specific values if you want. It's just basic textual words to store.
  2. Folder just creates an empty folder in advance. It's because some programs (I've spotted it with VLC's VLSub which was since fixed) won't start without the existence of a certain folder.
  3. File doesn't have a + option because adding it means storing the contents of an entire (probably binary) file inside autorun.inf. Likewise for folders if you expect more than an empty folder. It's because the original idea was having everything in text file (autorun.inf).
How does (or should I say did?) yaP do a backup? Maybe show a screenshot?

The alternative is creating a PortableApps launcher, which does a live backup of everything (after existing the original program) in a dedicated backup folder. But it's way overkill for casual launcher creation and more fitted for pre-existing launchers that others do for you and constantly maintain them in a public place that auto pushes them to you.

freakazoid
Posts: 1212
Joined: Wed Jul 18, 2007 5:45 pm

Re: AutoRun LWMenu

#27 Post by freakazoid »

Thanks for the explanation, lwc.

Similar to the PortableApps launcher, yaP is able to backup directories to a filepath of your choosing and is able to restore that directory when yaP launches so apps can run more steathy. This is most notable for apps that write to %localappdata% or %appdata%. You can view a few example configuration files on the yaP site such as AbleWord and Audacious to name but a few.

Based on what you wrote, the backup and restore feature is probably overkill for LWMenu.
is it stealth? ;)

User avatar
Midas
Posts: 6710
Joined: Mon Dec 07, 2009 7:09 am
Location: Sol3

Re: AutoRun LWMenu

#28 Post by Midas »

lwc wrote: If you think it will stop comments like Midas', I might just do it :wink:
Fair enough, I'll just pipe it down, then... :mrgreen:
lwc wrote: How does (or should I say did?) yaP do a backup?
I won't try to answer this, only report something that may prove useful (or not...):

There's an old post mentioning Nirsoft's nircmd (viewtopic.php?p=21622#p21622), which I believe has the power to do everything required. Although its not built with AHK, its source could provide further insights. But then again, I wouldn't know... :|

Let me just state that I'm mostly satisfied with yaP as it stands; my main gripe is its lack of UTF-8 support for its configurations -- it only seems to understand ANSI...

lwc
Posts: 191
Joined: Tue Jun 26, 2012 10:40 pm
Contact:

Re: AutoRun LWMenu

#29 Post by lwc »

freakazoid wrote: Mon Jul 10, 2023 4:02 pm Based on what you wrote, the backup and restore feature is probably overkill for LWMenu.
Well, it's not overkill now that it's a new working feature. :D

It took a bit longer than I thought but I think I've managed to cover all bases.
Please try it so I can make it official.
Inside the included autorun.inf is a real example of setting the new freeware game Space Quest 3D to restore and backup.
I chose it because the game's author went AWOL without replying why can't the game be portable.

Testing is easier than you might think due to the also new feature of simulation mode.
You can run the launcher with /simulate or just add simulate=1 under the program you like to backup/restore. This will avoid any risks of accidentally creating/deleting something you didn't anticipate.

Proof of concept with Sandboxie:
  1. I've installed Space Quest 3D inside Sandboxie
  2. Open the game, change some setting and make a game save.
  3. I've moved the sandbox' %ProgramFiles%\Space Quest 3D to let's say c:\games\sq3d
  4. I've moved the sandbox' %USERPROFILE%\AppData\LocalLow\Turbo Chimp to real computer in the same path
  5. I've moved the sandbox' %USERPROFILE%\Documents\Turbo Chimp to real computer in the same path
  6. I've opened the sandbox' regedit and exported HKCU\SOFTWARE\Turbo Chimp into 0.reg and put 0.reg in c:\games\sq3d
  7. I've emptied the sandbox.
Proof of concept if you don't want to use Sandboxie:
  1. Install Space Quest 3D
  2. Open the game, change some setting and make a game save.
  3. Copy %ProgramFiles%\Space Quest 3D to let's say c:\games\sq3d
  4. Copy %USERPROFILE%\AppData\LocalLow\Turbo Chimp elsewhere
  5. Copy %USERPROFILE%\Documents\Turbo Chimp elsewhere
  6. Open regedit and export HKCU\SOFTWARE\Turbo Chimp into 0.reg and put 0.reg in c:\games\sq3d
  7. Uninstall Space Quest 3D
  8. Copy from elsewhere back into 4 & 5
That's it, then I just run the launcher from c:\games\sq3d and bingo, the game runs as usual (presenting my modified settings and save slots) despite never being installed. Take that, Unity Engine.

Note you can also prepare the backup manually in advance, but (other than registry with 0.reg), it's much easier to enjoy the initial auto backup.

P.S.
This whole backup/restore could have been avoided altogether for this game with:

Code: Select all

set_variable=USERPROFILE
set_string=%backuppath%
But this only tricks %USERPROFILE%\Documents\Turbo Chimp and not %USERPROFILE%\AppData\LocalLow\Turbo Chimp ...
Attachments
sq3d.png

lwc
Posts: 191
Joined: Tue Jun 26, 2012 10:40 pm
Contact:

Re: AutoRun LWMenu

#30 Post by lwc »

Midas wrote: Mon Jul 10, 2023 3:11 am :idea: On a marginal note, it would be great if someone would come up with an updated portability utility to succede yaP...
Well, I have to say I'm disappointed multiple people gave no feedback at all for the feature you asked for (including an additional simulation feature you'll find nowhere else).
So I've went ahead and turned the beta into a stable version. Hope eventually you will try it and enjoy the backup/restore feature.

Post Reply