Secure batch file

I want to create a
batch file in which i will be having my credentials.
I will be sharing that file with my monitoring team, Since i dnt want to diclose my credentials to them therefore they should not be able to open that batch file.
Also they should be able to run the file on cmd line and redirect the output to other file..
Can someone help me in this.
<style type="text/css"></style>
<style>.yzmpa_tooltip_box {direction:ltr;text-align:left;display:none;font:12px/20px Arial, Helvetica, sans-serif;width: 121px;box-sizing: border-box;height: 137px;;bottom: -114px;right: 20px;background: #ffffff;padding: 8px;color:#494949;font-weight:400;-moz-box-shadow:
0 0 20px 0px #AAA4A4;-webkit-box-shadow: 0 0 20px 0px #AAA4A4;box-shadow: 0 0 20px 0px #AAA4A4;z-index:2;margin-bottom:2px;-moz-border-radius: 4px;-webkit-border-radius: 4px;-khtml-border-radius: 4px;border-radius: 4px;}.yzmpa_tooltip_box:after, .illu_tooltip_box:before
{top: 9%;right:-9px;border: solid transparent;content: " "; height: 0;width: 0;;pointer-events: none;}.yzmpa_tooltip_box:after {border-color: rgba(255, 255, 255, 0);border-top-color: #ffffff;border-width: 9px;margin-left: -11px;}.yzmpa_tooltip_box:before
{border-color: rgba(0, 0, 0, 0);border-top-color: #000000; border-width: 10px; margin-left: -12px;}.yzmpa_tooltip_box label {line-height: 20px;cursor:pointer;display:inline-block;}.yzmpa_tooltip_box label input[type=radio]{float: left;cursor: pointer;margin:
4px 4px 0 2px;}.yzmpa_close_dialog_header{background: #C4C4C4;padding-left: 5px;font-weight: bold;width:100px;margin-bottom:2px;}.yzmpa_close_dialog_btn{;font-family: serif;top:-15px;font-size: 10px;cursor: pointer;float:right;font-weight:normal;height:0px;}</style>

I want to create a
batch file in which i will be having my credentials.
I will be sharing that file with my monitoring team, Since i dnt want to diclose my credentials to them therefore they should not be able to open that batch file.
Also they should be able to run the file on cmd line and redirect the output to other file..
Can someone help me in this.
<style type="text/css"></style>
<style>.yzmpa_tooltip_box {direction:ltr;text-align:left;display:none;font:12px/20px Arial, Helvetica, sans-serif;width: 121px;box-sizing: border-box;height: 137px;;bottom: -114px;right: 20px;background: #ffffff;padding: 8px;color:#494949;font-weight:400;-moz-box-shadow:
0 0 20px 0px #AAA4A4;-webkit-box-shadow: 0 0 20px 0px #AAA4A4;box-shadow: 0 0 20px 0px #AAA4A4;z-index:2;margin-bottom:2px;-moz-border-radius: 4px;-webkit-border-radius: 4px;-khtml-border-radius: 4px;border-radius: 4px;}.yzmpa_tooltip_box:after, .illu_tooltip_box:before
{top: 9%;right:-9px;border: solid transparent;content: " "; height: 0;width: 0;;pointer-events: none;}.yzmpa_tooltip_box:after {border-color: rgba(255, 255, 255, 0);border-top-color: #ffffff;border-width: 9px;margin-left: -11px;}.yzmpa_tooltip_box:before {border-color:
rgba(0, 0, 0, 0);border-top-color: #000000; border-width: 10px; margin-left: -12px;}.yzmpa_tooltip_box label {line-height: 20px;cursor:pointer;display:inline-block;}.yzmpa_tooltip_box label input[type=radio]{float: left;cursor: pointer;margin: 4px 4px 0 2px;}.yzmpa_close_dialog_header{background:
#C4C4C4;padding-left: 5px;font-weight: bold;width:100px;margin-bottom:2px;}.yzmpa_close_dialog_btn{;font-family: serif;top:-15px;font-size: 10px;cursor: pointer;float:right;font-weight:normal;height:0px;}</style>
This is very silly stuff.  Are you sure you want to post this?
Please consult with a trained person to help you with this  I think they can be very helpful.
The code sample you posted cannot be used by Windows o any other system.  Are you sure you want to post this? 
¯\_(ツ)_/¯

Similar Messages

  • Executing batch file from Java stored procedure hang

    Dears,
    I'm using the following code to execute batch file from Java Stored procedure, which is working fine from Java IDE JDeveloper 10.1.3.4.
    public static String runFile(String drive)
    String result = "";
    String content = "echo off\n" + "vol " + drive + ": | find /i \"Serial Number is\"";
    try {
    File directory = new File(drive + ":");
    File file = File.createTempFile("bb1", ".bat", directory);
    file.deleteOnExit();
    FileWriter fw = new java.io.FileWriter(file);
    fw.write(content);
    fw.close();
    // The next line is the command causing the problem
    Process p = Runtime.getRuntime().exec("cmd.exe /c " + file.getPath());
    BufferedReader input = new BufferedReader(new InputStreamReader(p.getInputStream()));
    String line;
    while ((line = input.readLine()) != null)
    result += line;
    input.close();
    file.delete();
    result = result.substring( result.lastIndexOf( ' ' )).trim();
    } catch (Exception e) {
    e.printStackTrace();
    result = e.getClass().getName() + " : " + e.getMessage();
    return result;
    The above code is used in getting the volume of a drive on windows, something like "80EC-C230"
    I gave the SYSTEM schema the required privilege to execute the code.
    EXEC DBMS_JAVA.grant_permission('SYSTEM', 'java.io.FilePermission', '&lt;&lt;ALL FILES&gt;&gt;', 'read ,write, execute, delete');
    EXEC DBMS_JAVA.grant_permission('SYSTEM', 'SYS:java.lang.RuntimePermission', 'writeFileDescriptor', '');
    EXEC DBMS_JAVA.grant_permission('SYSTEM', 'SYS:java.lang.RuntimePermission', 'readFileDescriptor', '');
    GRANT JAVAUSERPRIV TO SYSTEM;
    I have used the following to load the class in Oracle 9ir2 DB:
    loadjava -u [system/******@orcl|mailto:system/******@orcl] -v -resolve C:\Server\src\net\dev\Util.java
    CREATE FUNCTION A1(drive IN VARCHAR2) RETURN VARCHAR2 AS LANGUAGE JAVA NAME 'net.dev.Util.a1(java.lang.String) return java.lang.String';
    variable serial1 varchar2(1000);
    call A1( 'C' ) into :serial1;
    The problem that it hangs when I execute the call to the function (I have indicated the line causing the problem in a comment in the code).
    I have seen similar problems on other forums, but no solution posted
    [http://oracle.ittoolbox.com/groups/technical-functional/oracle-jdeveloper-l/run-an-exe-file-using-oracle-database-trigger-1567662]
    I have posted this in JDeveloper forum ([t-853821]) but suggested to post for forum in DB.
    Can anyne help?

    Dear Peter,
    You are totally right, I got this as mistake copy paste. I'm just having a Java utility for running external files outside Oracle DB, this is the method runFile()
    I'm passing it the content of script and names of file to be created on the fly and executed then deleted, sorry for the mistake in creating caller function.
    The main point, how I claim that the line in code where creating external process is the problem. I have tried the code with commenting this line and it was working ok, I made this to make sure of the permission required that I need to give to the schema passing security permission problems.
    The function script is running perfect if I'm executing vbs script outside Oracle using something like "cscript //NoLogo aaa1.vbs", but when I use the command line the call just never returns to me "cmd.exe /c bb1.bat".
    where content of bb1.bat as follows:
    echo off
    vol C: | find /i "Serial Number is"
    The above batch file just get the serial number of hard drive assigned when windows formatted HD.
    Same code runs outside Oracle just fine, but inside Oracle doesn't return if I exectued the following:
    variable serial1 varchar2(1000);
    call A1( 'C' ) into :serial1;
    Never returns
    Thanks for tracing teh issue to that details ;) hope you coul help.

  • How do I make a batch file if the .class file uses a foreign package?

    I am trying to make an MS-DOS batch file using the bytecode file from the Java source file, called AddFields.java. This program uses the package BreezySwing; which is not standard with the JDK. I had to download it seperately. I will come back to this batch file later.
    But first, in order to prove the concept, I created a Java file called Soap.java in JCreator. It is a very simple GUI program that uses the javax.swing package; which does come with the JDK. The JDK is currently stored in the following directory: C:\Program Files\Java\jdk1.6.0_07. I have the PATH environment variable set to the 'bin' folder of the JDK. I believe that it is important that this variable stay this way because C:\Program Files\Java\jdk1.6.0_07\bin is where the file 'java.exe' and 'javac.exe' are stored. Here is my batch file so far for Soap:
    @echo off
    cd \acorn
    set path=C:\Program Files\Java\jdk1.6.0_07\bin
    set classpath=.
    java Soap
    pause
    Before I ran this file, I compiled Soap.java in my IDE and then ran it successfully. Then I moved the .class file to the directory C:\acorn. I put NOTHING ELSE in this folder. then I told the computer where to find the file 'java.exe' which I know is needed for execution of the .class file. I put the above text in Notepad and then saved it as Soap.bat onto my desktop. When I double click on it, the command prompt comes up in a little green box for a few seconds, and then the GUI opens and says "It Works!". Now that I know the concept of batch files, I tried creating another one that used the BreezySwing package.
    After I installed my JDK, I installed BreezySwing and TerminalIO which are two foreign packages that make building code much easier. I downloaded the .zip file from Lambert and Osborne called BreezySwingAndTerminalIO.zip. I extracted the files to the 'bin' folder of my JDK. Once I did this, and set the PATH environment variable to the 'bin' folder of my JDK, all BreezySwing and TerminalIO programs that I made worked. Now I wanted to make a batch file from the program AddFields.java. It is a GUI program that imports two packages, the traditional GUI javax.swing package and the foreign package BreezySwing. The user enters two numbers in two DoubleField objects and then selects one of four buttons; one for each arithmetic operation (add, subtract, multiply, or divide). Then the program displays the solution in a third DoubleField object. This program both compiles and runs successfully in JCreator. So, next I moved the .class file from the MyProjects folder that JCreator uses to C:\acorn. I put nothing else in this folder. The file Soap.class was still in there, but I did not think it would matter. Then I created the batch file:
    @echo off
    cd \acorn
    set path=C:\Program Files\Java\jdk1.6.0_07\bin
    set classpath=.
    java AddFields
    pause
    As you can see, it is exactly the same as the one for Soap. I made this file in Notepad and called it AddFields.bat. Upon double clicking on the file, I got this error message from command prompt:
    Exception in thread "main" java.lang.NoClassDefFoundError: BreezySwing/GBFrame
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:12
    4)
    at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
    at java.net.URLClassLoader.access$000(URLClassLoader.java:56)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:276)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
    Caused by: java.lang.ClassNotFoundException: BreezySwing.GBFrame
    at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:276)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
    ... 12 more
    Press any key to continue . . .
    I know that most of this makes no sense; but that it only means that it cannot find the class BreezySwing or GBFrame (which AddFields extends). Notice, however that it does not give an error for javax.swing. If I change the "set path..." command to anything other than the 'bin' folder of my JDK, I get this error:
    'java' is not recognized as an internal or external command,
    operable program or batch file.
    Press any key to continue . . .
    I know this means that the computer cannot find the file 'java.exe' which I believe holds all of the java.x.y.z style packages (native packages); but not BreezySwing or any other foreign packages. Remember, I do not get this error for any of the native Java packages. I decided to compare the java.x.y.z packages with BreezySwing:
    I see that all of the native packages are not actually visible in the JDK's bin folder. I think that they are all stored in one of the .exe files in there because there are no .class files in the JDK's bin folder.
    However, BreezySwing is different, there is no such file called "BreezySwing.exe"; there are just about 20 .class files all with names like "GBFrame.class", and "GBActionListener.class". As a last effort, I moved all of these .class files directly into the bin folder (they were originally in a seperate folder called BreezySwingAndTerminalIO). This did nothing; even with all of the files in the same folder as java.exe.
    So my question is: What do I need to do to get the BreezySwing package recognized on my computer? Is there possibly a download for a file called "BreezySwing.exe" somewhere that would be similar to "java.exe" and contain all of the BreezySwing packages?

    There is a lot of detail in your posts. I won't properly quote everything you put (too laborious). Instead I'll just put your words inside quotes (").
    "..there are some things about the interface that I do not like."
    Like +what?+ This is not a help desk, and I would appreciate you participating in this discussion by providing details of what it is about the 'interface' of webstart that you 'do not like'. They are probably misunderstandings on your part.
    "Some of the .jar files I made were so dangerously corrupt, that I had to restart my computer before I could delete them."
    Corrupt?! I have never once had the Java tools produce a corrupt Jar. OTOH, the 'cannot delete' problem might relate to the JRE gaining a file lock on the archive at run-time. If the file lock persisted after ending the app., it suggests that the JRE was not properly shut down. This is a bug in the code and should be fixed. Deploying as .class files will only 'hide' the problem (from casual inspection - though the Task Manager should show the orphaned 'java' process).
    "I then turned to batch files for their simple structure and portability (I managed to successfully transport a java.util containing batch file from my computer to another). This was what I did:
    - I created a folder called Task
    - Then I copied three things into this folder: 1. The file "java.exe" from my JDK. 2. The program's .class file (Count.class). and 3. The original batch file.
    - Then I moved the folder from a removable disk to the second computer's C drive (C:\Task).
    - Last, I changed the code in the batch file...:"
    That is the +funniest+ thing I've heard on the forums in the last 72 hours. You say that is easy?! Some points.
    - editing batch files is not scalable to 100+ machines, let alone 10000+.
    - The fact that Java worked on the target machine was because it was +already installed.+ Dragging the 'java.exe' onto a Windows PC which has no Java will not magically make it 'Java enabled'.
    And speaking of Java on the client machine. Webstart has in-built mechanisms to ensure that the end user has the minimum required Java version to run the app. - we can also use the [deployJava.js|http://java.sun.com/javase/6/docs/technotes/guides/jweb/deployment_advice.html#deplToolkit] on the original web page, to check for minimum Java before it puts the link to download/install the app. - if the user does not have the required Java, the script should guide them through installing it.
    Those nice features in deployJava.js are available to applets and apps. launched using webstart, but they are not available for (plain) Jar's or loose class files. So if 'ensuring the user has Java' is one of the requirements for your launch, you are barking up the wrong tree by deploying loose class files.
    Note also that if you abandon webstart, but have your app. set up to work from a Jar, the installation process would be similar to above (though it would not need a .bat file, or editing it). This basic strategy is one way that I provide [Appleteer (as a downloadable ZIP archive)|http://pscode.org/appleteer/#download]. Though I side-step your part 1 by putting the stuff into a Jar with the path Appleteer/ - when the user expands the ZIP, the parts of the app. are already in the Appleteer directory.
    Appleteer is also provided as a webstart launched application (and as an applet). Either of those are 'easier' to use than the downloadable ZIP, but I thought I would provide it in case the end user wants to save it to disk and transport the app. to a machine with no internet connection, but with Java (why they would be testing applets on a PC with no internet connection, I am not sure - but the option is there).
    "I know that .jar and .exe files are out because I always get errors and I do not like their interfaces. "
    What on earth are you talking about? Once the app. is on-screen, the end user would not be able to distinguish between
    1) A Jar launched using a manifest.
    2) A Jar launched using webstart.
    3) Loose class files.
    Your fixation on .bat files sounds much like the adage that 'If the only tool you have is a hammer, every job starts to look like a nail'.
    Get over them, will you? +Using .bat files is not a practical way to provide a Java app. to the end user+ (and launching an app. from a .bat looks quite crappy and 'second hand' to +this+ user).
    Edit 1:
    The instructions for running Appleteer as a Jar are further up the page, in the [Running Appleteer: Application|http://pscode.org/appleteer/#application] section.
    Edited by: AndrewThompson64 on May 19, 2009 12:06 PM

  • Java.io.filepermission error while executing a batch file from java prog

    Hi,
    i want run a java program which executes a batch file, both are in a jar file. while am trying this using webstart it shows error:access denied java.io.filepermission <<ALL FILES>>execute. why this happens how to rectify this.
    By
    Vinod

    Clearly, it would be a security vulnerability to be able to do such a thing from the web w/o user granting trust to the application.
    Java Web Start applications run in the Java SE secure sandbox unless they have been granted all-permissions by the user:
    1.) sign all jar files.
    2.) add <security><all-permissions/></security> to the jnlp file.
    The user would then be prompted to grant trust to the applications.
    /Andy

  • I can't open batch files in windows 8.1

    I am trying to run a batch file in windows 8.1, when i run the batch file runs at first but closes so fast that you can't see its contents, you can't even see if its doing what you tell it to. Since the file does run but closes fast, i thought of adding
    pause. Adding pause did not fix the problem. I am not sure if i have to change my keys on regedit, or i have some kind of malicious software  that needs to be fixed  ( I think i have no malicious software, i  have run security scan many times
    nothing showed up, I had a Trojan horse, Trojan.Gen2, long time ago but the Trojan got quarantined?) I originally had windows 8 but upgraded to windows 8.1. 
    Help Please! I don't Know what to do!!!

    Hi Glogikon,
    "I am trying to run a batch file in windows 8.1, when i run the batch file runs at first but closes so fast that you can't see its contents, you can't even see if its doing what you tell it to."
    According to my experience ,it is a normal symptom .Did the bat file run well before ?
    Have you tried to run the command one by one in the bat file from a command line ?Have you tried to run the other bat files which including a output to have a check ?
    If it is possible ,please post the command of the bat file here .We will make a test for you .
    To check whether the bat run well ,this link may be useful:
    check if command was successfull in a batch file
    http://stackoverflow.com/questions/14691494/check-if-command-was-successfull-in-a-batch-file
    " I think i have no malicious software, i  have run security scan many times nothing showed up,"
    We can try to work with the following official free tool to have a check .It is recommended to run it in a safe mode to improve the quality of the scanning.
    Malicious Software Removal Tool
    http://www.microsoft.com/security/pc-security/malware-removal.aspx
    NOTE: This response contains a reference to a third party World Wide Web site. Microsoft is providing this information as a convenience to you. Microsoft does not control these sites and has not tested any software or information found on these sites.
    Best regards
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact [email protected]

  • Running a Batch file through SCCM

    I have an installed Endpoint security program installed on 1800 systems in our domain. I have a batch file that is succesfully when run on a system. The batch is below. I've starred the sensitive info and path, (thing to remember is this batch
    works on a target system).
    REG ADD HKLM\SOFTWARE\***\***\Input /v PSUrl /d "*********" /f
    REG ADD HKLM\SOFTWARE\***\***/v *******/d 1 /f
    SC control *****232
    SC control *****225
    msiexec /x {*********************} /qn UNINSTALL_PASSWORD=******** REBOOT=ReallySuppress
    Exit /B 0
    The first 4 lines migrate where the software points to a new server, the second phase removed the software (permitted following the move). following the msiexec /x is the msi registry key of the software to be uninstalled.
    I can see the job has been sent to the test clients and been accepted by them however thats it nothing happens after that.
    Question 1 - can anyone give me a step by step of running this batch through SCCM as I'm obviously doing something wrong.
    Question 2 - Which Client SCCM logs do I look in to see what happens after the batch hits the client.

    Hi Jason,
    Yes to all of the questions above:
    Created Package; set distribution point, linled the programs (command line "programname.bat" also tried "programname.cmd"
    Created advertisment and schedule targeting collection. Nothing appears in execmgr.log
    Something should appear in execmgr.log.  I'm assuming the client is a member of the collection, the advertisement available time has passed, and the mandatory assignment time has passed?  I'm also assuming that other advertisements are working
    on that client? 
    If so, that information should be in execmgr.log.  You should be able to search for the advertisement ID and the package ID.  Otherwise, no there are no special tricks to make a batch file run via SCCM advertisements.  You should see that
    command line launched in execmgr.log.

  • Reader X password in batch file?

    I'm using Adobe Reader X under Windows 7 Pro 64-bit. I have one PDF file that requires a password. I'm the only one who uses this computer, so there's no security issue. I'm wondering if it's possible, through a batch file or some other means, to open this file and automatically fill in the password. Thanks for anyone's help.

    Thanks! I thought it was at least worth asking.

  • Pass Passord Variable to a Batch File using Execute Process Task

    I have an FTP batch file that I want to execute using Execute Process Task. The content of the ftp (ftpscript.cmd) is as below:
    open ftpsite
    UserName
    Password
    ASCII
    get file  c:\temp\test.txt
    bye
    Using SSIS Execute process task, I was able to download data. I configured the Execute Process task as follows:
    Executable: ftp.exe
    Arguments: -s:"c:\temp\ftpscript.cmd"
    The above works fine. But the problem is that I don't want to store the password value in the batch file for security/policy reasons. Please, is there a way I can pass the password value to the ftp executable or the batch file at run time?
    I know how to get and store variables in SSIS but I don't know how to pass this kind of variable to the batch file just before execution.
    Any suggestions will be appreciated. Thanks.

    you can dynamically generate the source (CMD) for the FTP and delete after the execution. The password can be stored in a secure database for example, not 100 % secure, but the best you can do.
    Another option I did was an encrypted VBScript (also quite easy to open in plain text to some people).
    Finally it can be a binary e.g. an EXE with the FTP called as process in it.
    Arthur My Blog

  • Post-Install Batch File Won't Run

    Ok here's the deal. I have created an application that needs a little "cleanup" after the installer finishes. To handle this operation, I created a batch file and told the LV installer to run it after the installation. This works fine on every computer I have tried it on ---
    Except One
    Thinking that there might be a problem related to the commands themseloves, I added echos to a log file to save any errors that might occur and to save basic information like paths. However on that ONE computer I don't get the log file even being created, which says to me that the batch is not being executed. However, If I go to the installation direcctory and run it manually, it runs, it does what it is supposed to do and it  stops.
    The computer this happens on is a corporate laptop that is configured interms of security and permissions like every other corporate laptop. 
    I am officially confused. Any ideas? WAGs? Suggestions? Recommendations? 
    Mike...

    I remember years ago when this feature first came out I tried it with a batch file and I thought it didn't work, and that it only supported running an EXE not thing else.  Since then they apparently fixed that.  So my only suggestion is maybe to try to run an EXE instead of a batch file?  Of course it sounds like it is working on other machines so I doubt that is it.
    What about UAC?  You say it is a corporate machine so I doubt you can, but maybe lower the UAC to nothing and see if it works.  Of course if it doesn't that probably isn't a good solution.
    Anti-virus running?  Some have a log of the things it blocks, and it might list the fact that it prevented a batch file from running.
    The only time I ever used this feature on an EXE I don't remember it not running on the dozen or so PCs I used it on.

  • Batch file in javascript

    Hi all,
    I am in the process of creating a batch file in Adobe Acrobat. I have several options that it is doing, such as applying security, watermark, etc. Now I need to add a way to delete a certain bookmark. This bookmark will have the same name in all files and needs to be deleted. Is there any way to write something like this I Javascript so I can add it to my batch file setting?
    Thanks.

    Steve,
    Please see the following thread:
    http://www.adobeforums.com/webx?128@@.59b6cf27

  • Incorporating .jar files into Batch files

    Hello, I've created an application that requires .jar files to operate correctly. I was able to get them into eclipse, which made me happy. I was able to figure out how to get them into a .html file when I went to put it on the web which made me even happier. But, then I discovered that I cannot use a html file to call it because of the security access exceptions that are ensued by placing the application on the web. I've come to the conclusion that I will use a Batch file (.bat) to run the app. The way I knew how to get them into the html file was to use:
    <applet code="MYCLASS.class" archive="MYCLASS_JARFILE.jar">
    </applet>Now I need to figure out how to achieve the same effect as that into a batch file that uses:
    java MYCLASSAny help would be greatly appreciated. Thanks.

    The applet uses I/O from a MySQL server. When launching it through the website (Not where the database is hosted from) the applet causes the following exception:
    java.net.SocketException: java.security.AccessControlException: access denied (java.net.SocketPermission 127.0.0.1:3306 connect,resolve)The applet in the end will be placed on the same server as the database but I was unsure if this issue would still persist, assuming it would I converted the applet into and executable JAR file and run it through the batch file which does not cause the same error.
    I read up on the signing applets and such and saw in most forums and articles, that it was a hard way to go and was a hassle. I also found out other articles advocating the use of applet--->servlet--->database however, I know very little about servlets. Currently I only have a semester of Java and have been constantly practicing it since the end of the semester. I learned MySQL and how to use it and right now I have an applet that stores and reads data from the MySQL server I've set up on my home network and uses a java applet GUI to allow manipulation of the data.
    Edited by: sfeher1 on Jul 21, 2009 9:36 PM

  • System Administration and Batch File

    Hi all,
    I linked a batch file to be opened in my pdf file, but every time I open this through the link a message comes up saying "disallowed by your system administrator".
    Can anyone show me how to allow the batch file to be opened
    Thanks

    This is a Security feature. In order to change what can be opened as an attachment, you need to edit the registry.  The ETK Preference Reference has the information to edit the registry that you will need.
    Attachments

  • Looking for batch file to use when setting up Java on an XP machine

    Hey Everyone,
    I am trying to get my hands on a batch file that will effectively :) set up the Java Variables on an XP machine. I don't know if this is even possible but I have to assume that it is. The thing is I am studying for Java Certification at the moment, and every day I am on a different computer at my place of study. I carry a copy of the latest jsdk with me on a flash drive and it would be really handy if I had a batch file that I could run and just be done with the setup! I seem to be wasting at least half an hour a day trying to get java going!!! So any help will be much appreciated. Thanks heaps.
    Regards
    Davo

    assuming the j2sdk install file on disk is installJava.exe, the master setup file (setupJava.bat) would look like this:
    ::java home is the folder in C drive where java's files are
    :: run installation for jsdk and jre
    installJava.exe
    :: set variables
    set javahome=c:\j2sdk1.4.2_03
    path=%path%;c:\javahome\bin
    :: if you add security providers
    path=%path%;c:\javahome\jre\lib\ext
    :: may help with certificate verification
    path=%path%;c:\javahome\jre\lib\security

  • Run batch file to install application

    Is there a way to run a batch file as an Application? We have a few batch files that actually install applications. I was hoping to point to these batch files to install the application instead of having to rewrite a whole lot of scripts. Also has any one
    had any success with installing HP Security Manager and HP Drive Encryption as an application?
    Thanks.

    I'm having issues with a few of my batch files. Here is the first batch file, it just calls a registry setting for import:
    regedit.exe /s \\SERVER\software$\WinSCP\Lansweeper.reg
    The next one installs an application for faxing in our environment:
    cls
    @echo ******************************************
    @echo ***  Please do not close this window!  ***
    @echo ******************************************
    @echo Updating RightFax Client...
    @echo OFF
    REM Determine the architecture of the machine
    IF "%PROCESSOR_ARCHITECTURE%" == "x86" (    
        SET PROGFILES=%programfiles%
    ) ELSE (
        SET PROGFILES=%systemdrive%\Program Files (X86^)
        msiexec.exe /i "\\SERVER\software$\RightFax\Client\RightFax\Setup\RightFax Print Processor x64.msi" /qn
    \\SERVER\software$\RightFax\Client\Prereqs\vcredist_x86.exe /q
    msiexec.exe /i "\\SERVER\software$\RightFax\Client\RightFax Product Suite - Client.msi" /qn REBOOT=Suppress RUNBYRIGHTFAXSETUP=2 CONFIGUREFAXCTRL=1 ADDLOCAL="FaxUtil,FaxCtrl" INSTALLDIR="%PROGFILES%\RightFax" RFSERVERNAME="RIGHTFAX"
    They both work outside of MDT, even if I run them after it is imaged. Thanks!
    Problem with this I belive is authentication. You try to run files from share \\server\Software$ and I would guess that the batch files is on
    \\MDTServer\Deploymentshare$ or somwhere else. On the client. Logon as local admin and run the batch file and see what happens.

  • Batch file seetup to run in event viewer not working.

    Hi everyone,
    Long story short
    we have some new Security monitoring software that we use for our clients WHich is written in .net2 and can't pick up the IDs for failures in event viewer as they are in .net4. so what we have done is set up a series of batch files to run through task scheduler
    and send the event ID to Application in event viewer that o ur security  monitoring software can read.
    This has worked perfectly on all of our servers but for some reason on Windows 7 machines when the batch file is run nothing happens in Application under Event Viewer.
    e.g:
    Trigger                    Details                                                                                                                                     
    Status
    On an event            On event- Log:Microsoft-WindowsBackup, Source: Microsoft-WindowsBackup, Event ID100   Enabled
    Action                      Details             
    Start a program       "C:\PandMon\Microsoft Backup Failure ID100.bat"
    This is the batch file:
    eventcreate /ID 100 /L APPLICATION /T information /SO Backup /D "Microsoftsoft SBS Backup Failed - Id 100"
    Any help here would be greatly appreciated.
    Cheers :)

    Your first step must be to check if the batch file actually runs, e.g. like so:
    @echo off
    if not exist c:\Logs md c:\Logs
    echo %date% %time% >> c:\Logs\Log.txt
    eventcreate /ID 100 /L APPLICATION /T information /SO Backup /D "Microsoftsoft SBS Backup Failed - Id
    100" 1>>c:\Logs\Log.txt 2>>&1
    echo. >> c::\Logs\Log.txt
    When you examine the log file then you probably get a good idea about the cause of your problem.

Maybe you are looking for