PDA

View Full Version : Run Unattended?



NewsArchive
12-15-2011, 12:51 AM
Hello,

I have a setupbuilder which has a window and some prompts. (ie: first time
installation)

Once it runs, it sets the directory in the registry and from then on, it
should run automatically without any user intervention at all.

So, I'd like to call it so:

a) when there is no switch, it runs like a normal setup builder

b) when there is a switch like /quiet (ie: MySetupBuilder.exe /quiet) that
it will run from start to finish without ANY screens or anything - and end
gracefully without issue.

The reason being is that my app is running as a service. It checks to see
if there is an update. If so, it downloads it. Then, it shuts itself down
adn calls the SetupBuilder and then the service starts backup again.

Thank you.

Robert Paresi

NewsArchive
12-15-2011, 12:51 AM
I guess my question is this.

How do I detect this "QUIETMODE bit".

I went into the help text and I can see that QuietMode bit, but I searched
the help text for QuietMode, and nothing comes up.

So, I can see I do this:

MySetupBuilder.exe /S /Q


This works well.

Now, I just need to detect this QuietMode Bit, so at the very end, if that
switch is being used, then I need to startup my app again.

ie:

IF QUIETMODEBIT is True then Run('myservice.exe')

-Robert

NewsArchive
12-15-2011, 12:52 AM
I'll assume it is this?

If %_SB_INSTALLERFLAG% Equals "1" on Position "$SB_QUIETMODEFLAG$" Then

I think the help text needs to be beefed up to say what this ON POSITION
was/is. It wasn't helpful to say you needed to use the IF variable, select
ON POSITION and key in the variable.

But, I think I got it now. :)

Robert Paresi

NewsArchive
12-15-2011, 12:52 AM
Hi Robert,

> I'll assume it is this?
>
> If %_SB_INSTALLERFLAG% Equals "1" on Position "$SB_QUIETMODEFLAG$" Then
>
> I think the help text needs to be beefed up to say what this ON POSITION
> was/is. It wasn't helpful to say you needed to use the IF variable,
> select ON POSITION and key in the variable.
>
> But, I think I got it now. :)

Yes, this is correct :)

BTW, the "ON POSITION" method is demonstrated several times in the "Learning
SetupBuilder Part I" (and in the Examples) but I'll make it again more clear
in the Developer's Guide, thank you.

Friedrich

NewsArchive
12-16-2011, 12:32 AM
> I think the help text needs to be beefed up to say what this ON POSITION
> was/is.

I agree. This was "suboptimal" in the help. We have improved the manual
now and added some more "ON POSITION" information and copied some examples
from the "Set Installer Flag..." description.

Thank you for your suggestion.

Friedrich

NewsArchive
12-16-2011, 12:32 AM
Perfect. Everything else is so easy --- I guess I'm wanting every single
thing to be easy. LOL!


:-)

Right now, my installer works so perfectly. The service updates itself at
night perfectly.

-Robert

NewsArchive
12-16-2011, 12:33 AM
> Perfect. Everything else is so easy --- I guess I'm wanting every single
> thing to be easy. LOL!

<BG>

> :-)
>
> Right now, my installer works so perfectly. The service updates itself
> at night perfectly.

This is music to my ears :-)

Thanks,
Friedrich

NewsArchive
12-16-2011, 12:33 AM
Hi,

Can I ask a favor? :-)

Can there be an enhancement to change the UNIX security (CHMOD)

I know I might be asking too much but when I upload files, it's like 99%
easy. The 1% is that I have to log into our unix server, change the
directory from 555 to 755 on my public folder.

Then I run SetupBuilder which transmits the file.

Then I go back to my unix server and change the public folder from 755 back
to 555.

If I forget to do this, the damn hackers mess with my directory. (long
story)

So, it would be cool if I had control do kinda of script the upload command.

1. log into directory public_html
2. chmod of files directory to 755
3. run the upload (what it does now)
4. chmod of files directory to 555

All I need is simply:

Remote Command to run before upload
Remote Command to run after upload

Then I can just do:

chmod public_html\files 755
chmod public_html\files 555

:-)

Anyway - if you can ... it would be cool.

-Robert

NewsArchive
12-16-2011, 12:34 AM
Hi Robert,

>
> Can there be an enhancement to change the UNIX security (CHMOD)
>

Good question. SetupBuilder makes use of the core Windows WinInet component
to upload the files. As I understand it, it's not possible to directly
retrieve the file attributes or owner information and you cannot change them
by using WinInet functions.

But in theory, the "FtpCommand" WinInet.DLL function can be used to set
permissions.

I'll play with it...

Friedrich

NewsArchive
12-16-2011, 12:34 AM
Hi,

Yes - because you have WIN servers and UNIX servers.

If I were to do it, I would use FTPCommand:

The FtpCommand function sends a command to the remote server, and returns
the result code back to the caller. This function is typically used for
site-specific commands not directly supported by the API.

(Catalyst Tools)

-Robert