PDA

View Full Version : Command line question



NewsArchive
06-04-2019, 08:00 AM
I have an app that can be installed as either a "Normal", or "Portable"
app. When I do an update check is there anyway I can tell the setup to
only run the install for the version of the app that is checking for an
update? Presently, you have to make the choice before installing the update.

TIA,

Bob

NewsArchive
06-04-2019, 08:01 AM
Bob,

> I have an app that can be installed as either a "Normal", or "Portable"
> app. When I do an update check is there anyway I can tell the setup to
> only run the install for the version of the app that is checking for an
> update? Presently, you have to make the choice before installing the
> update.

Sure, no problem. See attached quick-and-dirty source code.

If your command line contains /PORTABLE you can switch the install into your
"portable" mode. You can then "hide" the dialog that makes the choice
before installing the update.

Line 28 retrieves the command line. Line 29 checks whether there is a
"/PORTABLE" switch.

Does this help?

Friedrich

NewsArchive
06-06-2019, 08:40 AM
Friedrich,

I am obviously doing something wrong. I am calling the upgrade checker
using the following: wucheck /S /PORTABLE. This displays the command
line as: /WCL "G:\PortableApps\PenCat".

What should I be running?

Thanks,

Bob

NewsArchive
06-06-2019, 08:40 AM
Bob,

> I am obviously doing something wrong. I am calling the upgrade checker
> using the following: wucheck /S /PORTABLE. This displays the command
> line as: /WCL "G:\PortableApps\PenCat".
>
> What should I be running?

if you call it from "wucheck.exe" then you have to compile your own custom
wucheck.exe from the \Redist\1033\wucheck.sbp project and add the /PORTABLE
switch to Lines 225, 227, 232 and 234

Or even better, check for /WCL in your setup.exe (instead of /PORTABLE).
Then you know that wuckeck.exe called the "update". See attached
screenshot.

Friedrich

NewsArchive
06-06-2019, 08:41 AM
Friedrich,

Finally got it figured out. Not exactly as described but it's working.

Thank you.

Bob