Log in

View Full Version : Why wont this run



Bobzilla69
12-02-2011, 09:39 PM
Hey,

i am tweaking a procedure i made for the MSI extra but it doesnt seem to work.

all that happens is it freezes, can some one confirm/check this please.


program PRS;
{$i SRL/SRL.scar}
var
PRS_Accounts: Integer;

const
PRS_Path = IncludePath + 'PRS\';

Procedure Bobzilla_CheckFile;
begin
try
if FileExists(PRS_Path + 'PRS.xml') then
begin
Writeln('File all ready created');
PRS_Accounts:= OpenFile(PRS_Path + 'PRS.xml' , False);
CloseFile(PRS_Accounts);
end else
begin
WriteLn('File not Found, Creating new file')
PRS_Accounts := CreateFile(PRS_Path + 'PRS.xml');
CloseFile(PRS_Accounts);
end;
except
WriteLn('Bobzilla_CheckFile: ' + ExceptionToString(ExceptionType, ExceptionParam));
end;
end;

begin
setupsrl;
Bobzilla_CheckFile;
end.

BraK
12-02-2011, 09:43 PM
Do you actually need SetupSRL in that part of the Script?

Bobzilla69
12-02-2011, 09:45 PM
no but i added it in case it made a difference, which it didnt

BraK
12-02-2011, 09:49 PM
CreateFile is failing for some reason and returning -1 might ask wizzup about it. I ran it with admin rights and couldn't get it to work. It might be a programing bug again have to ask wizzup.

Bobzilla69
12-02-2011, 09:50 PM
oh ok, that might mean MSI will not work if its calling my extra as its exactly the same code

Edit: Only if they run my extra (i think)

Edit2: I am running fresh install Simba that's been updated via auto updater to 977, hopefully that helps a bit more.

Just tried MSI and i can not run it, form doesn't even load because its loading extras first

Wizzup?
12-03-2011, 12:02 AM
I ran it on Linux and it worked, though it did have a '\' in the filename. Are you sure the directory exists? Perhaps you should create the directory first. I can try this in WINE later.

BraK
12-03-2011, 01:06 AM
I flipped the slash when I worked with it earlier and didn't get it to work. I'll mess with it more in the morning.

Bobzilla69
12-03-2011, 08:23 AM
I dont know if this makes a difference but i just got it to work on a laptop that has vista 32bit. my main computer which it didnt work on has windows 7 64bit.

i also do have all the directories, so it cant be that, seeing as MSI use this function for my extra which is on by default and it fails for me now.....

i thought it might be the security extension but i have yet to confirm/test this.

brak are you using windows 64 bit? it might be that?

but i find it weird that its only happening for a few people, with MSI i thought we would have had loads of reports.......

Bobzilla69
12-12-2011, 12:25 PM
I flipped the slash when I worked with it earlier and didn't get it to work. I'll mess with it more in the morning.

working for you with simba 0.98?