Jump to content

ZYklon

Member
  • Posts

    16
  • Joined

  • Last visited

  • Donations

    0.00 USD 
  • Country

    Albania

About ZYklon

Profile Information

  • OS
    Windows 7 x86

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

ZYklon's Achievements

0

Reputation

  1. 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 jaclaz 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 ! 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 ! I 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 structure 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.exe win7.bat @ECHO off CD /D %~dp0 CD /D %~dp0..\apps\winrar\ ECHO Installing WinRAR winrar.exe /s cls ECHO Installation completed ! CD.. CD teamviewer cls ECHO Installing TeamViewer teamviewer.exe /S cls ECHO Installation Completed CD.. CD chrome cls ECHO Installing Chrome chrome.exe /silent /install cls ECHO. ECHO Installation completed ! ECHO. cls ECHO All Applications installed ! pause > NUL Zyklon
  2. 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 off CD /D %~dp0 CD "apps\winrar\" ECHO Installing WinRAR winrar.exe /s cls ECHO 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 off CD /D %~dp0apps\winrar ECHO Installing WinRAR winrar.exe /s cls ECHO Installation completed ! .... There is seemingly no need to actually change directory at all. @ECHO off ECHO Installing WinRAR %~dp0apps\winrar\winrar.exe /s cls ECHO Installation completed ! .... or: @ECHO off ECHO Installing WinRAR START /WAIT "" %~dp0apps\winrar\winrar.exe /s cls ECHO Installation completed ! .... jaclaz Thanks 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.exe Let 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 this CD %~dp0 CD.. CD /D %~dp0apps\chrome and rest of code ... Didnt worked, so just need one directory back, as win7.bat is now in tools folder !? Thanks in advance !
  3. 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 off CD %~dp0 CD.. CD "apps/winrar/" ECHO Installing WinRAR winrar.exe /s cls ECHO Installation completed ! CD.. CD teamviewer cls ECHO Installing TeamViewer teamviewer.exe /S cls ECHO Installation Completed CD.. CD chrome cls ECHO Installing Chrome chrome.exe /silent /install cls ECHO Installation completed ! ECHO. cls ECHO All Applications installed ! pause > NUL 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 !?
  4. 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/65975371 Any idea how to fix this ?
  5. First of all thanks for your answer ! First 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 !
  6. Yzöwl, thanks for your respond, I will post all code, and the structure of files and folders ! http://snag.gy/QTBDF.jpg Code 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 off color 0f ECHO Hey %username%,please wait,detecting OS ! ECHO+ ver | find "2003" > nul if %ERRORLEVEL% == 0 goto ver_2003 ver | find "XP" > nul if %ERRORLEVEL% == 0 goto ver_xp ver | find "2000" > nul if %ERRORLEVEL% == 0 goto ver_2000 ver | find "NT" > nul if %ERRORLEVEL% == 0 goto ver_nt if not exist %SystemRoot%\system32\systeminfo.exe goto warnthenexit > nul systeminfo | find "OS Name" > %TEMP%\osname.txt FOR /F "usebackq delims=: tokens=2" %%i IN (%TEMP%\osname.txt) DO set vers=%%i echo %vers% | find "Windows 7" > nul if %ERRORLEVEL% == 0 goto ver_7 echo %vers% | find "Windows Server 2008" > nul if %ERRORLEVEL% == 0 goto ver_2008 echo %vers% | find "Windows Vista" > nul if %ERRORLEVEL% == 0 goto ver_vista goto warnthenexit :ver_7 :Run specific commands cls echo Windows 7 Detected ! call tools/sched.bat goto exit :ver_2008 :Run Windows Server 2008 specific commands here. echo Windows Server 2008 goto exit :ver_vista :Run Windows Vista specific commands here. echo Windows Vista goto exit :ver_2003 :Run Windows Server 2003 specific commands here. echo Windows Server 2003 goto exit :ver_xp echo Windows XP CD tools call winxp.bat goto exit :ver_2000 :Run Windows 2000 specific commands here. echo Windows 2000 goto exit :ver_nt :Run Windows NT specific commands here. echo Windows NT goto exit :warnthenexit echo Machine undetermined. pause :exit sched.bat code works good, adds registry keys, successfuly, and reboots machine ! @echo off reg add HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System /v EnableLUA /t REG_DWORD /d 0 /f set BATDIR=%~dp0 reg add HKCU\Software\Microsoft\Windows\CurrentVersion\RunOnce /f /v One_Click_Installer /t REG_SZ /d "%BATDIR%win7.bat" pause shutdown -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 off CD.. CD "apps/winrar/" ECHO Installing WinRAR winrar.exe /s cls ECHO Installation completed ! CD.. CD teamviewer cls ECHO Installing TeamViewer teamviewer.exe /S cls ECHO Installation Completed CD.. CD chrome cls ECHO Installing Chrome chrome.exe /silent /install cls ECHO Installation completed ! ECHO. cls ECHO All Applications installed ! pause > NUL I 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 link https://mega.co.nz/#!RRwz3RQB!j2NOFRjiV-N7s6r6CqWdXGA8ovUJ2_xW0y9OSN6J2oo
  7. 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 /f And 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=%~dp0 reg 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 !
  8. Hey MSFN, Im working on a batch that installs silently programs, and its working very well on XP, but on Window 7, UAC (User Account Control) it's poping up asking 'Yes' or 'No' for every exe batch file installing ! Is there any trick that you can actually, bypass or something UAC ? I know ninite.com that download apps then installs silently and no UAC problem, I checked ninite process with Process Explorer, and Im not sure but, I guess it uses iexplorer.exe process to inject and run, and bypasses UAC ! A solution I have for this problem is to edit registry keys to Disable UAC, but to take effect after disabling UAC, I must reboot PC ! I use this code to disable and enable UAC ! Enable C:\Windows\System32\cmd.exe /k %windir%\System32\reg.exe ADD HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System /v EnableLUA /t REG_DWORD /d 1 /f Disable C:\Windows\System32\cmd.exe /k %windir%\System32\reg.exe ADD HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System /v EnableLUA /t REG_DWORD /d 0 /f Any idea ?
  9. That's correct, you asked a specific question and I provided you with an exact and correct reply to that question. You on the other hand provided a solution which didn't answer your own question, and provided with it little or no information. You were asked directly if you could share your solution, and failed to do so, since 'this thread is for making questions' were we supposed to guess that you were using WinRAR and ResHacker? What are you saying,is totally wrong, I already provided my solution, I dont know how many times do I need to explain it, I already explained it twice, If you dont get it, let me know, I'll make a video for it ! I used ResHack just to add that icon to prisonbreak.exe normally all game and other main exe's are with original icon, first time saw this one like this, and I was forced to use ResHack to edit prisonbreak.exe icon, otherwise you or others If they use this method you don't need to use ResHacker at all, everybody knows SFX Archive is created by WinRar and If I say 'SFX' it's already should be known that you will use WinRar to created it.
  10. My question from the beggining was 'How to create a shortcut using batch file and third party tools' , and this game had prisonbreak.exe and GameIcon.ico,(prisonbreak.exe wasnt the real game icon, the real one was GameIcon.ico) what I did I used ResHacker to change prisonbreak.exe icon since it wasnt games icon. After this I used WinRar to create SFX Archive and with that code, that I posted on previous post. If anyone could not understand, I will make a video tutorial, since this thread is for making questions and not for tutorials.
  11. First of all, sorry for late respond folks. Yes for sure,I'll share my solution, I created a SFX Archive and in the comment added this code ;The comment below contains SFX script commands Silent=1 Overwrite=1 Shortcut=D, "prisonbreak.exe", "", "", "Prison Break by Zyklon" and in batch file just launch this exe and voila you have your shortcut in desktop. @Yzöwl To be honest I didn't even tryed other method using xxmklink method, since I solved problem using this trick If I could say. And you told me that some self extraction can do this, but didn't specify to do with SFX archive ... However the main part is that I solve the problem, and maybe someone can use this method too. Thanks I appreciate your help guys, awesome forum !
  12. Solved this problem without using thing party tools as you said, but without using VBS scripting but using SFX Archive. Thread can be closed, thanks for your reply !
  13. Unfortunately its not working with your suggestion. Im using different tools to compress game and using batch files extracting it, and wanted to use this tool (xxmklink) to create shortcut. Any other suggestion ?
  14. Im using xxmklink.exe to create shortcut, but Im not using it properly or I dont know. Im trying to make a gamerip and after extracting is completed, I want to use xxmklink to create shortcut of the game, but its creating but not the correct path of the game .exe The code Im using to create shortcut is xxmklink %USERPROFILE%\Desktop\Prison.Break.The.Conspiracy "" "" "" "" GameIcon.ico >nul GameIcon.ico = the game icon file prisonbreak.exe = the game exe file The shortcut is created with incorrect path, this is path C:\PrisonTest\prisonbreak.exe PrisonTest\prisonbreak.exe xxmklink.exe d/l link http://www.xxcopy.com/download/xxmklink.zip xxmklink.exe official page http://www.xxcopy.com/xxcopy38.htm Help me to fix this problem, or suggest me any other tool to create shortcuts using batch ?
  15. The best straight answer I've ever got. It works like a charm! Can you explain how this works /sepeate, to make batch continue executing other lines, a lot of peeps said to me that its impossible in batch !?
×
×
  • Create New...