This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- FileAttributes issues
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
May 21, 2007
09:54 AM
FileAttributes issues
I'm having some issues using FileAttributes to set file permissions for some of my files. I would rather use this custom even to set the file permissions that's why I'm trying to implement this. Here is my code:
[HTML]try {
String instLoc = arg0.resolveString( "$P( absoluteInstallLocation )" );
FileService fileserv = ( FileService )arg0.getService( FileService.NAME );
FileAttributes fileperm;
fileserv.setFileAttributes( instLoc + "//bin//*", fileperm.setAttributes(755));
} catch (ServiceException e ) {
System.out.println( e );
e.printStackTrace( );
} [/HTML]
When I try to compile I get an error that "void" type is not allowed on the line where I have fileperm.setAttributes. I'm having a hard time getting past this error and I haven't been able to find much help in the help file. Hopefully someone on here has done this before.
Thanks
[HTML]try {
String instLoc = arg0.resolveString( "$P( absoluteInstallLocation )" );
FileService fileserv = ( FileService )arg0.getService( FileService.NAME );
FileAttributes fileperm;
fileserv.setFileAttributes( instLoc + "//bin//*", fileperm.setAttributes(755));
} catch (ServiceException e ) {
System.out.println( e );
e.printStackTrace( );
} [/HTML]
When I try to compile I get an error that "void" type is not allowed on the line where I have fileperm.setAttributes. I'm having a hard time getting past this error and I haven't been able to find much help in the help file. Hopefully someone on here has done this before.
Thanks
(1) Reply
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
May 22, 2007
02:38 PM
After talking to tech support it seems that FileAttributes is a real pain to use. Instead I am just using a chmod in an Execute Process.