Quick and dirty:
Code:
Break on
;Define
$folder='C:\Documents and Settings\'+@USERID+'\Start Menu\Yada'
$lnk=$folder+'\target.lnk'
$ini=$folder+'\desktop.ini'
;Create folder
MD $folder
;Create target shortcut
$rc=wshshortcut($folder+'\target.lnk','p:\temp')
;Create desktop.ini
$rc=WriteProfileString($ini,'.ShellClassInfo','CLSID2','{0AFACED1-E828-11D1-9187-B532F1E9575D}')
$rc=WriteProfileString($ini,'.ShellClassInfo','Flags','2')
$rc=WriteProfileString($ini,'.ShellClassInfo','ConfirmFileOp','0')
;Folder readonly
$rc=SetFileAttr($folder,1)
;Ini hidden+system
$rc=SetFileAttr($ini,2+4)
Exit
Function WshShortCut($path,$targetpath,optional $arguments,optional $startdir,optional $iconpath,optional $style)
Dim $Shell,$shortcut
$Shell=CreateObject("wscript.shell")
If $Shell
$shortcut=$Shell.createshortcut($path)
If $shortcut
$shortcut.targetpath=$targetpath
If $arguments
$shortcut.arguments=$arguments
EndIf
If $startdir
$shortcut.workingdirectory=$startdir
EndIf
If $iconpath
$shortcut.iconlocation=$iconpath
EndIf
If $style
$shortcut.windowstyle=$style
EndIf
$shortcut.save
$shortcut=0
EndIf
$Shell=0
EndIf
Exit @error
EndFunction
Note: The UDF came from the UDF section on this BB.