Thanks to all for the suggestions.

Ajay

-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of MikeB
Sent: Thursday, August 07, 2014 1:44 PM
To: RBASE-L Mailing List
Subject: [RBASE-L] - Re: LAUNCH Command

And if you do not want any screen flicker then you could use the windows
API SetFileAttributes Function as follows:

{begin code but watch for email client goofy line wrapping when you don't
want it}

-- setFileAttrib using Windows API
-- By Mike Byerley 08/07/2014
{ Windows API declaration
BOOL WINAPI SetFileAttributes(
  _In_  LPCTSTR lpFileName,
  _In_  DWORD dwFileAttributes
);
Used in Kernel32.dll

MSDN description at:
http://msdn.microsoft.com/en-us/library/windows/desktop/aa365535(v=vs.85).
as
px
}

IF (CHKFUNC('SetFileAttributes')) = 0 THEN
  -- RBase delclaration has reverse order of argument lists
  STDCALL Function 'SetFileAttributesA' alias +
   'SetFileAttributes' (INTEGER, PTR TEXT (260) ) : INTEGER ENDIF

SET VAR fa_archive INTEGER = 32
SET VAR fa_hidden INTEGER = 2
SET VAR fa_normal INTEGER = 128
SET VAR fa_readonly INTEGER = 1
SET VAR fa_system INTEGER = 4

SET VAR vi INTEGER = 0

SET VAR vcurpath = (CVAL('CURRDIR'))

trace
IF (CHKFILE(.vcurpath + '\test.txt')) = 1 THEN

  SET VAR vfile = (.vcurpath + '\test.txt')

  { NOTE
   Toggle the following two lines to set or remove
   The attribute settings
  }
  --SET VAR vattribs = (.fa_readonly + .fa_system + .fa_hidden)
  SET VAR vattribs = .fa_normal
  SET VAR vi = +
  (DLCALL('Kernel32', 'SetFileAttributesA', vattribs, .vfile)) ENDIF

RETURN

{end code}

> -----Original Message-----
> From: [email protected] [mailto:[email protected]] On Behalf Of A.
> Razzak Memon
> Sent: Thursday, August 07, 2014 1:01 PM
> To: RBASE-L Mailing List
> Subject: [RBASE-L] - Re: LAUNCH Command
>
> At 12:32 PM 8/7/2014, Ajay Sanghvi wrote:
>
> >I have been trying to issue the following command using the LAUNCH
> >command from within a rbase application with no success.
> >
> >ATTRIB.EXE +r +s +h Test.txt
> >
> >This command executing correctly would change the attribute of the
> file
> >test.txt to read only, system file and hidden.
> >
> >I cannot get the command to work.
>
>
> Ajay,
>
> Try the following command and see what you get:
>
> ZIP ROLLOUT ATTRIB.EXE +R +S +H Test.txt RETURN
>
> Very Best R:egards,
>
> Razzak.
>
> www.rbase.com
> www.facebook.com/rbase
> --
> 31 years of continuous innovation!
> 16 Years of R:BASE Technologies, Inc. making R:BASE what it is today!
> --

-- 
**** Berje will be closing at 1:30** PM** every Friday** from** July 7, 
2014 through August 29, 2014 ****
*We would like to wish you and your family a safe and fun summer.*


Reply via email to