Executable Java under Windows

Hi there!
I would like to know if there's a possibility to create a Windows-exe of a java-program, because I need to make a program runnable on Windows machines without installation of the JavaVM (as my customers generally neither have Java preinstalled nor admin-rights on their machines).
Is there a program that can create an exe including, next the the class-files of the program itself, the VM and the API in order to run the program without any previous installation?
Another possibility I was thinking of is to take an extracted JRE and start the jar containing the program by calling the JRE from a bat-file. Is this likely to work? Or does the JRE require a correct installation on a Windows system?
Thank you very much in advance!
Znerole

>
Look on the thread about 20 topics down its called
'javaexe'Mmm, thanks, I've already seen that. That's not what I'm looking for. I want my java-program to run on a windows-machine WITHOUT a preinstalled JRE. I need this because common-use office pcs usually don't have a JavaVM installed and most users don't have rights on these computers to install one.
One solution would be if I had a JRE-version that could be started right away on any windows-computer (from a cd, for example) without preceding installation. Of couse any other solution (is there any?) is welcome too. :-)

Similar Messages

  • Cannot install Java under Windows 8.1

    After the install process starts ("3 Billion Devices Run Java"), I get a message from Java Setup:
    After a few "OK" clicks the install exits.  I have turned off the incoming rules for Java in the IE firewall, but the same thing happens with Firefox anyway.
    Any help?
    Thanks,
    Marty
    MW

    Hi
    just another tips, before you thinking to reinstall OS, you can do inplace upgrade using Windows CD
    http://support.microsoft.com/kb/2255099/en-us
    British Dhez

  • Installing Java under redhat 9

    Hi all!
    I am using java under windows for my computer science course. To make it work under the command line I had to add the directory to the path. I now use linux and would like to run java from the commmand line without having to change through all the directories. How do I get linux to do this? All help appreciated,
    thanks!

    In the same way - you add Java installation directory to your PATH. Instructions on how to do it (geared towards Windows users):
    http://www.geocities.com/tipsforlinux/articles/11.html

  • Performance issue Java Swing under Windows 7

    Hello,
    we have MDI Java Swing application running under Window7. We got a big problem with performance in MDI Windows using AERO.
    Exist any way for Java to tell Win7 that it should not use Aero??
    Thank you,
    David.
    Edited by: 969767 on 6.11.2012 3:33

    If you try to open properties dialog for application (or app shortcut) there you can see "Compatibility" tab and there is check box "Disable visual themes". If we disable this theme our java swing app is very better performance under Windows 7. We need to disable visual theme via java code, if it is possible...
    Thanks.

  • Executable Code Speed Vs. Developmen​t Environmen​t Code Speed under windows 7

    Hi,
    I implemented a "closed loop" type controller in Labview 2012 running on windows 7 to control a motor speed. In my code, I have a main loop that first measures data using a PCI daq card, and then processes the data, and then output data to another PCI daq card. The main loop is set to run at 100Hz. So, 100 times a second I read data, then process the data, then output new data. I am using the Input daq card timing to sync the main loop to 100Hz. When I run this code in the Labview development environment, it seems to run just fine and is able to keep up with the 100hz loop time with no apparent lag. but when I create an executable and run it (on the same machine), it initially appears to run at 100Hz but soon after that it starts to slow down to about 10hz or less. This is causing issues with my motor control. I set the priority of the application under windows task manager to real time (which is the highest option available) to force Windows to let it run as fast as possible but it didn't seem to help much. I compared using a while loop and a timed while loop and found that the while loop ran faster when creating the executable. Any thoughts on what to do to make the executable run faster and why does this happen?
    Thanks

    Can you post the code?
    A wild guess is that there's some array growing wildly causing memory issues, and if you let the program run for a while longer it'll crash with out of memory error.
    Is the program only supposed to feed data from one card to the other?
    /Y
    LabVIEW 8.2 - 2014
    "Only dead fish swim downstream" - "My life for Kudos!" - "Dumb people repeat old mistakes - smart ones create new ones."
    G# - Free award winning reference based OOP for LV

  • Developing Java under Linux and Windows

    Dear all
    I want to know the percentage of developing Java under Linux platform and under Windows platform. is it 50 % for each or most of developers develop under one platform?
    Best Regards

    I want to know the percentage of developing Java
    under Linux platform and under Windows platform. is
    it 50 % for each or most of developers develop under
    one platform?I did a full survey of this just last week. I contacted 10,000 Java
    developers so to an accuracy of better than 1% I find that
    78% develop on Windows
    11% develop on Mac
    12% develop on Linux
    12% develop on AIX
    6% develop on 'other' platforms.------+
    119%
    You may quote me on this.Uhuh ;-)
    kind regards,
    Jo

  • Form become white after running java app. under windows XP

    Hi,
    i developed an application (Form base application) that connect to FTP server and connect to a server via telnet.
    The application is running fine until i'm trying to run it under Windows XP.
    when i'm running the applicaion under windows XP and sending data, the form become WHITE (looks like stuck program).
    the app. is still running but the user think the app. is stuck.
    i try to INVALIDATE the form every time the loop is sending the data and many more ideas but it is still become white.
    the app. is working greate under windows 2000, 98, ME.
    does anyone know this problem and how to fix it?
    Thanks Guy.

    i "just" develope an application that connected to an exsiting servers and upload data to them.
    the problem is that when i run this app. under windows XP, the screen ( the application created in "Form Base") become white, like the program is stuck.
    there is no error, it's seems to be an invalidate problem, but i try to out invalidate everywhere but it is still doen't fix this problem.
    the app. doesnot stuck, it is just looks like that!!!!!
    the weird thing is when i run this app. under all other windows, it's working fine.
    if anything is not clear, write back.
    thanks.

  • Mini SAP 7.01 under Windows Vista

    Hi every one,
    I wanna share my experience with you for installing version 7.01 under Vista. This might help you.
    I have installed the newest version ([Message from Klaus Keller| of Mini SAP under Windows Vista and, believe it or not, it all went correct. It is important that you download version Netweaver 7.01, since previous versions are not supported in Vista.
    In the download section (http://www.sdn.sap.com/downloads/netweaver/abap/disclaimer.html) you find in file part 1 the description of process in a HTML & PDF file. You must pay much attention to what is described there; otherwise, it might happen that the installation process is not sucessful.
    I´m not gonna describe the whole installation process. This is already in the download files. Just a reference of what I did:
    1 ) make a backup of your information and have your Windows Vista disk at hand. It might happen that you have to format the computer´s hard disk if something goes wrong (this happened to me a couple of times in previous versions of Mini SAP and Windows XP). This is so, because it is impossible to erase some files and information in the registry (even with the Registry Clean Tool that is also downloadable in SDN). A new installation try was hopeless in those versions.
    2) shut the firewall and antivirus off before you start.
    3) don´t try to name your computer using special characters like - _ / & % and so on; additionally, name should be max. 13 characters long.
    4) you need a user account for windows, even if you´re the only one to use the computer and you must assign a password to that user. You need it once you start the server through the SAP management console.
    5) Install the Microsoft loopback adapter
    once installed, system names it LAN-connection2 and you must asign a permanent IP address. Press button characteristics for its element Internet protocol version 4, where you enter:
    IP-Address 10.10.0.10
    Subnetwork mask 255.255.255.0
    Don´t touch element Internet protocol version 6 !!
    6) file hosts under c:windowssystem32driversetc --> add an entry for the host like this:
    #Inicio de insercion
    10.10.0.10               jalonso           "<-- this is my computer´s name and host name
    You must have administrator rights and change the status write-protected for being able to modify it.
    7) Process takes less than 1 hour, mostly without user interference.
    8) if desired, install Adobe LifeCycle Designer before starting with SAP GUI. It happened to me once (Windows XP) that the installed SAP GUI was erased during installation of LifeCycle. It all then turned into a big mess and I had better to format the hard disk.
    9) install SAP GUI on your computer, which is part of the downloaded files.
    If installation was sucessful, it might happen that you experience a problem when starting the application server (start --> SAP Netwaever 7.01 --> NSP --> Start application server). You get a red screen with a couple of error messages ([read my post|;). It is not a very serious problem, ´cause you can start the server with the SAP management console anyway.
    Hope this helps you when installing Mini SAP 7.01 in your computer.

    I am having a heck of a time with this install.  My OS is Windows Vista Ultimate.
    I've read and re-read several forums and tried all the recommendations.
    I've tried installing many time now and each time the install runs to 19% and I get a message " stopping Xserver".
    Then it runs to 20% and I get a message "preparing packages for installation".
    Then it runs for about 3 seconds and I receive the following:
    Errors occurred during the installation.
    Errors occurred during the installation.
    An error occurred and product installation failed. Look at the log file C:\sapdb\NSP\log.txt for details.
    An error occurred and product uninstallation failed. Look at the log file C:\sapdb\NSP\log.txt for details.
    Below is the text from the log file:
    (Nov 4, 2008 10:49:37 PM), Install, com.sap.installshield.maxdb.maxdb_call_sdbinst, err, An error occurred and product installation failed.  Look at the log file C:\sapdb\NSP\log.txt for details.
    (Nov 4, 2008 10:49:37 PM), Install, com.sap.installshield.maxdb.maxdb_call_sdbinst, err, ProductException: (error code = 601; message="An Error happened during call of MaxDB Tool sdbinst. Check end of Logfile C:/Users/Ellen/AppData/Local/Temp/MaxDBSAPNWPREV.log")
    STACK_TRACE: 22
    ProductException: (error code = 601; message="An Error happened during call of MaxDB Tool sdbinst. Check end of Logfile C:/Users/Ellen/AppData/Local/Temp/MaxDBSAPNWPREV.log")
         at com.sap.installshield.maxdb.maxdb_call_sdbinst.install(maxdb_call_sdbinst.java:193)
         at com.installshield.product.service.product.PureJavaProductServiceImpl.installProductAction(Unknown Source)
         at com.installshield.product.service.product.PureJavaProductServiceImpl$InstallProduct.getResultForProductAction(Unknown Source)
         at com.installshield.product.service.product.InstallableObjectVisitor.visitComponent(Unknown Source)
         at com.installshield.product.service.product.InstallableObjectVisitor.visitInstallableComponents(Unknown Source)
         at com.installshield.product.service.product.InstallableObjectVisitor.visitProductBeans(Unknown Source)
         at com.installshield.product.service.product.PureJavaProductServiceImpl$InstallProduct.install(Unknown Source)
         at com.installshield.product.service.product.PureJavaProductServiceImpl.installProduct(Unknown Source)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
         at java.lang.reflect.Method.invoke(Unknown Source)
         at com.installshield.wizard.service.LocalImplementorProxy.invoke(Unknown Source)
         at com.installshield.wizard.service.AbstractService.invokeImpl(Unknown Source)
         at com.installshield.product.service.product.GenericProductService.installProduct(Unknown Source)
         at com.installshield.product.service.product.PureJavaProductServiceImpl.installAssembly(Unknown Source)
         at com.installshield.product.service.product.PureJavaProductServiceImpl.access$900(Unknown Source)
         at com.installshield.product.service.product.PureJavaProductServiceImpl$Installer.execute(Unknown Source)
         at com.installshield.wizard.service.AsynchronousOperation.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)
    (Nov 4, 2008 10:49:38 PM), Install, com.installshield.product.service.product.PureJavaProductServiceImpl$InstallProduct, err, An error occurred and product uninstallation failed.  Look at the log file C:\sapdb\NSP\log.txt for details.
    (Nov 4, 2008 10:49:38 PM), Install, com.sap.installshield.maxdb.maxdb_call_sdbinst, err, java.lang.StringIndexOutOfBoundsException: String index out of range: -60
    STACK_TRACE: 24
    java.lang.StringIndexOutOfBoundsException: String index out of range: -60
         at java.lang.String.substring(Unknown Source)
         at com.sap.installshield.maxdb.DBEnumProcessHandler.enumerateForUninstall(DBEnumProcessHandler.java:179)
         at com.sap.installshield.maxdb.maxdb_call_sdbinst.uninstall(maxdb_call_sdbinst.java:362)
         at com.installshield.product.service.product.PureJavaProductServiceImpl.uninstallProductAction(Unknown Source)
         at com.installshield.product.service.product.PureJavaProductServiceImpl$InstallProduct.processActionsFailed(Unknown Source)
         at com.installshield.product.service.product.InstallableObjectVisitor.visitComponent(Unknown Source)
         at com.installshield.product.service.product.InstallableObjectVisitor.visitInstallableComponents(Unknown Source)
         at com.installshield.product.service.product.InstallableObjectVisitor.visitProductBeans(Unknown Source)
         at com.installshield.product.service.product.PureJavaProductServiceImpl$InstallProduct.install(Unknown Source)
         at com.installshield.product.service.product.PureJavaProductServiceImpl.installProduct(Unknown Source)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
         at java.lang.reflect.Method.invoke(Unknown Source)
         at com.installshield.wizard.service.LocalImplementorProxy.invoke(Unknown Source)
         at com.installshield.wizard.service.AbstractService.invokeImpl(Unknown Source)
         at com.installshield.product.service.product.GenericProductService.installProduct(Unknown Source)
         at com.installshield.product.service.product.PureJavaProductServiceImpl.installAssembly(Unknown Source)
         at com.installshield.product.service.product.PureJavaProductServiceImpl.access$900(Unknown Source)
         at com.installshield.product.service.product.PureJavaProductServiceImpl$Installer.execute(Unknown Source)
         at com.installshield.wizard.service.AsynchronousOperation.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)
    I hope that I'm ovelooking something simple and that someone can point me in the right direction to get this up and running.
    Any help would be greatly appreciated!!!!
    Barbara

  • How to execute Java program in Solaris 8 (Intel Platform).

    Hello All,
    I have installed Solaris 8 on my Intel based PC. JDk 1.1 and JDK 1.2 is installed by default. When I compile any Java applet or Application, it successfull complies but when I try run that applet or application (java Appletname or applicationname), It gives the error message .... File not found...Check whether file exist in the directory or not.
    Can someone tell me the reason of this error and how to correct it. Where to set the CLASSPATh etc. under Solaris 8 for successful compilation and run of programs. I do not have any problem under Windows/2000.
    Thanks in advance,
    Amoid

    [amoyeed],
    Hello All,
    I have installed Solaris 8 on my Intel based PC. JDk
    1.1 and JDK 1.2 is installed by default. When I
    compile any Java applet or Application, it successfull
    compliesI will assume that you executed this command:
    #javac <java source code filename>.java
    In order to find out which version of the javac you are using to compile the program, execute the following:
    #/usr/bin/which javac
    The output will tell the exact path to the javac binary file.
    but when I try run that applet or application
    (java Appletname or applicationname), It gives the
    error message .... File not found...Check whether file
    exist in the directory or not.You probably have not set the current directory to your environment variable PATH for the Unix shell that you are using.
    You can do the following:
    #java ./<standalone application or applet name>
    Can someone tell me the reason of this error and how
    to correct it. Where to set the CLASSPATh etc. under
    Solaris 8 for successful compilation and run of
    programs.In the shell environment settings file. Which Unix shell are you using? Bourne, Korn or C?
    I do not have any problem under Windows/2000.
    Thanks in advance,
    AmoidHTH.
    Allen Lai
    Developer Technical Support
    SUN Microsystems
    http://www.sun.com/developers/support/

  • JDK Installation troubleshooting under Windows

    When JDK 1.6 are installed under Windows,
    It do not write the Path of Its compiler files
    in Windows register.
    And programmes like javac.exe cannot be
    invoke in CMD window.
    But some programme of JDK are copyed
    in system32 Windows directory?!!!!
    Interesting solution to invoke
    java.exe and other :-)

    When JDK 1.6 are installed under Windows,
    It do not write the Path of Its compiler files
    in Windows register.
    And programmes like javac.exe cannot be
    invoke in CMD window.Correct, that is by design. You must add the JDK executables to the path if you want to use the shortened command "javac".
    Instruction here:
    http://java.sun.com/docs/books/tutorial/essential/environment/paths.html
    But some programme of JDK are copyed
    in system32 Windows directory?!!!!
    Interesting solution to invoke
    java.exe and other :-)

  • Can not create a file under \window\system32 folder

    How do I create a folder in \windows\system32 in x64 machine through java code?
    Creating a file/folder under \windows\system32 fails and java creates a folder in \windows\syswow64 folder.
    pls see the code attached for example.
    My client wants to create a folder using my application.
    I dont want to use any native code suggested by microsoft. You can see in the following link
    http://msdn2.microsoft.com/en-us/library/aa365743(VS.85).aspx
    import java.io.*;
    public class FileTest{
         FileTest(){
              boolean created = writeFile();
              if (created)
                   System.out.println("File Created Successfully");
              else
                   System.out.println("Could not able to create the file");
         public static void main (String args[]){
              FileTest ft = new FileTest();
         public boolean writeFile(){
              try{
              Writer output = null;
              String text = "Sample Test File";
              if(!(new File("c:\\windows\\system32\\customFIle").exists())){
                   new File("c:\\windows\\system32\\customFIle").mkdirs();
              File file = new File("c:\\windows\\system32\\customFIle\\write.txt");
              output = new BufferedWriter(new FileWriter(file));
              output.write(text);
              output.close();
              return true;
              }catch(IOException ioex){
                   System.out.println(ioex);
              return false;
    Thanks in advance

    java_mani wrote:
    How do I create a folder in \windows\system32 in x64 machine through java code?Can the user that executes this Java code create "manually" a folder in that directory?
    Creating a file/folder under \windows\system32 fails and java creates a folder in \windows\syswow64 folder.
    pls see the code attached for example.
    My client wants to create a folder using my application.
    I dont want to use any native code suggested by microsoft. You can see in the following link
    http://msdn2.microsoft.com/en-us/library/aa365743(VS.85).aspx
    Why not?

  • Running DS-5 armcc compiled code (PIC) under Windows EC 2013

    Hi All,
    i just wanted to know if it is generally (officially) supported to run code that is compiled via the armcc (5.03) from DS-5 under Windows Embedded Compact 2013. Or if this is discouraged (reasons?).
    The problem i have:
    The bootloader contains some code that must be run during Windows EC Startup. So this code is loaded from the Flash, copied to RAM (reserved and commited via VirtualAlloc and marked as executable) and then the functions are called via FunctionPointers.
    The code is compiled and linked as position independent and the stack base register is set accordingly before any function is called via pointer and reset when it returns.
    This works in about 9 out of 10 tests without problems. But sometimes i get all sort of exceptions (Data Abort, Prefetch Abort, Unknown Instruction, ...). Most (if not all) of the time they occur when the position independent code runs on one of the two
    cores.
    The code runs on an i.MX6DQ (dual).
    If i only enable one core, i can't reproduce the problem (i assume that multicore-handling and multithreading in WinEC 2013 Update 10 is really well tested and works without problems, so this can't be the real reason).
    I've thoroughly checked and debugged the code, i'm really sure there is no illegal access or other problem with the code itself.
    Could it be a problem to call code compiled via DS-5 armcc? I've compared assembler code that Visual Studio/Platform Builder generates with code that DS-5 generates (but i'm no assembler expert). I can't see any obvious special code that is added by Visual
    Studio/Platform Builder (i.e. that functions need) that is not there in the DS-5 code.
    Best Regards
    Sebastian

    So I think you could be able to image some code for ROM from another compiler and without knowledge of Windows CE. However, if the code will be called from Windows CE, this becomes more difficult requiring very careful isolation from the
    MMU state, processor state, kernel/user mode, etc. Code that works great when called from the bootloader might not work at all from Windows CE itself. The main problem with mixing code from different compilers is the object file format and conventions for
    entry and public names. Very unlikely that you'd be able to "link" code from any other compiler with PB-compiled code.
    You might think about the x86 image which can easily call BIOS from the bootloader but which can't even begin to call BIOS from CE itself. The problem isn't the compiler (which is different), but the operating environment differences and assumptions.
    Paul T.

  • JavaSoundRenderer now running under Windows

    Hello,
    I found out that the JavaSoundRenderer could run under Windows but only if you use Java 6.0 Beta.
    So if you've problems of playing audio in Windows then just install the new Java (6.0) and it will work.
    best regards,
    thomas

    Hi,
    Refer [SAP Note:1337708 - Crystal Reports support of 64 bit Operating Systems|http://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/oss_notes_boj/sdn_oss_boj_dev/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/scn_bosap/notes%7B6163636573733d36393736354636443646363436353344333933393338323636393736354637333631373036453646373436353733354636453735364436323635373233443330333033303331333333333337333733303338%7D.do] and also have a look at
    [SAP Note:122050-An error has occurred while attempting to load crystal reports on 64bit|http://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/oss_notes_boj/sdn_oss_boj_erq/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/scn_bosap/notes%7B6163636573733d36393736354636443646363436353344333933393338323636393736354637333631373036453646373436353733354636453735364436323635373233443330333033303331333233323330333533303331%7D.do] might be helpful

  • Using scripting with networking equipment under Windows

    It can be a challenge to use scripting to automate working with Cisco devices. The Cisco IOS does not seem to directly provide a command line interface. You are forced to find a way to automate interaction with a telnet or ssh session.
    The PERL language provides a number of object-oriented methods to help manage an interactive session, most notably Net::SSH::Expect and Net::Appliance::Session. These options can work well in a Unix environment, but not under MS Windows.
    There are PERL for Windows options, the best probably being Strawberry PERL. There is also a Unix under Windows option known as CYGWIN that is freely available. Unfortunately none of these will work well with the way Windows manages low-level terminal I/O. The curious can google "windows pseudo terminal" to see all the technical details.
    One way that does work under Windows is Tcl.  It was initially named Tool Command Language. It is sometimes shown as Tcl/Tk.
    Interestingly enough, Tcl is included within Cisco IOS as tclsh. There is no interaction with the tclsh and this example. It is just a bit of a curious coincidence.
    A Tcl port to Windows can be downloaded from http://www.activestate.com/activetcl/downloads. Select Download ActiveTCL for Windows. A direct link to the download that worked at the time of writing is Download ActiveTcl 8.5.14 for Windows (x86)
    Once base Tcl has been downloaded and installed there is one other component that will need to be installed from the Tcl Extension Archive, the expect package.
    The teacup program that is installed with the base Tcl package makes this easy. The teacup program will work with a proxy.
    You can set these Windows environment variables to specify proxy details:
    set http_proxy=
    set http_proxy_user=
    set http_proxy_pass=
    Then run teacup install expect
    The plink tool from the PuTTY download is also needed. It can be obtained from http://www.putty.org/.
    The sample that follows assumes that the data files, script and plink.exe executable all reside in the same directory.
    A sample Tcl script follows that reads a file of devices and a file of commands. It will run the list of commands against each device in the device file. It has some basic error checking, but should best be considered a ‘beta’ version. You could do more complex interactions in the Tcl script by adding exp_send and expect command statements. In short, if you can type it you could script it!
    Change directory to where your script, plink.exe  and data is stored and run with  tclsh <script_name>
    devices.list
    # Comment lines are allowed if they start with a hash mark
    # <IP_Addr> <userid> <password> <ssh|telnet> <timeout_in_secs>
    nnn.nnn.nnn.nnn    <userid>    <password>  ssh         <timeout_in_secs>
    nnn.nnn.nnn.nnn    <userid>    <password>  telnet      30
    commands.list
    # term length 0 needed or else IOS will wait for an enter to be pressed at the  --More-- prompts
    term length 0
    show run
    exit
    Script:
    # Run batch commands against one or more devices
    package require Expect
    exp_log_user 0
    set exp_internal 0
    set exp::nt_debug 0
    set prompt "(#\s*$|>\s*$)"
    set env(TERM) dumb
    set file_channel  [open "devices.list" r]
    set DEVICES      [read $file_channel]
    close $file_channel
    set file_channel  [open "commands.list" r]
    set COMMANDS      [read $file_channel]
    close $file_channel
    set command_entries [split $COMMANDS "\n"]
    set device_entries  [split $DEVICES "\n"]
    proc timedout {{msg {none}}} {
          send_user "Timed out (reason: $msg)\n"
          if {[info exists ::expect_out]} { parray ::expect_out }
          exit 1
    foreach device_entry $device_entries {
          if {[string length $device_entry] == 0 || [regexp {[ \t]*#} $device_entry]} { continue }
          set device  [lindex $device_entry 0]
          set user    [lindex $device_entry 1]
          set pass    [lindex $device_entry 2]
          set mode    [lindex $device_entry 3]
          set wait    [lindex $device_entry 4]
          set serial  [lindex $device_entry 5]
          # puts "Device=$device"
          # puts "User=$user"
          # puts "Mode=$mode"
          # puts "Wait=$wait"
          set timeout $wait
          # Spawning the Session
          # If you are logging on to the remote machine using "ssh", "slogin" or "rlogin", the information
          # gets processed in a slightly different manner. With any of these methods, it is necessary to
          # include an additional -l option to specify a username.
          # Next, the $spawn_id variable is captured, storing information about this spawn session in
          # memory for future reference.
          # If you are logging in via Telnet, the final code block in this section is required to pass the
          # username to Telnet. If the login is completed before the script times out, the exp_send command
          # passes the username.
          switch -exact $mode {
                "telnet" { set pid [spawn plink -telnet -l $user $device] }
                "ssh"   { set pid [spawn plink -ssh -l $user -pw $pass $device] }
                "serial" { set pid [spawn plink -serial $serial -l $user -pw $pass $device] }
          set id $spawn_id
          if {$mode == "telnet"} {
                expect -i $id timeout {
                timedout "in user login"
                } eof {
                timedout "spawn failed with eof on login"
                } -re "(login|Username):.*" {
                exp_send -i $id -- "$user\r"
          # Handling Errors
          # The error-handling section of the script is a while loop that anticipates a number of problems
          # that could occur during login. This section is not exhaustive. For example, you could also add
          # provisions for invalid usernames and passwords.
          # If the login is not completed during the allotted time frame, which is set from the devices.list file
          # and specified with expect -i $id timeout, the program displays an appropriate error message.
          # The remainder of this loop makes use of the exp_send command to allow for other scenarios, such
          # as the user typing "yes" when prompted to proceed with the connection, entering a password, or
          # resetting the terminal mode.
          set logged_in 0
          while {!$logged_in} {
                expect -i $id timeout {
                timedout "in while loop"
                break
                } eof {
                timedout "spawn failed with eof"
                break
                } "Store key in cache? (y/n)" {
                exp_send -i $id -- "y\r"
                } -re "\[Pp\]assword:.*" {
                exp_send -i $id -- "$pass\r"
                } "TERM = (*) " {
                exp_send -i $id -- "$env(TERM)\r"
                } -re $prompt {
                set logged_in 1
          foreach command $command_entries {
                if {[string length $command] == 0 || [regexp {[ \t]*#} $command]} { continue }
                # Sending the Request
                # If the login is successful, the code in the if statement below is used to send the "cmd" request
                # to display files and directories. After the request is sent with exp_send, the resulting output
                # is captured in the dir variable, which is set on the fourth line of the code shown below.
                if {$logged_in} {
                      exp_send -i $id -- "$command\r"
                      expect -i $id timeout {timedout "on prompt"} -re $prompt
                      puts "$expect_out(buffer)"
                # Closing the Spawned Session
                # The exp_close command ends the session spawned earlier. Just to be sure that session
                # does indeed close, the exp_wait command causes the script to continue running until a result is
                # obtained from the system processes. If the system hangs, it is likely because exp_close was not
                # able to close the spawned process, and you may need to kill it manually.
          catch { exp_close -i $id }
          exp_wait -i $id
          set logged_in 0
    *** End of Document ***

    Your friend will have to save the templates as CS6, which he can do.

  • Adobe Photoshop CS3 Extended freezes on startup under Windows 7 Ultimate 64-bit - No splash screen

    I installed my licensed copy of Adobe Photoshop CS3 Extended today as part of my install a bunch of software after a reinstall of Windows (due to viruses).  I did a completely fresh install of Windows 7 Ultimate 64-bit.  I've used Photoshop CS3 Extended for quite a while now so I know what to expect on startup but it was previously installed under Windows XP Professional (32-bit). Figured I would give Windows 7 a chance this time around.
    Google searches aren't turning up anything.  When I attempt to start the application, I get a window with the title "Adobe Photoshop CS3" (no "Extended" - I seem to recall the title changes later) and the toolbar appears.  However, no splash screen appears and no Product Activation wizard appears - the application simply freezes on an empty frame and a toolbar.  I've tried running Photoshop as Administrator (right-click, "Run As Administrator"), but nothing changed there.  I tried uninstalling and reinstalling.  I tried upgrading to CS3 10.0.1.  Nothing works.  The application simply freezes before it gets anywhere.
    I tried calling Adobe Support since this technically falls under installation issues but their phone support systems are down today.  Go figure.
    Edit:  I hooked into Photoshop with the Visual Studio debugger and every single thread is executing some variation of WaitForSingleObject() or WaitForMultipleObjects().  The main thread is "executing" somewhere in AdobeLM_libFNP.dll (at address 09619d81 - if I had debugging symbols for CS3, I could provide a function).  There are nine threads "running" at the point the freeze occurs - but all of them are technically suspended due to the functions they are executing - and one thread is in a suspended state.

    Log Name:      Application
    Source:        Application Hang
    Date:          7/17/2010 6:16:25 PM
    Event ID:      1002
    Task Category: (101)
    Level:         Error
    Keywords:      Classic
    User:          N/A
    Description:
    The program Photoshop.exe version 10.0.1.0 stopped interacting with Windows and was closed. To see if more information about the problem is available, check the problem history in the Action Center control panel.
    Process ID: d0c
    Start Time: 01cb2616be79e36f
    Termination Time: 2
    Application Path: C:\Program Files (x86)\Adobe\Adobe Photoshop CS3\Photoshop.exe
    Report Id: 06f5fbff-920a-11df-9d69-001fd023417e
    Event Xml:
    <Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
      <System>
        <Provider Name="Application Hang" />
        <EventID Qualifiers="0">1002</EventID>
        <Level>2</Level>
        <Task>101</Task>
        <Keywords>0x80000000000000</Keywords>
        <TimeCreated SystemTime="2010-07-18T01:16:25.000000000Z" />
        <EventRecordID>1615</EventRecordID>
        <Channel>Application</Channel>
        <Security />
      </System>
      <EventData>
        <Data>Photoshop.exe</Data>
        <Data>10.0.1.0</Data>
        <Data>d0c</Data>
        <Data>01cb2616be79e36f</Data>
        <Data>2</Data>
        <Data>C:\Program Files (x86)\Adobe\Adobe Photoshop CS3\Photoshop.exe</Data>
        <Data>06f5fbff-920a-11df-9d69-001fd023417e</Data>
        <Binary>430072006F00730073002D0074006800720065006100640000000000</Binary>
      </EventData>
    </Event>
    And, according to the Event Viewer, the "Binary" data translates to a zero-terminated Unicode string of "Cross-thread".
    My Visual Studio analysis was far more informative.  All threads are hung inside of WaitForSingleObject() and WaitForMultipleObjects() calls and the DLL in question appears to be FlexNet-related.  I did forget to mention that I also even manually started the FlexNet service in case, for some strange reason, Photoshop was waiting for it to start.  That also did not work.
    (And there is nothing in the Action Center control panel either despite the message saying there might be more information there.)
    Edit:  The timestamp above might be a little odd-looking.  I didn't originally see anything in Event Viewer until I clicked the first button to send an Error Report.  Mostly I just skipped that part of killing a process.

Maybe you are looking for