PDA

View Full Version : Please Wait sb6 - Xposted in 3rd party



NewsArchive
12-27-2007, 05:25 AM
Forgot about this NG
At the Finish of an installation, I need to run a Word.rtf and then run 2
executables.

How do I get the 3 items to Wait for the previous to finish. They are
running all over each other
I need something similar to Run('blah',1) Wait Parm

They need to run in this order after Finish is Pressed in SB6, but only one
at a time

Word.rtf
a.exe
b.exe


--
Dan Scott
C55-C6.3 9053 Clarion Templates (NOT ABC)
<www.garagepartner.com>

Credit card Processing in your software
www.x-charge.com

NewsArchive
12-27-2007, 05:26 AM
> At the Finish of an installation, I need to run a Word.rtf and then run 2
> executables.

> At the Finish of an installation, I need to run a Word.rtf and then run 2
> executables.

(cc from the other NG for the benefit of others here)


Dan,

Word to the wise.

On Vista, if those executables do anything user specific - they are not
going to work as expected.

Your installer is running (or should be) in elevated status, the user (even
when logged in as a super user under Vista) is NOT. Vista executes
programs for Dan the administrator as Dan the user.

This means that any registry writes to HKCU or data written to the user
path where your using CSIDL to get the location of My Documents will be
pointing at the super user account - NOT at the regular user account.

The Microsoft recommendation is NOT to run things at the end of an install
under Vista and if you must, then only something like launching the RTF
file.

Your other actions need to take place when your program is ran for the
first time after an update (or you use a post installer that is ran at the
user access level) AFTER the main installer has terminated.


Other than that bit of news for you - the SB examples show how to launch
items at the end of the install based on a checkbox - but the wait
sequencing may give you problems.

I'd ask if this helps, but obviously you did not want to hear what I told
you.

;-)

Charles


--
-------------------------------------------------------------------------------------------------------
Charles Edmonds

www.clarionproseries.com - "Serious imaging tools for Clarion Developers"
www.ezround.com - "Round Corner HTML tables with matching Banners, Buttons
and Forms!"
www.lansrad.com - "Intelligent Solutions for Universal Problems"
www.fotokiss.com - "World's Best Auction Photo Editor"
-------------------------------------------------------------------------------------------------------

NewsArchive
12-27-2007, 05:26 AM
Charles

I always appreciate anything you tell me, or anyone tells me for sure.

Anyway, yes, I could run the update at start of my program after the install
update,
but it would be so much easier to do it from SB6. I always have, but never
more than
one exe at the end.
BTW, I have convinced most of my customer to stay away from Veesta, so I
don't have
the headaches of Veesta yet, but someday I am sure I will, especially after
I run out of
XP Pro licenses to sell, but that's a year or 2 down the road. Who knows,
maybe the Mac
commercials will get MS head on straight.

--
Dan Scott
C55-C6.3 9053 Clarion Templates (NOT ABC)
<www.garagepartner.com>

Credit card Processing in your software
www.x-charge.com

NewsArchive
12-27-2007, 05:27 AM
Dan,

Two different options:

1. "Run Program" Visualizer

a. Select the "Run Program" Visualizer
b. Add item to be executed
c. Select "Finish Dialog" Tab
d. Enter a Checkbox Text (e.g. Launch xyz)
e. Mark "Run program once the installation exists"

2. Script Editor

See "Run Check Box 1.sb6" demo script in the Examples package.

BTW, to wait for the program to be finished, check the "Waif for Program"
checkbox in the Run Program item.

Does this help?

Friedrich

--
Friedrich Linder
Lindersoft
www.lindersoft.com
+1.954.252.3910

"point. click. ship" - that's SetupBuilder 6.7
Create Windows Vista ready installations in minutes

-- Official Comodo Code Signing and SSL Certificate Partner

NewsArchive
12-27-2007, 05:27 AM
Friedrich

You have so much stuff in SB6 that I am awe struck.
Haven't seen visualizer yet, but will look in the help files for what it
does.

I think I checked wait for program, but doesn't that simply pause SB6?

--
Dan Scott
C55-C6.3 9053 Clarion Templates (NOT ABC)
<www.garagepartner.com>

Credit card Processing in your software
www.x-charge.com

NewsArchive
12-27-2007, 05:29 AM
Hi Dan,

> You have so much stuff in SB6 that I am awe struck.
> Haven't seen visualizer yet, but will look in the help files for what it
> does.
>
> I think I checked wait for program, but doesn't that simply pause SB6?

The "Sleep..." script function would "pause" a SB6 installer.

The "Wait..." option in a Run Program function cause the installer to be
suspended until the external program has finished.

See attached screenshots.

Does this help?

Friedrich

NewsArchive
12-27-2007, 05:30 AM
Friedrich got me all fixed up

SetupBuilder is extraordinary

--
Dan Scott
C55-C6.3 9053 Clarion Templates (NOT ABC)
<www.garagepartner.com>

Credit card Processing in your software
www.x-charge.com

NewsArchive
12-27-2007, 05:50 AM
Dan,

I am guessing that the [ ] Wait for Program checkbox in the SetupBuilder
Run Program... or Run Command Line... are not working for you? If this
is the case, then it is likely because the Finish Dialog is the final
stop and with no more Loop Wizard active, it is forcing its way through
the rest of the script (just a guess). I would have to test it to see
what you are up against, but I do have solutions for that too. However,
you may want to just consider writing and calling a simple (single)
Clarion program to do what you need, as I know you are an expert at that
already :-)

Cheers,

Andy Kaczmarczyk
www.clariontools.com

NewsArchive
12-27-2007, 05:50 AM
Andy

Thanks for the quick reply. I was leaning toward do a quick prog to run the
2 exe's, but thought with all sb6 has, it may have a way to do this in the
script.
BTW, the Wait flag in the script simply suspends SB6 installer, not the run
programs

--
Dan Scott
C55-C6.3 9053 Clarion Templates (NOT ABC)
<www.garagepartner.com>

Credit card Processing in your software
www.x-charge.com

NewsArchive
12-27-2007, 05:51 AM
Dan,

You could use the Wait flag, but would need to be inside the Loop Wizard
for it to work as expected. This would be a little tricky as I recall,
the Finish Dialog leaves the Loop Wizard when Finish is selected, so I
created a pseudo Finish Dialog by using one of the other dialogs and
changing the button text, hiding the back button, etc..., then I added
another dialog that allowed me to keep the Loop Wizard active until I
finished my external processes. There were some other tricks I needed to
get this to work (way too complicated to describe in this response), so I
think you may be better off with calling a custom program.

Regards,

Andy Kaczmarczyk
www.clariontools.com

NewsArchive
12-27-2007, 05:53 AM
Dan,

You can do this from the "Run Programs" Visualizer or the Script Editor.
Just set the Wait flag and the installer will wait for the program to
finish. No need to use an external Clarion program.

1. "Run Program" Visualizer

a. Select the "Run Program" Visualizer
b. Add item to be executed
c. Select "Finish Dialog" Tab
d. Enter a Checkbox Text (e.g. Launch xyz)
e. Mark "Run program once the installation exists"

2. Script Editor

See "Run Check Box 1.sb6" demo script in the Examples package.

If you don't use the ShellExecuteEx option, the installer uses the
CreateProcess Windows API to run the application. Then WaitForSingleObject
to wait for the program. If you use the ShellExecute option, the installer
uses the ShellExecuteEx API to start your application and again
WaitForSingleObject to wait for your program.

There is absolutely NO NEED to use an external program to handle this!

Hope this helps.

Friedrich

--
Friedrich Linder
Lindersoft
www.lindersoft.com
+1.954.252.3910

"point. click. ship" - that's SetupBuilder 6.7
Create Windows Vista ready installations in minutes

-- Official Comodo Code Signing and SSL Certificate Partner

NewsArchive
12-27-2007, 05:54 AM
And of course, exactly what Charles said. You should not start an
application from your installer under Vista or Windows Server 2008 if it
does some user specific actions (e.g. write to HKCU registry, etc.).

I am using the following in our own SetupBuilder installer. There are two
Finish dialogs. One Finish dialog displays the "Launch SetupBuilder"
checkbox, the order Finish dialog does not. On Vista (or 2008), it does not
display the "Launch SetupBuilder" dialog.

[ Final User Interface ]

! Final wizard dialog definition(s)
Define Wizard Dialog "#1" (Finish)
Define Wizard Dialog "#2" (Finish) -- Vista
If %WINVER% Less Than "$WIN_VISTA$" Then
Hide Wizard Dialog "#2"
Set Variable %_SB_RETURN% to "1"
Else
Hide Wizard Dialog "#1"
Set Variable %_SB_RETURN% to "0"
End

Loop Wizard (Abort Dialog Active)
Wizard Auto Break
End

If %_SB_RETURN% Equals "1" on Position "1" Then
Run Program %_SB_INSTALLDIR%\sbuilder.exe (Always Install)
End

Friedrich

--
Friedrich Linder
Lindersoft
www.lindersoft.com
+1.954.252.3910

"point. click. ship" - that's SetupBuilder 6.7
Create Windows Vista ready installations in minutes

-- Official Comodo Code Signing and SSL Certificate Partner

NewsArchive
12-27-2007, 05:54 AM
Friedrich

The exe simply updates the users control records to set their expiration
date in TPS File.
The Next exe does some tps file maintenance. I try never to anything
pertaining to the OS,
no matter what the OS is. I made a promise to my customers year ago, that I
would never screw with
OS settings.

--
Dan Scott
C55-C6.3 9053 Clarion Templates (NOT ABC)
<www.garagepartner.com>

Credit card Processing in your software
www.x-charge.com

NewsArchive
12-27-2007, 05:55 AM
Hi Dan,

> The exe simply updates the users control records to set their expiration
>date in TPS File.
>The Next exe does some tps file maintenance. I try never to anything
>pertaining to the OS,

IF the exe does nothing with files or registry keys that are in user
specific folders/keys, then you should be ok. The problem is that
when the installer is elevated, it has no clue who the actual logged
in user is, so any user specific updates are not done in the actual
logged-in user account. If your exe uses the logged in user for
anything, then you can't run it. If your exe accesses data in user
specific (as in OS user!) folders or keys, then you can't run it.

Best regards,

ArnĂ³r Baldvinsson
Icetips Creative, Inc.
San Antonio, Texas, USA
www.icetips.com


Subscribe to information from Icetips.com:
http://www.icetips.com/subscribe.php

NewsArchive
12-27-2007, 05:56 AM
Arnor,

perfect for me, affects only my programs and data

--
Dan Scott
C55-C6.3 9053 Clarion Templates (NOT ABC)
<www.garagepartner.com>

Credit card Processing in your software
www.x-charge.com

NewsArchive
12-27-2007, 05:57 AM
Friedrich,

I agree with you on the Wait flag, but Dan says that they all run one
right after another (they do not wait), and I remember I had a similar
issue when doing this sort of thing after the Finish button had been
selected and outside the final Loop Wizard. But then again, I have been
through a lot with SB, over the past 11 months, so I could be mistaken.
Now that you are on the thread, I defer and will leave Dan to your expert
advice.

Andy

NewsArchive
12-27-2007, 05:57 AM
Hi Andy,

There should not be any problem in the latest SetupBuilder 6.7.

I remember a very strange "Call DLL Function" wait issue (inside a Wizard
Loop) back in April. This was caused by a threading issue. You provided me
with cool sample codes and a fix for it made it into 6.5 Build 1845.

Friedrich

--
Friedrich Linder
Lindersoft
www.lindersoft.com
+1.954.252.3910

"point. click. ship" - that's SetupBuilder 6.7
Create Windows Vista ready installations in minutes

-- Official Comodo Code Signing and SSL Certificate Partner

NewsArchive
12-27-2007, 05:58 AM
BTW, Friedrich

I use the call dll stuff in SB4 quite extensively.
Can I recompile the SB4 stuff in SB6 and will it work?
I use the Dll to check and see if the user has a valid registration,
Expire Date and Name and Address. I do not use any fancy registration
stuff, just my own internal checking.
I simply loved SB4, so this is a big move for me to SB6, but I can see
how much more I can do in SB6.


--
Dan Scott
C55-C6.3 9053 Clarion Templates (NOT ABC)
<www.garagepartner.com>

Credit card Processing in your software
www.x-charge.com

NewsArchive
12-27-2007, 05:58 AM
Hi Dan,

The old SB4 had only very limited support for DLLs. SetupBuilder 6
Developer Edition comes with a built-in state-of-the-art "Call DLL" feature
that lets you dynamically access exported 32-bit DLL functions, correctly
handling the most common calling sequences, return types, and compiler
incompatibilities. It can be used to extend SetupBuilder's functionality
with your own functions. This feature is a real boon for those who demand a
little more than what SetupBuilder delivers out of the box. You certainly
won't need this feature in every SetupBuilder script you build, but it will
really be a lifesaver when you do need it. It's even possible to call the
Windows API directly.

Does this help?

Friedrich

NewsArchive
12-27-2007, 06:00 AM
> I am guessing that the [ ] Wait for Program checkbox in the SetupBuilder
> Run Program... or Run Command Line... are not working for you? If this
> is the case, then it is likely because the Finish Dialog is the final
> stop and with no more Loop Wizard active, it is forcing its way through
> the rest of the script (just a guess). I would have to test it to see
> what you are up against, but I do have solutions for that too. However,
> you may want to just consider writing and calling a simple (single)
> Clarion program to do what you need, as I know you are an expert at that
> already :-)

Andy,

See my reply to Dan for some things that one would need to consider in
regards to Vista.

We ended up using a post installer (after a reboot when the PDF drivers are
installed) with PageSnip.

The main installer sets a HKLM entry that runs a tiny 150K SB compiled
wizard with a /CheckProfile flag on startup.

This in turns checks to see that the user profile is setup (updates done,
etc) and if so - just exits.

Otherwise it runs (as the USER not as the ADMINISTRATOR) and then uses
CSIDL entries (correctly pointing at the user now) to do whatever needs to
be done.

You could do this in your app of course, but actually it was easier in SB
script and then we reuse the same applet as the config wizard from within
the app (giving the user the same experience for changing settings and
eliminating our need to duplicate efforts in Clarion).

We just use ShellExecute to load the SB applet from the Clarion app with a
different command line.

Food for thought.

;-)

Charles


--
-------------------------------------------------------------------------------------------------------
Charles Edmonds

www.clarionproseries.com - "Serious imaging tools for Clarion Developers"
www.ezround.com - "Round Corner HTML tables with matching Banners, Buttons
and Forms!"
www.lansrad.com - "Intelligent Solutions for Universal Problems"
www.fotokiss.com - "World's Best Auction Photo Editor"
-------------------------------------------------------------------------------------------------------

NewsArchive
12-27-2007, 06:00 AM
Charles,

I actually do this sort of thing Dan is trying to achieve with a custom
Clarion DLL called from the SB installer. I don't think the DLL suffers
from the same issues as calling an external EXE from the installer, in
Vista, but I could be wrong. Just didn't want to give Dan too much to
deal with, not that it is difficult to create a custom dll function and
call it from SB.

I like your idea on using SB scripts to dance around some of the Vista
issues, that could be useful. Thanks.

Cheers,

Andy Kaczmarczyk
www.clariontools.com

NewsArchive
12-27-2007, 06:01 AM
> I actually do this sort of thing Dan is trying to achieve with a custom
> Clarion DLL called from the SB installer. I don't think the DLL suffers
> from the same issues as calling an external EXE from the installer, in
> Vista, but I could be wrong. Just didn't want to give Dan too much to
> deal with, not that it is difficult to create a custom dll function and
> call it from SB.

The key point to take on all this was these two things:

1) Your main installer does NOT have access to the user's registry or
CSIDL identified file locations. So if the program is built correctly to
be Vista aware (using HKCU and CSIDL to set the data locations for the
user), then the main installer can not update it.


2) Anything you RUN at the end of the main install (or during it) is going
to have the same problem. So if the program being ran is using CSIDL to
find the user's data or wants to write the user's registry ... it will NOT
work as expected. It is not that it will fail - but rather that it will
act based on the HKCU and CSIDL values of "Andy the Administrator", not
"Andy the User".

The last one is a tricky one.

We are all used to years of just having the users run in Administrator
mode. But that was one of the big security holes that Vista fixes. That
is why Vista always runs programs in a non-elevated status by default.

> I like your idea on using SB scripts to dance around some of the Vista
> issues, that could be useful. Thanks.

It works quite well.

I have a new blog site that will be coming on line after the first of the
year at www.theroadtovista.com and I plan to have some scripts like this
and examples available for free downloads there.

;-)

Take care,

Charles


--
-------------------------------------------------------------------------------------------------------
Charles Edmonds

www.clarionproseries.com - "Serious imaging tools for Clarion Developers"
www.ezround.com - "Round Corner HTML tables with matching Banners, Buttons
and Forms!"
www.lansrad.com - "Intelligent Solutions for Universal Problems"
www.fotokiss.com - "World's Best Auction Photo Editor"
-------------------------------------------------------------------------------------------------------

NewsArchive
12-27-2007, 06:02 AM
Charles,

I will be sure to watch for your blog at www.theroadtovista.com, it
certainly is a road for sure, and a bumpy one at that!

Andy

NewsArchive
12-27-2007, 06:03 AM
> I will be sure to watch for your blog at www.theroadtovista.com, it
> certainly is a road for sure, and a bumpy one at that!

Thanks Andy,

Our sentiments exactly (I thought the image we have there was a perfect
one<g>).

Building PageSnip has been one of those projects that took a LOT longer
than was ever anticipated.

Part of this is because much of what we are doing in it simply never
existed and we were making it up as we went along<g>

Another thing is that we have taken a lot of fine Clarion tools (many of
them from CapeSoft) and with the help of our friends we have pushed the
envelope of what can be done with Clarion.

But in the midst of it all was Vista...

Realizing the potential for PageSnip, the decision was made that no matter
how much we disliked what Microsoft had done with it - it would be the way
forward. So we decided to embrace the technology and the guidelines and
roll with the old bit of "Better the devil you know than the one you
don't!".

To that end we actually ended up totally revamping how (and where) we dealt
with data, the Registry and our installers.

With tremendous help from Friedrich and SetupBuilder (without which all of
this would have been 10X more difficult), we made the transition to
development concepts and technologies that would not only help us get
PageSnip out the door the way it should be - but also that would lay the
groundwork for our future development efforts.


Realizing as a part of the process that there was not a good single
resource for all the bits and pieces needed that was free for all to
access, the idea for a blog site where we could post these ideas and
solutions just seemed like the thing to do.

About that the time I was thinking about it - I happened to be looking for
images on www.morguefile.com (a great FREE resource for photos) and I ran
across the one we have on the site now.

At that point course, the name for the site was a natural...


Anyway it should be fun and a nice diversion from all the other work.

Hopefully some folks will find some of the content posted there to be
useful.

;-)

Charles




--
-------------------------------------------------------------------------------------------------------
Charles Edmonds

www.clarionproseries.com - "Serious imaging tools for Clarion Developers"
www.ezround.com - "Round Corner HTML tables with matching Banners, Buttons
and Forms!"
www.lansrad.com - "Intelligent Solutions for Universal Problems"
www.fotokiss.com - "World's Best Auction Photo Editor"
-------------------------------------------------------------------------------------------------------

NewsArchive
12-27-2007, 06:03 AM
Andy

I can't dance anyway
--
Dan Scott
C55-C6.3 9053 Clarion Templates (NOT ABC)
<www.garagepartner.com>

Credit card Processing in your software
www.x-charge.com

NewsArchive
12-27-2007, 06:05 AM
>> I am guessing that the [ ] Wait for Program checkbox in the SetupBuilder
>> Run Program... or Run Command Line... are not working for you? If this
>> is the case, then it is likely because the Finish Dialog is the final
>> stop and with no more Loop Wizard active, it is forcing its way through
>> the rest of the script (just a guess). I would have to test it to see
>> what you are up against, but I do have solutions for that too. However,
>> you may want to just consider writing and calling a simple (single)
>> Clarion program to do what you need, as I know you are an expert at that
>> already :-)
>
> Andy,
>
> See my reply to Dan for some things that one would need to consider in
> regards to Vista.
>
> We ended up using a post installer (after a reboot when the PDF drivers are
> installed) with PageSnip.

Andy,

As one who has done some testing for Charles (among others), his method
works very nicely, and upon official release, other developers should
examine it closely as well. It is actually a very cleverly designed user
profile program.

David


--
From David Troxell - Product Scope 7 - Encourager Software
Clarion Third Party Profile Exchange Online
http://encouragersoftware.com/profile/clarlinks.html
http://www.encouragersoftware.com/
http://www.profileexchanges.com/blog/