Uživatelské nástroje

Nástroje pro tento web


wiki:user:stod_-_dalsi_poznamky

Další poznámky

InstallPad

www.installpad.com

Napady na vylepšení:

  • rozzipování
  • otevření website
  • kategorie (dá se řešit více download listy)

Flex Builder

Nejprve nainstalovat: SVN a Flex: http://www.flashmagazine.com/tutorials/detail/setting_up_subversion_with_adobe_flex_3/

  • zda se, ze oproti navodu je potreba nainstalovat i JavaHL Adapter (pri instalovani Subclipse se da zaskrtnout)

Nejlepsi zpusob:

  • vycheckoutovat projekt z SVN - v jednom podadresari bude Flex projekt a v druhem webservice
  • prepnout Flex na novy workspace v tomto adresari – vytvori v nem adresar .metadata (ten neni v svn)
  • pravym tlacitkem mysi na Flex Navigator, Import, General, Existing project
  • vybrat adresar s projektem a vybrat projekt, ktery se „naimportuje“
  • NEZASKRTAVAT Copy to workspace

Horsi zpusob:

  • Zalozit novy adresar, kde je libo napr. D:\Programy\Specimens\
  • Ve Flexu prepnout workspace do tohoto adresare - vytvori se novy workspace
  • kliknout pravym na Flex Navigator, Import, SVN a udelat checkout Flexoveho projektu z SVN
  • Do adresare s Workspacem se da prikopirovat Projekt s Webservicem. V adresari workspacu budou dva podadresare spravovane kazdy zvlast na svn.

crossdomain.xml, ktery musi byt v rootu webserveru, na kterem bezi web-service:

<?xml version="1.0" ?> 
<cross-domain-policy>
  <site-control permitted-cross-domain-policies="all" /> 
  <allow-access-from domain="*" /> 
  <allow-http-request-headers-from domain="*" headers="*" /> 
</cross-domain-policy>

Specimens

  • vyřešit propagaci výjimek z webservice do Flexu

VBS

Skript na založení nového uživatele

' vytvori uzivatele podle parametru skriptu 'username' 'jmeno' 'prijmeni'
' nastavi mu jmeno a prihlasovaci skript
' prida ho do skupiny patf-users
' Vytvori startup skript pro uzivatele, ktery mu mapuje disky L: a P:
' Vytvori adresar na file-serveru, ktery se namapuje na L:
' Nastavi uzivateli pristup k tomuto adresari

if WScript.Arguments.Count <> 3 Then 
  WScript.Echo "Usage: newuser login name surname"
  WScript.Quit
end If

userName = WScript.Arguments(0)
strGivenName = WScript.Arguments(1)
strSecondName = WScript.Arguments(2)


Const ForReading = 1
Const ForWriting = 2
Const templateScriptFile = "template.txt"
Const profilesPath = "\\abacus2-server\NETLOGON\"
Const foldersPath = "\\file-server\users\"

strPassword = "carramba"
userScriptFileName = userName & ".bat"
userScriptFile = profilesPath & userScriptFileName
userFolderPath = foldersPath & userName



Dim objRootLDAP, objContainer, objUser, objShell
Dim strUser, strGivenName, strSecondName, strContainer

strUser = userName

strContainer = "cn=Users ," ' Note the comma

' Bind to Active Directory, Users container.
Set objRootLDAP = GetObject("LDAP://rootDSE")

Set objContainer = GetObject("LDAP://" & strContainer & _
objRootLDAP.Get("defaultNamingContext"))



' Build the actual User.
Set objUser = objContainer.Create("User", "cn=" & strUser)
objUser.Put "sAMAccountName", strUser
objUser.Put "givenName", strGivenName
objUser.Put "SN", strSecondName
objUser.Put "displayName", strGivenName & " " & strSecondName
objUser.Put "name", strGivenName & " " & strSecondName
objUser.Put "scriptPath", userScriptFileName
objUser.Put "userPrincipalName", strUser & "@" & "patfyz.lf1.cuni.cz"
'objUser.Put "userAccountControl", 512  'enables the account (514 - disable) // see below
objUser.SetInfo

Set objUser = GetObject("LDAP://cn=" & strUser & ", " & strContainer & _
objRootLDAP.Get("defaultNamingContext"))
objUser.SetPassword strPassword
objUser.AccountDisabled = False
objUser.Put "pwdLastSet", 0
objUser.SetInfo

' get the patf-users group and add the new user
Set objGroup = GetObject("LDAP://cn=patf-users,cn=Users, " & objRootLDAP.Get("defaultNamingContext"))
objGroup.add(objUser.ADsPath)

WScript.Echo "User created: " & strGivenName & " " & strSecondName & "; Password: " & strPassword


Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objFile = objFSO.OpenTextFile(templateScriptFile, ForReading)

'Create the startup script
strText = objFile.ReadAll
objFile.Close
strNewText = Replace(strText, "<username>", userName)

Set objFile = objFSO.OpenTextFile(userScriptFile, ForWriting, True)
objFile.Write strNewText
objFile.Close

WScript.Echo "Script file created: " & userScriptFile

'Create the home folder
objFSO.CreateFolder(userFolderPath)
WScript.Echo "Directory created: " & userFolderPath

'Assign user's permissions
Set objShell = CreateObject("Wscript.Shell")
intRunError = objShell.Run("%COMSPEC% /c Echo Y| cacls "_
     & userFolderPath & " /e /g "_
     & userName & ":C", 2, True)
If intRunError <> 0 Then
  Wscript.Echo "Error assigning permissions for user " _
    & userName & " to folder " & userFolderPath
Else
  Wscript.Echo "Permissions for user " _
    & userName & " to folder " & userFolderPath & "assigned."
End If


WScript.Quit
wiki/user/stod_-_dalsi_poznamky.txt · Poslední úprava: 2008/12/09 17:06 autor: stod