View Full Version : Newbie Looking for Advice.....
NitLions
01-09-2007, 09:13 AM
I've been a DemoShield user for several years, but Macrovision has abandoned that software, so I'm looking for alternatives and I've been directed to AutoPlay Media Studio.
This might get a little wordy, but here is what our CD Browser currently does....
It has a Main Menu, System Requirements, Documentation, and Contact Us pages or scenes.
From the Main Menu, the System Requirements button will only be enabled conditionally on start up based on the presence or lack of some registry entries. If this button is enabled, we navigate to that page/scene from the click event. On this page, the same searches are basically conducted again and text is displayed conditionally based on lack of any of the system requirements. I would guess a property or something could be set with first search and used when actual Requirements page is displayed.
There are also two installation packages we call from buttons on the main menu. One is an .msi and the other is a Setup.exe with command line parameters. This was handled in DemoShield by calling LaunchAssociatedApplications (.msi) and LaunchApplication (Setup.exe) actions/functions/events.
We offer a Browse Contents button so the user can see the contents of the CD, download folder holding the browser and setup files, etc.
If the user chooses to click to the Documentation page, I would like to check for the presence of Adobe and enable a button to install if this application is lacking. Then, when they choose one of the available docs via button click from this page, it will be opened in the Reader.
The Contact Us page/scene simply displays address, phone, and fax as well as an email link and link to our website.
So, with that 'brief' summary, how much am I up against using AutoPlay? It's not a really complex Browser we distribute as we basically check some things for conditions, provide ability to install applications or requirements, and provide documentation.
I have downloaded the app for evaluation and plan on getting to work on gauging the changeover effort today.
Is there a Product Manual available for download?
Any HELP, points to info, etc. is GREATLY Appreciated!!
Bruce
01-09-2007, 10:34 AM
AMS can handle your needs easily, that's just scratching the surface of what AMS can do for you.
Just post your questions and concerns here on the forum and you'll get a quick answer. ;) Welcome aboard!
TristanD
01-09-2007, 11:07 AM
elcome to AMS :yes
NitLions
01-09-2007, 11:26 AM
OK, if I want to check for the existence of a Registry Key when my main menu loads, should I add a Registry.DoesKeyExist action in On PreLoad or OnShow.
What does the return of this look like. I'm wondering how to code in AutoPlay so that if the key is not found, then enable the System Requirements button.
Once I get this, I can probably do all the registry searching this CD Browser will need.
Also, is there an easy way to search for Adobe on the target system. I'd like to condition a button to install this app based on the absence of it.
Any help is greatly appreciated.
I like what I see with AutoPlay so far.
NitLions
01-09-2007, 11:41 AM
One other quick question....
When I install an application from a button, is there a way to initiate from the directory from which the AutoPlay.exe is calling files when distributed.
In DemoShield they had tokens like <CD> or <PATH>, where path basically resolved to the location from which the Browser was initiated.
THANKS IN ADVANCE!!!
OK, if I want to check for the existence of a Registry Key when my main menu loads, should I add a Registry.DoesKeyExist action in On PreLoad or OnShow.
What does the return of this look like. I'm wondering how to code in AutoPlay so that if the key is not found, then enable the System Requirements button.
DoesKeyExist returns a true/false which is best used in if statement
if Registry.DoesKeyExist(HKEY_LOCAL_MACHINE, "Software\\Microsoft\\Windows") then
--the key exists
Dialog.Message("Registry Key", "Does Exist");
else
-- the key doesn't exist
Dialog.Message("Registry Key", "Does NOT Exist");
end
Once I get this, I can probably do all the registry searching this CD Browser will need.
Also, is there an easy way to search for Adobe on the target system. I'd like to condition a button to install this app based on the absence of it.
Any help is greatly appreciated.
I like what I see with AutoPlay so far.
Use the project's dependencies. On the menu bar, click Project, then dependencies. You can also search this forum where detecting Acrobat Reader has been hashed over many a time.
One other quick question....
When I install an application from a button, is there a way to initiate from the directory from which the AutoPlay.exe is calling files when distributed.
In DemoShield they had tokens like <CD> or <PATH>, where path basically resolved to the location from which the Browser was initiated.
THANKS IN ADVANCE!!!
Look into the actions for
Folder.GetCurrent and Folder.SetCurrent
also look into the variable
_SourceFolder
_
NitLions
01-09-2007, 01:01 PM
Next question....
Our install requires IIS installed. I can detect if it is installed or the required version is installed, and if not, I'd like to fire appwiz.cpl.
How can I do that from the demo via a button or other means? Would I use shell.execute?
I'm liking this stuff!
File.Run("control", "appwiz.cpl", "")
As for detecting IIS... I'm not sure, but I will see if I can come up with something.
Looks like you can use the registry for this
Here's the reference I found
http://nsis.sourceforge.net/Check_IIS_Version_Before_Installing
if Registry.DoesKeyExist(HKEY_LOCAL_MACHINE, "Software\\Microsoft\\InetStp") then
--the key exists
sMajorVersion = Registry.GetValue(HKEY_LOCAL_MACHINE, "Software\\Microsoft\\InetStp", "MajorVersion", false)
sMinorVersion = Registry.GetValue(HKEY_LOCAL_MACHINE, "Software\\Microsoft\\InetStp", "MinorVersion", false)
Dialog.Message("IIS Server", "The version of IIS installed is: " .. sMajorVersion.."."..sMinorVersion);
else
-- the key doesn't exist
Dialog.Message("IIS Required", "Please install the IIS Server.");
File.Run("control", "appwiz.cpl", "");
end
NitLions
01-09-2007, 01:27 PM
Yeah, I have the registry search for it, but I'm only using the MajorVersion value. It has to be 5 or 6.
I'll try the appwiz command you provided.
The help is QUICK and appreciated!!!
NitLions
01-09-2007, 01:29 PM
[QUOTE=Worm;93714]
File.Run("control", "appwiz.cpl", "")
What does the "control" mean?
One thing to remember is that value returned will be a string. If you're going to compare the values you'll either need to compare to another string, or use String.ToNumber to compare as numerics.
If you do
File.Run("control", "", "")
It will open the Control Panel. Giving it paramaters will run the applet within the Control Panel.
NitLions
01-09-2007, 01:43 PM
Do you know if I can open the Add/Remove Windows Components applet directly using this command?
Also, what would be the route to take in firing the installs I have. I want to wait until they complete before returning to broswer.
Is there any decent way to check a return value?
The reason I ask is because the first install should complete before enabling the button for the second install. What I thought about doing was maybe quickly checking for a file after the first completes. If there, I would then enable the second installation's button.
I thought this would take days to complete! I'm almost there already. I know its basic functionality, but I can always expand later when I have more time.
NitLions
01-09-2007, 01:47 PM
[QUOTE=NitLions;93720]Do you know if I can open the Add/Remove Windows Components applet directly using this command?QUOTE]
I did find this, but I don't know if this can be tied into AutoPlay or not....
1. Open Add/Remove Windows Components dialog box - usually accessed from Add/Remove Programs, 4 mouse-clicks that really slow you down if you do this on a frequent basis. (The Add/Remove Programs applet itself takes a while to open before you can press the Windows Components short-cut):
control appwiz.cpl,,2
NitLions
01-09-2007, 01:52 PM
Oh, I think I found the appwiz answer....
In my command where I had "appwiz.cpl" I changed to "appwiz.cpl,,2" and that appears to open the A/R Win Comps!!
To have you app wait for the install to finish, set WaitForReturn = true in the File.Run
Sometimes, dependin on what install software you're using, you need to use a command line parameter along with the WaitForReturn to have it actually wait. File.Return will return the exit code of the exe called.
mwreyf1
01-09-2007, 03:31 PM
Opps.............................................. ........
NitLions
01-09-2007, 04:06 PM
If these are my command line args, which include ", how do I need to format this with regard to syntax?
--csiSilent --csiUser="Current User" --csiCompany="My Company" --csiSerialNumber="111-111-1111111-11" --csiInstallDir="C:\Program Files\MyFolder" --sciFolder="My Server" --csiMYSERVER="Myserver.company.com"
If I put this in the QuickAction, I'm fine, but if I try to script File.Run, the syntax check doesn't like my command line args.
Can I set a wait for a QuickAction?
You'll need to "escape" the quotes (and any backslashes as well) so that the interpreter ignores them. Backslash serves as the escape character in AMS/LUA.
--csiSilent --csiUser=\"Current User\" --csiCompany=\"My Company\" --csiSerialNumber=\"111-111-1111111-11\" --csiInstallDir=\"C:\\Program Files\\MyFolder\" --sciFolder=\"My Server\" --csiMYSERVER=\"Myserver.company.com\"
To your original post:
Is there a Product Manual available for download?
Any HELP, points to info, etc. is GREATLY Appreciated!!
Welcome to AMS! You may have already found it, but there is an excellent context sensitive help file included with AMS. Recommended chapters include "Scripting Guide", "User Guide" and especially the "Action Reference". Also, while using the scipt editor, double click on any action (i.e. File.Run) and a dialog pops up to help you properly use it. Click help from here and the help file will launch directly to the relevant section with fully explanations on how to use the action, what arguments/events/constants it supports as well as sample code to see how it could be used in a program.
The same help file is also available online at http://www.indigorose.com/webhelp/ams60/index.htm. FWIW It seems to work better in IE than FF or Opera.
NitLions
01-10-2007, 09:39 AM
I found the help, thanks. This seems like a really nice product that is easy to use/learn. The forum is great for quick replies and great help as well.
We purchased the product last night as I was able to pretty much rebuild our browser with AutoPlay yesterday afternoon.
I'll try the escape character for the ".
THANKS as always!!!
NitLions
01-10-2007, 09:47 AM
The \" and \\ in paths of my command line parameters worked like a champ! I should have realized due to all the \\ in paths throught settings in the application.
Oh well, live and learn.
NitLions
01-10-2007, 10:01 AM
OK, I guess this will be my last question in this thread then I'll start posting questions to new threads.
But before I leave this one.......
Now I might be asking something tricky, but with this product there may be an easy solution.
What I'm doing is firing a third party .exe to install a product that is a prerequisite of our product, which is called from a second button as I may have mentioned earlier. I see that when you execute File.Run, you can wait for the app to end and store the return code, I guess, in a variable, which defaults to and is currently set as 'result'. Does anyone know the possible return codes that are returned so that I may prevent install of our product if this thrid party app doesn't get installed properly/errors.
I'm thinking this may be a beefier request than meets the eye. What if someone cancels their installation mid stream, is there any way I can tell that from AutoPlay without needing information from the third party app supplier?
Any help or points to info is greatly appreciated.
Every .exe that I've ever dealt with returns 0 (zero) for success. If you get anything other than zero, you'll need to refer to the vendor documentation to interpret. Other than 0 for success, I didn't have any luck finding what codes to expect from the Adobe Reader installer. If the user cancels you should get an error code other than zero.
Lorne
01-10-2007, 12:06 PM
One way to find out what the app will return is to run it using AutoPlay (or a batch file), and check the return value.
You can display the return value in a dialog box (using a Dialog.Message action) or in a paragraph or label object on the page (e.g. using a Paragraph.SetText action).
Then to see what it returns on cancel, run it and cancel it. :)
NitLions
01-10-2007, 01:00 PM
That was a great thought. Unfortunately, cancelling the thrid party installation displayed the same result in a label as letting it run to completion - 0.
I thought this may only show the result of AutoPlay finding and being able to call the .exe so I put that to the test. I renamed the called .exe and tested again. The result here, too, was 0.
I guess, at this point, it's not critical that I have this functionality in the browser, but it would be nice. I'll probably need a more robust script of some sort to accomplish this.
NitLions
01-10-2007, 01:19 PM
I just thought of something huge, the parameters that I've been given are to be applied to an .exe that extracts contents, which includes their true setup.exe, I believe. That's probably why I'm not seeing good results.
My browser button calls, for example, MySetup.exe. When I execute this manually, outside of the browser, the contents are dumped to a tmp folder where a Setup.exe is then seen.
I would have to check with they can provide command parameters for the setup.exe and not the MySetup extractor.
NitLions
01-10-2007, 01:38 PM
What I've done in the meantime is to fire their launcher and let it do its thing, then when their install completes, I check for the existence of a certain file they install. If there, I proceed with enabling the button to launch our install.
If not, I display a message then Page.Jump to our Contact Us page.
Lorne
01-10-2007, 01:51 PM
Yep, some installers use a initial stub, or launcher, which then extracts and runs a contained exe.
The installer may have a command line option that lets you tell the stub to wait until the "real" exe is done, and to return its return value, but it depends on the installation tool.
Alternatively, you might be able to tell the stub to extract the files but not launch the "real" exe...then you could launch it directly using AutoPlay.
Bruce
01-10-2007, 02:07 PM
Hey NitLions, do you have a good interface? (art-sy stuff)
NitLions
01-10-2007, 02:36 PM
I did not tell the entire truth in that this is an additional question, but a small one so I didn't start a new thread.
When displaying a message box, how can I insert a carriage return/line feed in the message?
Use the escape characters \r\n
Dialog.Message("Test", "This is line one.\r\nThis is line two.\r\nThis is line three.");
Or
sMsg = [This is line one.
This is line two.
This is line three.]
Dialog.Message("Test", sMsg);
NitLions
01-10-2007, 03:30 PM
Yet another question...
Is there a listing of escape characters anywhere?
NitLions
01-10-2007, 03:31 PM
Hey NitLions, do you have a good interface? (art-sy stuff)
Why do you ask?
not sure, the help file would be the starting place though
Lorne
01-10-2007, 04:33 PM
It's in the help file, indexed under "escape sequence."
The escape sequences that you can use include:
\a - bell
\b - backspace
\f - form feed
\n - newline
\r - carriage return
\t - horizontal tab
\v - vertical tab
\\ - backslash
\" - quotation mark
\' - apostrophe
\[ - left square bracket
\] - right square bracket
Bruce
01-10-2007, 05:39 PM
Why do you ask?
If I can help let me know.
Bruce
01-10-2007, 06:46 PM
Take a screen print of what ya have and post it.
RizlaUK
01-10-2007, 07:06 PM
Hey NitLions, welcome to ams, as you are asking about message dialogs i highly recomend you take a look at dermots xdialog dll and roboblue made a very handy and easy to use utility to complament it
http://www.indigorose.com/forums/showthread.php?t=18215&highlight=xdialog
and the best part about it.....its free, lol
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.