I want to change a folder's(in my setup path) Attribute to "hidden",but I can't find a function like "SetAttributes" in Folder's operation.
SUF6NEWBIE
03-03-2005, 07:06 PM
Hi
this may help.. at a command prompt type: attrib /?
this will bring up the available command options for a target
folder or tree or files.. /D relates to folders
you may need to try some of the syntax to get it working.
One thing to remember is if the Operating system user setting
is to 'show hidden files and folders' ..hiding a folder and or files
will basically achieve nothing...
HTH
SUF6NEWBIE
03-03-2005, 07:22 PM
below link gives you an example showing just one way to
create a batch file on the fly to use with the File.Run action
http://www.indigorose.com/forums/showthread.php?t=9205
may be usefull..
I do know this,BUT I want to know how I can achieve the function in SF7.
My work to finish is very simple only like this:
/****here I want to change folder's attrib****/
strAppFolder = SessionVar.Expand("%AppFolder%");
Registry.CreateKey(HKEY_LOCAL_MACHINE, "SOFTWARE\\ODBC\\ODBC.INI\\czxt");
Registry.SetValue(HKEY_LOCAL_MACHINE, "SOFTWARE\\ODBC\\ODBC.INI\\czxt", "Driver", strAppFolder.."\\db\\dbeng\\dbodbc8.dll", REG_SZ);
Registry.SetValue(HKEY_LOCAL_MACHINE, "SOFTWARE\\ODBC\\ODBC.INI\\czxt", "UID", "dba", REG_SZ);
Registry.SetValue(HKEY_LOCAL_MACHINE, "SOFTWARE\\ODBC\\ODBC.INI\\czxt", "PWD", "sql", REG_SZ);
Registry.SetValue(HKEY_LOCAL_MACHINE, "SOFTWARE\\ODBC\\ODBC.INI\\czxt", "DatabaseFile", strAppFolder.."\\db\\czxt.db", REG_SZ);
Registry.SetValue(HKEY_LOCAL_MACHINE, "SOFTWARE\\ODBC\\ODBC.INI\\czxt", "EngineName", "czxt", REG_SZ);
Registry.SetValue(HKEY_LOCAL_MACHINE, "SOFTWARE\\ODBC\\ODBC.INI\\czxt", "AutoStop", "Yes", REG_SZ);
Registry.SetValue(HKEY_LOCAL_MACHINE, "SOFTWARE\\ODBC\\ODBC.INI\\czxt", "Integrated", "No", REG_SZ);
Registry.SetValue(HKEY_LOCAL_MACHINE, "SOFTWARE\\ODBC\\ODBC.INI\\ODBC Data Sources", "czxt", "Adaptive Server Anywhere 8.0", REG_SZ);
Registry.SetValue(HKEY_LOCAL_MACHINE, "SOFTWARE\\ODBC\\ODBC.INI\\czxt", "Start", strAppFolder.."\\db\\dbeng\\dbeng8.exe -d -c1024 -Q", REG_SZ);
SUF6NEWBIE
03-03-2005, 07:36 PM
setting the folder below to your expanded strAppFolder
sample batch file use textfilewritefromstring action then run it.
sets the users temp dir to hidden..
@echo off
attrib +H /S /D %Temp%
exit
in this case %Temp% is an operating system assigned 'envronment variable'
and not a LUA or Session variable..
csd214
03-04-2005, 10:06 AM
Alternatively, to stay with SUF70:
File.SetAttributes(sFolder, { Hidden = true });
It veritably worked!
Thank yoy csd214.
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.