SyMenu Forum

SyMenu

 

HomeSyMenu Suite

The SyMenu collection of portable programs

The SPS scripting engine: Script after install Messages in this topic - RSS

Gianluca
Gianluca
Administrator
Posts: 1002


19/05/2016
Gianluca
Gianluca
Administrator
Posts: 1002
Hello guys.

And finally the script after install is quite ready.

The syntax is changed a bit since my last post. I think this syntax is easier to understand and use but, since I'm still in development, everything can be changed. So I'm awaiting for your suggestions.


This is the syntax:

The event occurs just after the program installation. Every command is launched from the app root folder so every path is a relative one.
The use of absolute paths causes the script fail.

Syntax:

# - Comment
# [whatever]
Ex.
# This is a remark

MakeDir - Creates a new folder
MakeDir < NewFolderPath >
Ex.
MakeDir NewFolder
MakeDir "New Folder"
MakeDir "New Folder\New Sub Folder"

RenDir - Rename a folder or move it or both
RenDir < OldFolderPath > < NewFolderPath >
Ex.
RenDir Folder FolderRenamed
RenDir Folder "Folder Renamed"
RenDir Folder\SubFolder SubFolder (it moves the SubFolder to the root)
RenDir Folder\SubFolder MainFolder (it moves the SubFolder to the root and changes its name)

RemoveDir - Delete a folder and all its elements
RemoveDir < FolderToDeletePath >
Ex.
RemoveDir "Temp Folder"
RemoveDir "Folder\SubFolder"

RenFile - Rename a file or move it or both
RenFile < OldFilePath > < NewFilePath >
Ex.
RenFile file1.exe file2.exe
RenFile Folder\file1.exe file1.exe (it moves the file1.exe to the root)
RenFile Folder\file1.exe file2.exe (it moves the file1.exe to the root and changes its name)

CopyFile - Copy a file
CopyFile < SourceFilePath > < NewFilePath >
Ex.
CopyFile file1.exe file2.exe
CopyFile Folder\file1.exe file1.exe (copy the file1.exe file to the root)

DelFile - Delete a file
DelFile < FileToDeletePath >
Ex.
DelFile file1.exe
DelFile Folder\file1.exe

CreateFile - Create an empty text file. By default the econding is ANSI but it can be changed
CreateFile < FileToCreatePath > [/ANSI | /UTF8]
Ex.
CreateFile file1.ini
CreateFile file1.ini /UTF8

CreateFileStart / CreateFileEnd - Create a text file with a content. By default the econding is ANSI but it can be changed
CreateFileStart < FileToCreatePath >[/ANSI | /UTF8]...content...CreateFileEnd
Ex.
CreateFileStart file1.ini
paramA = 2
# the remarks are ignored even inside the content
path = ./ folder
...
CreateFileEnd
link



UGMFree.NET ©2002-2020
By Gianluca Negrelli - Contact me