PDA

View Full Version : Help Linking exe's to buttons


simdave
05-09-2006, 12:15 PM
Hey, I recently installed Autoplay media studio 5 to create an AIO application suite , ive never used it before and ive hit a bit of a snag.

Ive already created the GUI and added buttons..ect but my problem is actualy linking the buttions to the executables. ok the default save directory for Autoplay media studio is: c:\documents and settings\username\my documents\Autoplay media studio 5\toolkit ( tool kit being my project ) , With that i decided to use that as the directory for the software i intend on running from the front end gui. Here is where im getting confused. once ive linked the buttons to the software within that directory and create an iso image wont the directory for the software be different? example d:\Toolkit\software..ect ??

Also i really dont know how to link the buttons to the actualy exe's in the software folder.. i have read the help file but all it gives me is this:

File.Run("c:\\your_file.exe", "", "", SW_SHOWNORMAL, false);

As the cmd to use, so im thinking ok ok all i need to do is do a bit of editing so i did this:

File.Run("c:\\test\Novell Clients\NWclient9.1\winnt\i386\nwsetup.exe", "", "", SW_SHOWNORMAL, false);

But it didnt work :rolleyes

I cannot find anything in the "Add Action" section that relates to running executibles from buttons.

I know im at fault somewhere here but like i said im new to this application so
ANY help would be appreciated. :yes

longedge
05-09-2006, 12:42 PM
Hi,

Without going too deeply into what you are trying to do, the first thing I notice is that you haven't 'escaped' the backslashes - try

File.Run("c:\\test\\Novell Clients\\NWclient9.1\\winnt\\i386\\nwsetup.exe", "", "", SW_SHOWNORMAL, false);

Hope that helps

p.s. - Don't confuse the default location that your project (work in progress) is saved to with the location of files, images, audio etc. that you use within the completed CD or Executable you produce.

simdave
05-09-2006, 01:16 PM
Ok i tried that but it didn’t work....but it isn’t the cmd at fault.

i did exactly as your example but it didnt work, so just as a test i decided to use something other than the Novell client and used DVD shrink. i created a folder C:\test and stuck dvd shink in and edited the cmd to:


File.Run("c:\\test\\DVD Shrink.exe", "", "", SW_SHOWNORMAL, false);

AND IT WORKED! :D :yes :D :yes

So now im wondering why the Novell's setupnw.exe wont run... could it maybe because the novell setup folder is located within the autoplay save directory?

oh and what you said before about the directory differences. So if i use c:\test directory as the location of the software i want to use, when it comes to making the image Autoplay media studio will make the necessary adjustments and copy the software in to the iso?

Im sorry if im complicating things.

longedge
05-09-2006, 01:33 PM
You refer to both setupnw.exe and nwsetup.exe in your posts. Don't know if that's where the problem lies.

In general the best thing to do is to keep everything inside the folder structure of your AMS project (I always put exe's in the docs folder).

You can certainly reference folders/files outside of there but you then need to make sure that the folders/files exist and if not create them before you reference them. Best to keep it straightforward at first :)

When you build your project AMS will include all the files that you have used automatically.

simdave
05-09-2006, 01:44 PM
Lol, indeed it could have had something to do with that :eek: , but it seems ive unconciously corrected that as ive now got it all to work from c:\test ( with the correct spellings ). i guess in my "slight" frustration i mixed the word up. the thing that really helped was the missing double back slash. im not a programmer im a desktop engineer so the double back slash is new to me. :)

You've been a great help to me :)

longedge
05-09-2006, 02:26 PM
im not a programmer

Me neither - but then you don't need to be with AMS :)

Glad it helped.

simdave
05-09-2006, 03:41 PM
I guess it seems more complex than it actualy is because its new to me. :) But everything is comming together now as ive kicked myself for such a stupid mistake in the cmd :rolleyes