ZYklon Posted May 10, 2013 Posted May 10, 2013 Hi, Im trying to make a batch file, that installs a bunch of applications silently, and works awesome on Windows XP, but WIndows 7 with UAC Enabled is problem, I tryed a lot of tricks to bypass it, and failed !However Im trying to Disable Windows UAC with this line of batch code !reg add HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System /v DisableUAC /t REG_DWORD /d 0 /fAnd works perfectly, since to take effect machine must reboot, and it's not good choice since bypassing UAC would make all work easier, and I add another reg key to RunOnce, when machine starts up, launch that .bat file which installs silently applications !set BATDIR=%~dp0reg add HKCU\Software\Microsoft\Windows\CurrentVersion\RunOnce /f /v One_Click_Installer /t REG_SZ /d "%BATDIR%win7.bat"shutdown -r -f -t 5 -c "Machine will reboot within 5 sec's !"And it reboots, on startup launches win7.bat, which is batch file containing code to start installing applications, but I don't know whats the difference launchin this bat file on startup, it doesnt work, it's like just showing for example 'application x installed finished' but actually it's going fast to all applications but it doesnt work, when I double click to the same batch file, works perfeclty !If you want I can post that .bat file code, win7.bat .So I just want to know, whats the difference, when same batch file launched directly works, when it starts up with RunOnce registry fails ?If anyone has any trick that can run batch file, that executes exe's silently bypassing UAC, would be good to tell me !Thanks !
Yzöwl Posted May 10, 2013 Posted May 10, 2013 [if you want I can post that .bat file code, win7.batI would suggest that you'd have been better advised to post the 'bat' file which isn't working instead of the code which is!
ZYklon Posted May 11, 2013 Author Posted May 11, 2013 Yzöwl, thanks for your respond, I will post all code, and the structure of files and folders !http://snag.gy/QTBDF.jpgCode of Launch.bat, which is in root folder, it detects what OS is machine runing, and If it is Windows XP calls winxp.bat in tools folder, If it is Windows 7, calls sched.bat !@echo offcolor 0fECHO Hey %username%,please wait,detecting OS !ECHO+ver | find "2003" > nulif %ERRORLEVEL% == 0 goto ver_2003ver | find "XP" > nulif %ERRORLEVEL% == 0 goto ver_xpver | find "2000" > nulif %ERRORLEVEL% == 0 goto ver_2000ver | find "NT" > nulif %ERRORLEVEL% == 0 goto ver_ntif not exist %SystemRoot%\system32\systeminfo.exe goto warnthenexit > nulsysteminfo | find "OS Name" > %TEMP%\osname.txtFOR /F "usebackq delims=: tokens=2" %%i IN (%TEMP%\osname.txt) DO set vers=%%iecho %vers% | find "Windows 7" > nulif %ERRORLEVEL% == 0 goto ver_7echo %vers% | find "Windows Server 2008" > nulif %ERRORLEVEL% == 0 goto ver_2008echo %vers% | find "Windows Vista" > nulif %ERRORLEVEL% == 0 goto ver_vistagoto warnthenexit:ver_7:Run specific commandsclsecho Windows 7 Detected !call tools/sched.batgoto exit:ver_2008:Run Windows Server 2008 specific commands here.echo Windows Server 2008goto exit:ver_vista:Run Windows Vista specific commands here.echo Windows Vistagoto exit:ver_2003:Run Windows Server 2003 specific commands here.echo Windows Server 2003goto exit:ver_xpecho Windows XPCD toolscall winxp.batgoto exit:ver_2000:Run Windows 2000 specific commands here.echo Windows 2000goto exit:ver_nt:Run Windows NT specific commands here.echo Windows NTgoto exit:warnthenexitecho Machine undetermined.pause:exitsched.bat code works good, adds registry keys, successfuly, and reboots machine !@echo offreg add HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System /v EnableLUA /t REG_DWORD /d 0 /fset BATDIR=%~dp0reg add HKCU\Software\Microsoft\Windows\CurrentVersion\RunOnce /f /v One_Click_Installer /t REG_SZ /d "%BATDIR%win7.bat"pauseshutdown -r -f -t 5 -c "Machine will reboot within 5 sec's !"win7.bat works only If I click directly, starts to install applications silently, when starts from RunOnce registry, immediatly shows message 'All Applications installed !' , actually just skips all other commands, and pauses in the end !This is really weird, If you can help me what is wrong ?@ECHO offCD..CD "apps/winrar/"ECHO Installing WinRARwinrar.exe /sclsECHO Installation completed !CD..CD teamviewerclsECHO Installing TeamViewerteamviewer.exe /SclsECHO Installation CompletedCD..CD chromeclsECHO Installing Chromechrome.exe /silent /installclsECHO Installation completed !ECHO.clsECHO All Applications installed !pause > NULI will upload all this root folder, containing, apps folder and .batch files, it's 40MB as Chrome size is ~ 30MB, If anyone want to test it out easier !Download linkhttps://mega.co.nz/#!RRwz3RQB!j2NOFRjiV-N7s6r6CqWdXGA8ovUJ2_xW0y9OSN6J2oo
DosProbie Posted May 11, 2013 Posted May 11, 2013 (edited) Don't see where your have a path set for your first run for your apps, also instead of putting in your switch flags in code, works better if you just create a winrar sfx file for each app with switch , If you want to install your apps after uac is disabled and system is rebooted on runonce first run try something like this.. DP @echo off:: STEP 1 - Before reboot::Setup First Run for your apps:: FIRST-RUN (Setup SFX App Installs-Put all your sfx .exe files in the Run distribution folder)set source="C:\Windows\System32\run\First-Run.cmd" reg add "hklm\software\microsoft\windows\currentversion\run" /v "First-Logon" /t REG_SZ /d "%source%" /f >nul::Disable UAC (Requires a reboot)reg add "hklm\software\microsoft\windows\currentversion\policies\system" /v enableLUA /t REG_DWORD /d 0 /f>nulreg add "hklm\software\microsoft\windows\currentversion\policies\system" /v PromptOnSecureDesktop /t REG_DWORD /d 1 /f>nulreg add "hklm\software\microsoft\windows\currentversion\policies\system" /v ConsentPromptBehaviorAdmin /t REG_DWORD /d 2 /f>nulreg add "hklm\software\microsoft\windows\currentversion\policies\system" /v ConsentPromptBehaviorUser /t REG_DWORD /d 1 /f>nul::Restart for changes..shutdown.exe -r -t 00 -f::STEP 2 - After reboot - will run all your apps from desktop then cleanup everything..:: FirstRun.cmd file from Run directory in System32@echo offcd %~dp0cls&color e&echo ==Installing "WINDOWS 7 APPS"...Please Wait!ping.exe 127.0.0.1 -n 4 >nul::Variables..set rd=rd /s/qset del=del /q/f::INSTALL YOUR SFX .EXE FILES::Sfx App Installer (Installs in alphabetical order)..for /f "delims=" %%a in ('dir/b "%source%\*.exe"') do (echo == Installing Apps == "%%a":: Delay..ping -n 2 localhost 1>nulstart "" /wait "%source%\%%a")clspopD::CLEANUP INSTALL CRAP::Remove from MSConfig Run..reg delete "hklm\software\microsoft\windows\currentversion\run" /v "First-Logon" /f>nul::Temp..attrib -r -a -s -h "%localappdata%\tmp" /d /s && attrib -r -a -s -h "%localappdata%\tmp\*.*" /s /d rd /s /q "%tmp%" >nulif not exist %tmp% md %tmp% >nul::Desktop Shortcuts..attrib -r -a -s -h "%userprofile%\desktop\desktop.ini">nul /d /s && attrib -r -a -s -h "%systemdrive%\users\public\desktop\desktop.ini">nul /d /sfor %%a in (ini lnk) do %del% %userprofile%\desktop\*.%%a>nul && for %%a in (ini lnk) do %del% %systemdrive%\users\public\desktop\*.%%a>nul::Run Directory Multi file and folder cleanup..for %%a in (cmd reg vbs xml) do %del% %~dp0\*.%%a>nul&%rd% dat scripts>nul 2>&1clsEcho.&Echo. == ALL Installation's Done! ==ping.exe 127.0.0.1 -n 4 >nulexit Edited May 11, 2013 by DosProbie
ZYklon Posted May 11, 2013 Author Posted May 11, 2013 Don't see where your have a path set for your first run for your apps, also instead of putting in your switch flags in code, works better if you just create a winrar sfx file for each app with switch , If you want to install your apps after uac is disabled and system is rebooted on runonce first run try something like this.. DP @echo off:: STEP 1 - Before reboot::Setup First Run for your apps:: FIRST-RUN (Setup SFX App Installs-Put all your sfx .exe files in the Run distribution folder)set source="C:\Windows\System32\run\First-Run.cmd" reg add "hklm\software\microsoft\windows\currentversion\run" /v "First-Logon" /t REG_SZ /d "%source%" /f >nul::Disable UAC (Requires a reboot)reg add "hklm\software\microsoft\windows\currentversion\policies\system" /v enableLUA /t REG_DWORD /d 0 /f>nulreg add "hklm\software\microsoft\windows\currentversion\policies\system" /v PromptOnSecureDesktop /t REG_DWORD /d 1 /f>nulreg add "hklm\software\microsoft\windows\currentversion\policies\system" /v ConsentPromptBehaviorAdmin /t REG_DWORD /d 2 /f>nulreg add "hklm\software\microsoft\windows\currentversion\policies\system" /v ConsentPromptBehaviorUser /t REG_DWORD /d 1 /f>nul::Restart for changes..shutdown.exe -r -t 00 -f::STEP 2 - After reboot - will run all your apps from desktop then cleanup everything..:: FirstRun.cmd file from Run directory in System32@echo offcd %~dp0cls&color e&echo ==Installing "WINDOWS 7 APPS"...Please Wait!ping.exe 127.0.0.1 -n 4 >nul::Variables..set rd=rd /s/qset del=del /q/f::INSTALL YOUR SFX .EXE FILES::Sfx App Installer (Installs in alphabetical order)..for /f "delims=" %%a in ('dir/b "%source%\*.exe"') do (echo == Installing Apps == "%%a":: Delay..ping -n 2 localhost 1>nulstart "" /wait "%source%\%%a")clspopD::CLEANUP INSTALL CRAP::Remove from MSConfig Run..reg delete "hklm\software\microsoft\windows\currentversion\run" /v "First-Logon" /f>nul::Temp..attrib -r -a -s -h "%localappdata%\tmp" /d /s && attrib -r -a -s -h "%localappdata%\tmp\*.*" /s /d rd /s /q "%tmp%" >nulif not exist %tmp% md %tmp% >nul::Desktop Shortcuts..attrib -r -a -s -h "%userprofile%\desktop\desktop.ini">nul /d /s && attrib -r -a -s -h "%systemdrive%\users\public\desktop\desktop.ini">nul /d /sfor %%a in (ini lnk) do %del% %userprofile%\desktop\*.%%a>nul && for %%a in (ini lnk) do %del% %systemdrive%\users\public\desktop\*.%%a>nul::Run Directory Multi file and folder cleanup..for %%a in (cmd reg vbs xml) do %del% %~dp0\*.%%a>nul&%rd% dat scripts>nul 2>&1clsEcho.&Echo. == ALL Installation's Done! ==ping.exe 127.0.0.1 -n 4 >nulexitFirst of all thanks for your answer !Don't see where your have a path set for your first run for your appsFirst run Launch.bat detects OS, If XP just calls winxp.bat and installation begins, and finish successfuly, If Os is Windows 7, Launch.bat calls sched.bat, which adds registry and adds path of win7.bat, which needed on next startup to launch and install applications as UAC is disabled !I dont know path you asking exaclty, however your solution does not solve my problem, as all exe's I have to install silently, let it be known that I have 14 exe's files to install, I just ripped out the code so you can review it easier, and all these exe's are not packed with SFX, but are original exe's If you noticed there are different switches for every each exe to install silently, some are /S another /s, and others /silent etc !So what is really different of launching of .bat file from RunOnce registry, this is really confusing me ?Any solution for this problem thanks !
jaclaz Posted May 11, 2013 Posted May 11, 2013 Try running this modified win7.bat, both form command line and from runonce....@ECHO offDIR ../apps/winrar/ECHO Does this throw an error?PAUSEDIRECHO In which PATH (directory) am I?PAUSECD..CD "apps/winrar/"ECHO Installing WinRARwinrar.exe /sclsECHO Installation completed !ECHO All Applications installed !pause > NULjaclaz
ZYklon Posted May 11, 2013 Author Posted May 11, 2013 Try running this modified win7.bat, both form command line and from runonce....@ECHO offDIR ../apps/winrar/ECHO Does this throw an error?PAUSEDIRECHO In which PATH (directory) am I?PAUSECD..CD "apps/winrar/"ECHO Installing WinRARwinrar.exe /sclsECHO Installation completed !ECHO All Applications installed !pause > NULjaclazThanks for your respond, but runing directly it works installs WinRAR, but from RunOnce fails.I have recorded whole process, so you can watch it !http://vimeo.com/65975371Any idea how to fix this ?
Geej Posted May 12, 2013 Posted May 12, 2013 You could add this code in Launch.bat to detect win7 as you did for earlier OS version.(and remove those few lines using systeminfo command.ver | find "6.1" > nulif %ERRORLEVEL% == 0 goto ver_7For win7.bat, I made these small changes@ECHO offCD %~dp0 <-----new codeCD..CD "apps/winrar/"ECHO Installing WinRARstart "winrar" /wait winrar.exe /s <-----modify codeclsECHO WinRAR Installation completed !Note: I tested under VM win7x86 with winrar.exe only. (I have admin-right with UAC enabled)I still get UAC warning prior to install winrar.exe If I allow to install, Winrar installed successfully.Cheers
jaclaz Posted May 12, 2013 Posted May 12, 2013 Thanks for your respond, but runing directly it works installs WinRAR, but from RunOnce fails.I have recorded whole process, so you can watch it !http://vimeo.com/65975371Any idea how to fix this ?I thought my idea was clear enough and anyway Geej explicited it.Did you notice how the output of the added DIR command was NOT the same in the two runs? In the original batch you are using relative paths" that may be NOT the same when you run the app manually and when you run it from runonce.The:CD %~dp0 should make a whole lot of difference (at least the program will run always from the directory where win7.bat resides.jaclaz
DosProbie Posted May 12, 2013 Posted May 12, 2013 (edited) If you install apps with install.bat in current directory you can do a runonce including your switches like so..[@echo offcd %~dp0::POST INSTALLS-(root of cd/usb/hard drive)::for %%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:\apps\install.bat set cd=%%i:set key=hklm\software\microsoft\windows\currentversion\runonceexreg add %key%\02 /v 1 /d "%cd%\apps\7zx64.msi /qn" /freg add %key%\04 /v 1 /d "%cd%\apps\winrar.exe /s" /f<remainer of apps with silent switches> Edited May 12, 2013 by DosProbie
ZYklon Posted May 12, 2013 Author Posted May 12, 2013 (edited) Thank you all for your answers, after a lot of testings going on, I have solve part of my problem, I will describe below !Now even my code in the begining of this thread works now, the problem was win7.bat, as DosProbie asked me about me that the path is not set, I didnt understand and now I set path in the begining of win7.bat like this@ECHO offCD %~dp0 CD..CD "apps/winrar/"ECHO Installing WinRARwinrar.exe /sclsECHO Installation completed !CD..CD teamviewerclsECHO Installing TeamViewerteamviewer.exe /SclsECHO Installation CompletedCD..CD chromeclsECHO Installing Chromechrome.exe /silent /installclsECHO Installation completed !ECHO.clsECHO All Applications installed !pause > NULBut now the problem appears when I launch this script from USB Flash Disk, after I paused the code, after scripts launches I saw the path was on C:\Windows then scripts fails at all finding folders path's of exe's !How this problem can be solved, now when script starts from USB Flash disk script fails !? Edited May 12, 2013 by ZYklon
jaclaz Posted May 12, 2013 Posted May 12, 2013 But now the problem appears when I launch this script from USB Flash Disk, after I paused the code, after scripts launches I saw the path was on C:\Windows then scripts fails at all finding folders path's of exe's !How this problem can be solved, now when script starts from USB Flash disk script fails !?Let's start again from scratch, OK?HOW is the directory structure you use made?Example (this is what I would personally use):ROOT--------->Mynicebats-------------------------->Launch.bat-------------------------->Winxp.bat-------------------------->Win7.bat-------------------------->Apps [DIR]------------------------------------------>Winrar [DIR]------------------------------------------------------------>winrar.exe------------------------------------------>Chrome [DIR]------------------------------------------------------------>chrome.exe... etc.Now, you can use:@ECHO offCD /D %~dp0 CD "apps\winrar\"ECHO Installing WinRARwinrar.exe /sclsECHO Installation completed !....Which will change the directory (no matter which drive it is) to the "Mynicebats" directory and then change it to Mynicebats\apps\winrar or do something easier (two possibilities):@ECHO offCD /D %~dp0apps\winrarECHO Installing WinRARwinrar.exe /sclsECHO Installation completed !....There is seemingly no need to actually change directory at all.@ECHO offECHO Installing WinRAR%~dp0apps\winrar\winrar.exe /sclsECHO Installation completed !....or:@ECHO offECHO Installing WinRARSTART /WAIT "" %~dp0apps\winrar\winrar.exe /sclsECHO Installation completed !....jaclaz
ZYklon Posted May 12, 2013 Author Posted May 12, 2013 (edited) But now the problem appears when I launch this script from USB Flash Disk, after I paused the code, after scripts launches I saw the path was on C:\Windows then scripts fails at all finding folders path's of exe's !How this problem can be solved, now when script starts from USB Flash disk script fails !?Let's start again from scratch, OK?HOW is the directory structure you use made?Example (this is what I would personally use):ROOT--------->Mynicebats-------------------------->Launch.bat-------------------------->Winxp.bat-------------------------->Win7.bat-------------------------->Apps [DIR]------------------------------------------>Winrar [DIR]------------------------------------------------------------>winrar.exe------------------------------------------>Chrome [DIR]------------------------------------------------------------>chrome.exe... etc.Now, you can use:@ECHO offCD /D %~dp0 CD "apps\winrar\"ECHO Installing WinRARwinrar.exe /sclsECHO Installation completed !....Which will change the directory (no matter which drive it is) to the "Mynicebats" directory and then change it to Mynicebats\apps\winrar or do something easier (two possibilities):@ECHO offCD /D %~dp0apps\winrarECHO Installing WinRARwinrar.exe /sclsECHO Installation completed !....There is seemingly no need to actually change directory at all.@ECHO offECHO Installing WinRAR%~dp0apps\winrar\winrar.exe /sclsECHO Installation completed !....or:@ECHO offECHO Installing WinRARSTART /WAIT "" %~dp0apps\winrar\winrar.exe /sclsECHO Installation completed !....jaclazThanks jaclaz for your answer, and this code you provided I tryed first example worked with your files & folders structure, works from USB Flash Drive and from example Desktop, but my structure is little bit different, and would be awesome If you can help me to work on this structure I will explain below -->ROOT--------------->OneClickInstaller [DIR]--------------->Launch.bat------------------------>tools [DIR]-----------------------------> sched.bat-----------------------------> winxp.bat-----------------------------> win7.bat------------------------.>apps [DIR]------------------------------> Chrome [DIR]--------------------------------------> chrome.exe------------------------------> Teamviewer [DIR]--------------------------------------> teamviwer.exe------------------------------->Winrar [DIR]-------------------------------------->winrar.exeLet me explain, why I put winxp.bat, win7.bat and sched.bat on tools folder, well I want to be automated, when Launch.bat is clicked, user doesnt need to be worried anymore, just all apps start to install silently, so I want this structure !I tryed thisCD %~dp0CD..CD /D %~dp0apps\chromeand rest of code ...Didnt worked, so just need one directory back, as win7.bat is now in tools folder !?Thanks in advance ! Edited May 12, 2013 by ZYklon
jaclaz Posted May 12, 2013 Posted May 12, 2013 Didnt worked, so just need one directory back, as win7.bat is now in tools folder !?Not really (you don't *need* one directory back, you *want* one directory back, it's not the same thing).And then you want two directories down.And you didn't take more than 1 second to try and understand the syntax of the example. The idea is:CD /D %~dp0 <- this changes current directory to the one in which Win7.bat is, no matter on which drive, in your case ROOT\OneClickInstaller\tools\CD .. <- this changes to one directory up, in your case ROOT\OneClickInstaller\CD .\apps\chrome <- this changes to two directory down, in your case ROOT\OneClickInstaller\apps\chrome\chrome.exe /silent /install <- this executes the file from the current directoryOr:CD /D %~dp0..\apps\chrome <- this changes to one directoty up to the one in which Win7.bat is, no matter on which drive , two directory down, in your case ROOT\OneClickInstaller\apps\chrome\chrome.exe /silent /install <- this executes the file from the current directoryOr:CD /D %~dp0 <- this changes current directory to the one in which Win7.bat is, no matter on which drive, in your case ROOT\OneClickInstaller\tools\CD ..\apps\chrome <- this changes to two directory down, in your case ROOT\OneClickInstaller\apps\chrome\ chrome.exe /silent /install <- this executes the file from the current directoryOr:CD /D %~dp0 <- this changes current directory to the one in which Win7.bat is, no matter on which drive, in your case ROOT\OneClickInstaller\tools\ ..\apps\chrome\chrome.exe /silent /install <- this executes the file from the directory Or:CD /D %~d0 <- this changes current directory to the ROOT of the drive in which Win7.bat is, no matter on which drive, in your case ROOT\ .\OneClickInstaller\apps\chrome\chrome.exe /silent /install <- this executes the file from the directory Or:%~d0\OneClickInstaller\apps\chrome\chrome.exe /silent /install <- this executes the file from the directory Or:%~dp0..\apps\chrome\chrome.exe /silent /install <- this executes the file from the directory It makes (to me) very little sense to have a \tools directory containing just three (lousy ) batches and a separate \apps directory, where, additionally you have a \winrar directory containing a wirar.exe file, a \chrome directory containing a chrome.exe file, etc., i.e. it seems to me like you are making it more complex than needed. jaclaz
ZYklon Posted May 13, 2013 Author Posted May 13, 2013 Thanks all of you for your answers, now it's working how I wanted, with 'my' structure of files and folders Thanks to, Yzöwl, DosProbie, Geej Special thanks goes to jaclazDidnt worked, so just need one directory back, as win7.bat is now in tools folder !?Not really (you don't *need* one directory back, you *want* one directory back, it's not the same thing).And then you want two directories down.And you didn't take more than 1 second to try and understand the syntax of the example. Actually, I tryed but not too much, as I was thinking to post here, you know !The idea is:CD /D %~dp0 <- this changes current directory to the one in which Win7.bat is, no matter on which drive, in your case ROOT\OneClickInstaller\tools\CD .. <- this changes to one directory up, in your case ROOT\OneClickInstaller\CD .\apps\chrome <- this changes to two directory down, in your case ROOT\OneClickInstaller\apps\chrome\chrome.exe /silent /install <- this executes the file from the current directoryOr:CD /D %~dp0..\apps\chrome <- this changes to one directoty up to the one in which Win7.bat is, no matter on which drive , two directory down, in your case ROOT\OneClickInstaller\apps\chrome\chrome.exe /silent /install <- this executes the file from the current directoryOr:CD /D %~dp0 <- this changes current directory to the one in which Win7.bat is, no matter on which drive, in your case ROOT\OneClickInstaller\tools\CD ..\apps\chrome <- this changes to two directory down, in your case ROOT\OneClickInstaller\apps\chrome\ chrome.exe /silent /install <- this executes the file from the current directoryOr:CD /D %~dp0 <- this changes current directory to the one in which Win7.bat is, no matter on which drive, in your case ROOT\OneClickInstaller\tools\ ..\apps\chrome\chrome.exe /silent /install <- this executes the file from the directory Or:CD /D %~d0 <- this changes current directory to the ROOT of the drive in which Win7.bat is, no matter on which drive, in your case ROOT\ .\OneClickInstaller\apps\chrome\chrome.exe /silent /install <- this executes the file from the directory Or:%~d0\OneClickInstaller\apps\chrome\chrome.exe /silent /install <- this executes the file from the directory Or:%~dp0..\apps\chrome\chrome.exe /silent /install <- this executes the file from the directory Thank you, for this detailed explanation, now I understand better syntax, I tryed all options, using 'DIR' and 'PAUSE' to see in which 'PATH' I am, so to understand better syntax !It makes (to me) very little sense to have a \tools directory containing just three (lousy ) batches and a separate \apps directory, where, additionally you have a \winrar directory containing a wirar.exe file, a \chrome directory containing a chrome.exe file, etc., i.e. it seems to me like you are making it more complex than needed. jaclazI don't know, but I posted already on my previous posts, that, I ripped out this win7.bat code, so you can view the code easier, as I have 14 exe's to install, and some of them have some additional files like .ini files, I don't want to complicate to myself all this coding stuff, neither to you, but I will update time by time these exe's and thats the reason I wanted seperated folders to each exe file !ALL this mess is just for that stupid UAC thingy in Windows 7, I know that exists some of methods to bypass it, I tryed once before, failed, even I created a topic here about bypassing UAC, but could not find solution, however after a while, I will research and maybe go to that topic and ask about it For the sake of others, and being thankful, I will post my final win7.bat code that works for me !Files and folders structureROOT--------------->OneClickInstaller [DIR]--------------->Launch.bat------------------------>tools [DIR]-----------------------------> sched.bat-----------------------------> winxp.bat-----------------------------> win7.bat------------------------.>apps [DIR]------------------------------> Chrome [DIR]--------------------------------------> chrome.exe------------------------------> Teamviewer [DIR]--------------------------------------> teamviwer.exe------------------------------->Winrar [DIR]-------------------------------------->winrar.exewin7.bat@ECHO offCD /D %~dp0 CD /D %~dp0..\apps\winrar\ECHO Installing WinRARwinrar.exe /sclsECHO Installation completed !CD..CD teamviewerclsECHO Installing TeamViewerteamviewer.exe /SclsECHO Installation CompletedCD..CD chromeclsECHO Installing Chromechrome.exe /silent /installclsECHO.ECHO Installation completed !ECHO.clsECHO All Applications installed !pause > NULZyklon
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now