Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Mounting CIFS share from RoyalTSX
on run argv
set shareAddress to (item 1 of argv)
set shareName to (item 2 of argv)
set userName to (item 3 of argv)
set userPass to (item 4 of argv)
tell application "Finder"
try
mount volume ("cifs://" & shareAddress & "/" & shareName) as user name userName with password userPass
open ((path to startup disk) as text) & "Volumes:" & shareName
end try
end tell
end run
0. Download mountCifs.scpt
1. Create command in Tasks subfolder
2. In Command tab specify
a. Command: osascript
b. Arguments: mountCifs.scpt $URI$ C$ "$EffectiveUsernameWithoutDomain$" "$EffectivePassword$"
c. Working Directory: path to mountCifs.scpt
3. In Credentials tab select "Use the context credentials" (for getting credentials from remote connection)
4. Mark task as favorite
5. Execute task on remote connection
6. (For Royal TSX 3.0.0.14 beta or newer) To hide terminal window pop-up disable "Run in Terminal" checkbox at General tab of task
If you don't want to everytime confirm task execution - enable "No confirmation required" in Command Task properties
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.