PDA

View Full Version : need help with file run


DuFuSS
02-02-2006, 03:33 PM
I'm trying to get my partition magic setup in an autoplay. I set the action to file run and point the action to the setup file, but when I click on the button to run it in preview I get an error reading setup initialization file. All the other buttons work fine., but they have only one file to run, partition magic has multiple files, only one setup file but files relating to the setup. What am I doing wrong?

Gabis
02-02-2006, 04:53 PM
sounds like you need to set the working folder. IE

File.Run("AutoPlay\\Docs\\MyProg.exe", "Autoplay\\Docs", "", SW_SHOWNORMAL, true);

the second arguement is the working folder. I made this mistake quite a few times. Even better way to do it, put the installer and all related files in their own subfolder, and change the above code to fit that. Making the installers folder the working folder.

DuFuSS
02-03-2006, 08:07 AM
I tired that Gabis I still get same error.

DuFuSS
02-03-2006, 09:40 AM
I tired that Gabis I still get same error.
this is my action setting

result = File.Run("AutoPlay\\Docs\\setup.exe", "", "AutoPlay\\Docs", SW_SHOWNORMAL, true);
here's my folder setup

Directory of e:\pm805

02/03/2006 08:14 AM <DIR> .
02/03/2006 08:14 AM <DIR> ..
02/03/2006 08:14 AM <DIR> BTMagic
02/03/2006 08:14 AM <DIR> DOCS
04/06/2004 04:36 PM 10,587 Readme.TXT
02/03/2006 08:14 AM <DIR> RESCUEME
02/03/2006 08:14 AM <DIR> Setup

here's the setup folder where I'm pointing to setup.exe

02/03/2006 08:14 AM <DIR> .
02/03/2006 08:14 AM <DIR> ..
02/25/2003 11:04 AM 4,632 0x0409.ini
02/03/2006 08:14 AM <DIR> BTMagic
05/10/2004 02:03 PM 218,165 DocQuick.cab
02/03/2006 08:14 AM <DIR> DOCS
05/10/2004 02:03 PM 788,214 DocUser.cab
05/10/2004 02:03 PM 333,000 Drivemap.cab
03/11/2002 09:45 AM 1,708,856 instmsia.exe
03/11/2002 10:06 AM 1,822,520 instmsiw.exe
09/04/2003 03:27 PM 820,224 ISScript9.Msi
02/03/2006 08:14 AM <DIR> licenses
05/10/2004 02:06 PM 2,150,556 Norton PartitionMagic.msi
05/10/2004 02:05 PM 713 Patch.cab
05/10/2004 02:04 PM 1,234,036 PExplore.cab
05/10/2004 02:05 PM 4,676,331 PMagic.cab
05/10/2004 02:04 PM 3,107,034 PMDOS.cab
05/10/2004 02:03 PM 62,760 PQBoot.cab
05/10/2004 02:05 PM 204,000 PQBootW.cab
07/12/2002 12:29 PM 138,752 PQFEATUR.DLL
04/02/2004 03:28 PM 615 PQPB.RTC
05/10/2004 02:05 PM 891,154 PtInfo.cab
04/06/2004 04:36 PM 10,587 Readme.TXT
05/10/2004 02:06 PM 3,929,506 Rescue.cab
02/03/2006 08:14 AM <DIR> RESCUEME
04/02/2004 12:07 PM 156,556 Setup.bmp
05/10/2004 02:02 PM 229,376 setup.exe
05/10/2004 02:06 PM 1,283 Setup.ini
05/10/2004 02:03 PM 4,384,024 Tutorial.cab
05/10/2004 02:03 PM 339,278 VFloppy.cab

DuFuSS
02-03-2006, 10:08 AM
Geez Gabis what a dumb ass I am, I misunderstood your instructions. I moved the pm805 folder to my docs folder pointed to it and it works great.

Thanks for your help