PDA

View Full Version : Help plis !


klaus
03-29-2006, 07:29 AM
how I make to create a folder and the property of this folder that will be created is Hidden and shared ?

Jason Pate
03-29-2006, 01:07 PM
You can't use SF to set a folder as shared or hidden. But you could use a third party tool like SetACL (http://setacl.sourceforge.net/). Now I have only tried SetACL in a controlled environment I never used it in a full release, but it should do the trick for you.

pww
03-30-2006, 08:35 AM
You can do this with a batch file I think.

To share a folder the syntax was
net share blah="C:\Test"

which will share the folder C:\Test as blah

To set something as hidden use the attrib command like
attrib +h "C:\Test\*.*" \s \d

Not 100% sure about the syntax so please check. Probably the user running the installer should be admin. About sharing do some tests on different OS's and with xp simple file sharing on/off

Jason Pate
03-30-2006, 09:57 AM
Good Idea I did not think of using netshare. Nice you could even modify the batchfile at runtime if you had to.

TJS
03-30-2006, 10:28 AM
That's great! To make things just a bit simpler, you could skip the batch file all together and call those commands directly from AMS using Shell.Execute().

playmenow
03-30-2006, 02:14 PM
But does SUF include the Shell.Exceture() action?

TJS
03-30-2006, 02:27 PM
But does SUF include the Shell.Exceture() action?

Sure does!

Jason Pate
03-30-2006, 06:00 PM
Shell.Execute()

Example
Shell.Execute(SessionVar.Expand("%AppFolder%").."\\Myfile.exe", "open", "", "", SW_SHOWNORMAL);

Jason Pate
03-30-2006, 06:02 PM
Shell.Execute()

Example
Shell.Execute(SessionVar.Expand("%AppFolder%").."\\Myfile.exe", "open", "", "", SW_SHOWNORMAL);