[CS4:JS] How to run ".sh" file through Javascript
Dear All,
How to run the ".sh" file through Adobe InDesign Javascript, I used the below coding:
//================== Code =============================//
var myFile = File("xxx/xxx/xxx/Test.sh");
var Exec = "sh" + " "+ "\""+myFile+"\"";
File(Exec).execute();
//================== End =========================//
the above coding is not working, I checked before without "sh" also, It is not working.
Please anyone can give me the solutions & suggestion, and I will appreciate.
Thanks & Regards
T.R.Harihara SudhaN.,
Dear Hawkinson,
Many thanks for this quick reply, I'm really very happy, but unfortunately the script is return the "Permission denied" value.
I used the below code, Please kindly change if anything is wrong.
//====================== Script Source =====================//
var myFile ="/Applications/MacXinPro/IDMLExportparse.sh";
shell(myFile);
function shell(cmd) {
var
rv,
call ='do shell script "'+ cmd.replace(/\\/g,"\\\\").replace(/"/g,'\\"')+'"';
try {
rv = app.doScript(call,ScriptLanguage.APPLESCRIPT_LANGUAGE);
} catch(e0) {
rv = e0+"\n"+(rv?"":rv);
return rv;
//====================== End : Script Source =====================//
//=========== Output ================//
Execution finished. Result: Error: sh: /Applications/MacXinPro/IDMLExportparse.sh: Permission denied
undefined.
Please kindly help me...
Thanks & Regards
T.R.Harihara SudhaN
Similar Messages
-
How to run Exe file through Sql server agent job
Hello All
i have 2 servers
1.Application Server
2.Database server
Application server has a .exe file so i wanted to run this exe file through SQL server agent job from database server.
What is the process for run this Exe file
Can you plz suggest me step by step process
KamalWhile i'm trying to implement this below method
Step1 : Right Click SQL Server Agent. Select New -> Job. This will open a wizard to schedule a new
job.
Step2 : Select Steps from options given on the left side of wizard. This is the main place to set your
exe\program as a running step. Give some name to this step, Select Operating System (cmdexec) for the Type and give the full path of exe in Text box for Command.
ex:\\10.11.00.98(your application serverIP)\ch.exe
Thanks vanchan-Please
mark this reply as the answer or vote as helpful, as appropriate, to make it useful for other readers
I got this below error
Message
Executed as user:NJROSJ345\SYSTEM. The process could not be created for step1 of job
(Reason:Access is Denied)The step failed.
But i have sys admin rights on the both the servers
Kamal -
How to place tif file through a script in an indesign document?
how to place tif file through a script in an indesign document?
Emanuele:
it works if i just run a script....
but since i have been using a gui to do some functions, this place command is not able to place the output tif file back into the document -
How to run .sql file in tsql or powershell
Hi All,
HOw to run .sql file inside the TSQL or powershell using with IF else condition. This below query works fine but when i executing through the SQL Agent it's geeting an error.Please could help how to run through the SQL agent already using execution type
in agent as 'Operating system(CmdExec)'
Declare @computerName varchar(100), @InstanceName varchar(50)
SET @ComputerName = REPLACE(CAST(SERVERPROPERTY('ComputerNamePhysicalNetBIOS') AS varchar),'\','$')
SET @InstanceName = REPLACE(CAST(SERVERPROPERTY('instancename') AS varchar),'\','$')
IF (@InstanceName = 'SQL2008R2')
Begin
:r C:\BackupFolder\Test1.sql
:r C:\BackupFolder\Test2.sql
End
IF (@InstanceName = 'SQLINS2')
BEGIN
:r C:\BackupFolder\Test3.sql
END
IF (@InstanceName = 'SQL2012')
BEGIN
:r C:\BackupFolder\Test4.sql
END
Thansk in Advance
A-ZSQLIn T-SQL, you can try using sqlcmd to invoke sql file
if @@SERVERNAME='abcd'
begin
Master..xp_cmdshell 'sqlcmd -S <ServerName> -i BackupDetails.sql -E'
end
OR
PowerShell
Load the snapins
Add-PSSnapin SqlServerCmdletSnapin100
Add-PSSnapin SqlServerProviderSnapin100
Function Get-SqlInstances {
Param($ServerName = '.')
$localInstances = @()
[array]$captions = gwmi win32_service -computerName $ServerName | ?{$_.Name -match "mssql*" -and $_.PathName -match "sqlservr.exe"} | %{$_.Caption}
foreach ($caption in $captions) {
if ($caption -like "MSSQLSERVER") {
$localInstances += $ServerName
} else {
$temp = $caption | %{$_.split(" ")[-1]} | %{$_.trimStart("(")} | %{$_.trimEnd(")")}
$localInstances += "$ServerName\$temp"
$localInstances
$instance=Get-SqlInstances -ServerName HQDBSP17
foreach($i in $instance)
if($i -like 'CRM2011')
write-host 'CRM Database'
invoke-sqlcmd -inputfile 'F:\PowerSQL\test.sql' -ServerInstance 'abcd'
if( $i -like 'SQL2012')
write-host 'SQL 2012 instance'
invoke-sqlcmd -inputfile 'F:\PowerSQL\test.sql' -ServerInstance 'abcd'
--Prashanth -
How to run ear file in java application server
i want how to run .ear file in java application server
1. i m created ear file
2. i m created jar file (bean,home,remote)
3.i m created war file(in the form of jsp)
but till now i couldnt run ear file
how to run
please hel meYou must create :
1.Jar file
2.War file
And then put them into an ear file
Exemple : myapp.ear contains
myappEJB.jar
myappWEB.war
META-INF/application.xml
and application.xml looks like this :
<application xmlns="http://java.sun.com/xml/ns/j2ee" version="1.4"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com /xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/application_1_4.xsd">
<display-name>myapp</display-name>
<description>Demo application</description>
<module>
<ejb>myappEJB.jar</ejb>
</module>
<module>
<web>
<web-uri>myappWAR.war</web-uri>
<context-root>/myapp</context-root>
</web>
</module>
</application>Good luck -
How to run .exe files with Virtual PC for Mac
Hey Guys, I'm new around here and with mac technology as well. Anyway, I have an iMac OS X 10.5.1 Leopard and I've recently purchased the Virtual PC for Mac 7.0.2 software. So I'd like to know how to use this program properly, because I need to run some executable files in my computer. It is confusing for me because I don't know how to get started, and I only get to the part when it says "OS not found, Install an OS on this hard drive".
Honestly I've no idea of what an OS is or where do I get that. So I'd really appreciate if one of you guys could tell me, step by step, what to do to use Virtual PC properly, and finally learn how to run .exe files on mac.
Thanks in advance!
Have a nice day!Always nice to see new faces
Honestly I've no idea of what an OS is or where do I get that.
This brings up the second part of your problem. The first part is setting up either a proper Virtual Machine program like Parallels or VMfusion, or setting up a Boot Camp partition on your drive.
http://www.parallels.com/
http://www.vmware.com/products/fusion/
OS stands for Operating System. You are running Leopard 10.5.7 as an operating system on your Mac (MacOS X).
The second part of your problem - You will need a copy of Windows XP or Vista if you want to run Windows on your Mac.
There is at least one other solution for running Windows programs on a Mac. It's called "CrossOver" by a company named 'Codeweavers'. It's based on a project for "Wine" to be able to run PC programs on a Mac or Linux, without having to buy or install Windows. It works with a narrow subset of Windows programs so you would want to make sure the program you want to run is compatible with CrossOver before you buy it.
http://www.codeweavers.com/products/cxmac/
In addition to all the above information, you need to upgrade your Mac to the latest 10.5.7 from 10.5.1. "Software Update" is located under the black Apple icon in the Menu Bar at the top left corner of your monitor. After you are updated you will want to update your Profile here so that it shows the proper OS version.
With your level of experience with MacOS X and the Windows OS's you should probably get some help from a local Apple store. They have an appointment system and do offer many types of help and training, and they can offer assistance with choosing the proper programs for you to purchase for your machine.
You are also welcome to continue to ask questions here, of course. You will want to ask your questions with different issues that come up in different threads so that the answers stay focused on the title of the thread.
Message was edited by: dechamp to try to be more accurate with a fairly complicated issue... -
How to run .exe files in mac pro?
how to run .exe files in mac pro?
i am looking for this to play games in my mac pro.
if someone got a answer, just let me know
cheers.mailking wrote:
And I fail to see why you are attacking me...
My comment is Valid... " .exe files will not run natively on Mac OS X..."
I am sorry. I had the false impression that it was commonly known that .exe files did not run on Mac OSX natively and failed to see any constructive critique you were bringing. Maybe I am wrong. Again deepest apologies.
Unfortunately... these days... not every one is aware of this .exe fact..
Apology accepted.. and Thank You.. -
How to send image file through mail without any attachment
Plz tell me how to send image file through mail without any attachment ( i mean not converting that image into pdf or any format ) i want to send that text or image through mail .
Hi Sandeep,
I think you can setup the type of email in Shared office Settings in transaction S016.
There is an option called <Preset document classes>
You choose this pushbutton to branch to the maintenance screen for the document classes that are directly displayed to users in the Business Workplace for selection when they use the Create function. The name under which the documents are displayed can also be maintained.
http://help.sap.com/saphelp_nw70/helpdata/en/6c/69c30f418d11d1896e0000e8322d00/content.htm
Haven't tried it though.
Regards,
Siddhesh -
hi
how to import *.dmp file Through Oracle SQL Developer (3.2.20.09) ?
how to do it ?
thanksYou do not.
.dmp files are created from our Export and Data Pump database utilities and are proprietary files. You use the corresponding Import (or Data Pump) utility to import the data. -
How to run script file ( unix script file like ksh or sh file) using Java
How to run script file ( unix script file like ksh or sh file) using Java Program?.
I am using the following code snippet to run the simple commands like top or ls ,etc....
Runtime runtime = Runtime.getRuntime();
Process proc = runtime.exec("top");
Thanks In Adavance
-SivaString [] { "ksh" , "-c" , "script", "arg 1", "arg 2", "arg 3"}
-
How to run media file after Runtime.exc the real player?
Hi
How to run media file after Runtime.exc the real player applicationString command = "cmd /c start videotest.rm";
Runtime.getRuntime().exec(command); -
How to run batch file from oracle forms 9i
Hi everyone.
i have a data in csv file. i want to upload it to my database. i am using sql loader for it.
i have made a batch file which run the sql loader and transfer my data to database.
How to run batch file from oracle forms 9i.
when i press the button, nothing uploads in my database. (when i simply run the batch file it works).
here is my code
Begin
HOST('C:\temp\batchfile.bat');
message('done');
end;
Thanks in advance
regards
sajidthis is my log file, when i run manually.
SQL*Loader: Release 10.2.0.1.0 - Production on Thu Jul 1 23:27:53 2010
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Control File: file_to_upload.ctl
There are 2 data files:
Data File: sk.csv
Bad File: sk.bad
Discard File: none specified
(Allow all discards)
Data File: sk1.csv
Bad File: sk1.bad
Discard File: none specified
(Allow all discards)
Number to load: ALL
Number to skip: 0
Errors allowed: 50
Bind array: 64 rows, maximum of 256000 bytes
Continuation: none specified
Path used: Conventional
Table KHAN, loaded from every logical record.
Insert option in effect for this table: APPEND
Column Name Position Len Term Encl Datatype
SR FIRST * , O(") CHARACTER
DATES NEXT * , O(") CHARACTER
AGENT NEXT * , O(") CHARACTER
COUNTRY NEXT * , O(") CHARACTER
TRANSACTIONS NEXT * , O(") CHARACTER
PKR NEXT * , O(") CHARACTER
USD NEXT * , O(") CHARACTER
BANK NEXT * , O(") CHARACTER
Table KHAN:
11088 Rows successfully loaded.
0 Rows not loaded due to data errors.
0 Rows not loaded because all WHEN clauses were failed.
0 Rows not loaded because all fields were null.
Space allocated for bind array: 132096 bytes(64 rows)
Read buffer bytes: 1048576
Total logical records skipped: 0
Total logical records read: 11088
Total logical records rejected: 0
Total logical records discarded: 0
Run began on Thu Jul 01 23:27:53 2010
Run ended on Thu Jul 01 23:27:54 2010
Elapsed time was: 00:00:00.63
CPU time was: 00:00:00.17 -
How to run .java file in windows ?
How to run .java file in windows without installing any program? Thx!
First, U must make sure that there is JDK on your computer
Then, set the envionment variables which the os can find your compiler and interpreter: javac java
after those, you must complie your .java file to .class file, then you can excute it by java, for example " java helloworld" -
we using Oracle 10g on AIX 6 server. In our server, have 3 different Database namely Test, training and production. I want to run a patch file extension PDB. But how can I run PDB file in Test database.
Hello people,
is anybody here who can give an example without
refering to instruction how to run jar file?java -jar yourJarFile.jar
in case if you want to be refered to instructions later during the day, [url http://java.sun.com/docs/books/tutorial/jar/basics/index.html] here it is -
How to run SQL files from Java?
Hi,
Can someone point me towards a link on how to run sql files in Java? Thanks.
P.S...if I've been completely blind please go easy on me!Sorry forgot the formating code thingy
public static boolean executeScript(File script, Connection conn){
boolean success = true;
success = script.exists();
if(success){
DEBUG.print("ES::READING SCRIPT:" + script.getAbsolutePath());
StringBuffer buffer = new StringBuffer();
success=readScript(script,buffer);
if(success){
try{
String creationScript = buffer.toString();
Statement st = conn.createStatement();
int start = 0;
int end = 0;
while (end != -1 && start < creationScript.length()) {
end = creationScript.indexOf("GO", start);
if (end != -1) {
DEBUG.print(creationScript.substring(start, end));
st.executeUpdate(creationScript.substring(start, end));
start = end + 2; //2 is the length of "GO"
st.close();
}catch(Exception e){
success=false;
DEBUG.printStackTrace(e);
}else{
DEBUG.print("ES::SCRIPT FILE DOES NOT EXISTS");
success=false;
return success;
public static boolean readScript(File script, StringBuffer buffer){
boolean success = true;
DEBUG.print("RS:: reading file :" + script.getAbsolutePath());
try{
InputStreamReader isr = new InputStreamReader(new FileInputStream(script),"UTF16");
int ch;
while ( (ch = isr.read()) > -1) {
buffer.append( (char) ch);
if (isr != null)
isr.close();
}catch(Exception e){
success=false;
DEBUG.printStackTrace(e);
return success;
}
Maybe you are looking for
-
I currently am using PPT to expose data from a Microsoft Analysis Server cube. The cube is wide open and requires no permissions to access. The behavior of my filters is odd as sometimes they work perfectly fine, and other times I receive the followi
-
How to connect oracle8.0.3
how to connect the oracle database by using oracle thin driver
-
Syntax_error dump in program FP_TEST_00
Hi I am getting a runtime error in a standard program FP_Test_00. Can anyone please explain me how could i rectify the error since the program is standard sap. Thanks in advance. Please refee to the dump screenshot for the same.
-
Windows Media Player Uninstall
So I installed Windows Media Player on my new Macbook and decided to delete it an instead get flip4mac to play my .wmv. After instaling flip4mac I tried to draging my old Windows Media Player to the trash and everytime I try to delete it brings up an
-
Problems syncing after 3.0 update
After upgrading to 3.0 i'm having trouble syncing my phone. I press the sync button and the phone says sync in progress, itunes says backing up iphone. The problem is that the progress bar in itunes isn't moving.... Can anyone help?