Jump to content

A question on syntax


Recommended Posts

Hello,

Wanted to say what a great program this has been for me.

I seem to be having a small issue with regards to syntax.

I'm trying to do a gcond check for Malwarebytes' Anti-Malware

and I'm not sure how to enter the string value to check for.

---------------------------------------

Error in condition statement for;

Malwarebytes' Anti-Malware

FileExists(\"%programfiles%\Malwarebytes' Anti-Malware\MBAM.EXE")

Treating as a false condition

---------------------------------------

The above error is what I get, no mater what syntax I use, I just cant get it to like that little ' after the s. :no:

Does anyone know the magic code to accomplish this?

Link to comment
Share on other sites


@ Exeter212

Try this

gcond[pn]=['FileExists(\"%programfiles%\\Malwarebytes\' Anti-Malware\\mbam.exe")'];

(Put \ before the ' )

Worked for me in the past.

Greetings, DJPro

Edited by DJPro
Link to comment
Share on other sites

@ Exeter212

Try this

gcond[pn]=['FileExists(\"%programfiles%\\Malwarebytes\' Anti-Malware\\mbam.exe")'];

(Put \ before the ' )

Worked for me in the past.

Greetings, DJPro

Thx DJPro

I just checked my script entry and that seems to be what I'm using now.

prog[pn]=['Malwarebytes\' Anti-Malware'];

ordr[pn]=[24];

desc[pn]=['Malwarebytes\' Anti-Malware'];

uid[pn]=['MBAM'];

dflt[pn]=['yes'];

cat[pn]=['System'];

forc[pn]=['no'];

configs[pn]=['Interactive,Full'];

gcond[pn]=['FileExists(\\"%programfiles%\\Malwarebytes\' Anti-Malware\\MBAM.EXE\")'];

cmd1[pn]=['"%wpipath%\\Install\\MBAM-SETUP.exe"'];

picf[pn]=['MBAM.JPG'];

picw[pn]=['600'];

pich[pn]=['500'];

textl[pn]=['Top'];

pn++;

The delimiting \ seems to work everywhere else EXCEPT the gcond statement, must be some unique parsing that goes on during this check perhaps?

If I rename the installed folder to discard the ' everything works fine.

Link to comment
Share on other sites

Hi Exeter212

Notice this

gcond[pn]=['FileExists(\\"%programfiles%\\Malwarebytes\' Anti-Malware\\MBAM.EXE\")'];

Change to this

gcond[pn]=['FileExists(\"%programfiles%\\Malwarebytes\' Anti-Malware\\MBAM.EXE\")'];

You have 2 \\ before "%programfiles%

If you only have 1 \ the GCOND statement will work correctly

Greetz, DJPro

Edited by DJPro
Link to comment
Share on other sites

Hi Exeter212

Notice this

gcond[pn]=['FileExists(\\"%programfiles%\\Malwarebytes\' Anti-Malware\\MBAM.EXE\")'];

Change to this

gcond[pn]=['FileExists(\"%programfiles%\\Malwarebytes\' Anti-Malware\\MBAM.EXE\")'];

You have 2 \\ before "%programfiles%

If you only have 1 \ the GCOND statement will work correctly

Greetz, DJPro

Kicking myself in the face for not noticing that!! I figured a fresh set of skilled eyes would spot what I failed to notice. Working like a charm now. :thumbup Many thanx DJPro, you nailed that one!

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...