smeko Posted February 13, 2008 Posted February 13, 2008 Hello. Im trying do run the apps from differents map's but i only get error.I have RunOnceEx in $OEM$ directory and a mapp called apps and everything working. I have all updates and softwares in one mapp i want in differents mapps.cmdow @ /HID@Echo OffFOR %%i IN (D E F G H I J K L M N O P Q R S T U V W X Y Z) DO IF EXIST %%i:\win51ip.SP2 SET CDROM=%%i:SET PP=%cdrom%\Apps\SET KEY=HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceExREG ADD %KEY% /V TITLE /D "Installerar applikationer" /fREG ADD %KEY%\001 /VE /D "Windows Verktyget Borttagning av skadlig programvara - Jun. 2007" /fREG ADD %KEY%\001 /V 1 /D "%PP%KB890830.exe /q" /fREG ADD %KEY%\002 /VE /D "INTERNET UPPDATERING" /fREG ADD %KEY%\002 /V 1 /D "%PP%KB890830.exe /q" /fREG ADD %KEY%\003 /VE /D "CardSpace-uppdateringspaket" /fREG ADD %KEY%\003 /V 1 /D "%PP%KB925720.exe /q" /fREG ADD %KEY%\004 /VE /D "XML Core Services 6.0" /fREG ADD %KEY%\004 /V 1 /D "%PP%KB927977.exe /q" /fREG ADD %KEY%\005 /VE /D ".NET Framework 1.1" /fREG ADD %KEY%\005 /V 1 /D "%PP%dotnetfx.exe" /fREG ADD %KEY%\006 /VE /D ".NET Framework 1.1 Service Pack 1" /fREG ADD %KEY%\006 /V 1 /D "%PP%KB867460.exe /q" /fREG ADD %KEY%\007 /VE /D "S„kerhetsuppdatering f”r .NET Framework 2.0 (1)" /fREG ADD %KEY%\007 /V 1 /D "%PP%KB917283.exe /q" /fREG ADD %KEY%\008 /VE /D "S„kerhetsuppdatering f”r .NET Framework 2.0 (2)" /fREG ADD %KEY%\008 /V 1 /D "%PP%KB922770.exe /q" /fREG ADD %KEY%\009 /VE /D "S„kerhetsuppdatering f”r .NET Framework 1.1" /fREG ADD %KEY%\009 /V 1 /D "%PP%KB886903.exe /q" /fREG ADD %KEY%\010 /VE /D "Spr†kpaket f”r .NET Framework 1.1" /fREG ADD %KEY%\010 /V 1 /D "%PP%langp1.exe" /fREG ADD %KEY%\011 /VE /D "Microsoft .NET Framework 2.0 SP1" /fREG ADD %KEY%\011 /V 1 /D "%PP%2.0sp1.exe /q /norestart" /fREG ADD %KEY%\012 /VE /D ".NET Framework 3.0" /fREG ADD %KEY%\012 /V 1 /D "%PP%dotnet3.exe /q /norestart" /fREG ADD %KEY%\013 /VE /D "Microsoft .NET Framework 3.0 SP1" /fREG ADD %KEY%\013 /V 1 /D "%PP%3.0SP1.exe /q /norestart" /fREG ADD %KEY%\014 /VE /D "L„gger till \"User Accounts 2\" i kontrollpanelen" /fREG ADD %KEY%\014 /V 1 /D "%PP%userpasswords2.bat" /fEXITAnd here is my script that doesnt work. In this script i want to run it from java the exe file. im trying 3 differents methodscmdow @ /HID@Echo OffFOR %%i IN (D E F G H I J K L M N O P Q R S T U V W X Y Z) DO IF EXIST %%i:\win51ip.SP2 SET CDROM=%%i:SET PP=%cdrom%\Apps\SET KEY=HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceExREG ADD %KEY% /V TITLE /D "Installerar applikationer" /fREG ADD %KEY%\001 /VE /D "Java1" /fREG ADD %KEY%\001 /V 1 /D "%CDROM%\java\java.exe /q" /fREG ADD %KEY%\002 /VE /D "Java2" /fREG ADD %KEY%\002 /V 1 /D "%systemdrive%\java\java.exe /q" /fREG ADD %KEY%\003 /VE /D "Java3" /fREG ADD %KEY%\003 /V 1 /D "%PP%\java\java.exe /q" /fEXITi got error all the time
Arie Posted February 15, 2008 Posted February 15, 2008 You're messing things up. Remove the line "SET PP=%cdrom%\Apps\" from your scripts completely. The line "SET CDROM=%%i:" creates the variable %CDROM%, so if you have a folder named "Apps" in the root of your CD, the command to install an application would be "%CDROM%\Apps\YourApplication.exe". You could replace the whole line with the "SET CDROM" with the following by the way, which is shorter:SETLOCAL ENABLEEXTENSIONSSET CDROM=%~d0
smeko Posted February 15, 2008 Author Posted February 15, 2008 You're messing things up. Remove the line "SET PP=%cdrom%\Apps\" from your scripts completely. The line "SET CDROM=%%i:" creates the variable %CDROM%, so if you have a folder named "Apps" in the root of your CD, the command to install an application would be "%CDROM%\Apps\YourApplication.exe". You could replace the whole line with the "SET CDROM" with the following by the way, which is shorter:SETLOCAL ENABLEEXTENSIONSSET CDROM=%~d0Thanks brother for the help its working now i got my full uppdated cd with many extensions. Thanks again brother Peace
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now