PDA

View Full Version : Empty String comparison fails during Silent Install



angshuman
11-11-2011, 05:37 AM
Hi All,
I have an existing script which runs fine. But, when I am authoring a silent install via setup.exe -r command and do not input any string in one of the STANDARD Install shield dialogs [in one the steps], following reposne is recorded -

[{4830E3C0-A1C1-11D3-A132-0008C79C345D}-SdShowDlgEdit1-2]
szEdit1=' '
Result=1

Now, the code checks as ,

if(mystring = "") then ---> check fails
// do something
endif;

How do I check for empty strings during Silent Installation ?

angshuman
11-11-2011, 06:31 AM
Hello,
I have managed to achieve this as below -

// trim the string
StrTrim ( svString );

// get the length
nLength = StrLength (svString);

// check for length

if(nLength = 0) then
// your logic
endif;