Jump to content


  • Posts

  • Joined

  • Last visited

  • Donations

  • Country


Everything posted by darksimoon

  1. Thank you very much Jaklaz. I adapted my batch file accordingly thanks to your kind help. And it works like charm
  2. Dear Jaclaz, Thank you again. These subjects are a little complicated for me, so sometimes I prefer to use template solutions and for such cases I ask my questions here. this time I chanced my template as follows: set YMD=%date:~-4%.%date:~3,2%.%date:~0,2% SET Now=%Time: =0% set HM=%Now:~0,2%.%now:~3,2% SET BackUpTime=%HM% SET file=%YMD%-[%BackUpTime%]-FLAMENT.rar echo %file% --> 2016.09.21-[07.53]-FLAMENT.rar I think it is OK! but what I don't understand is why did you add followings after SET Now=%Time: =0% ? I wonder this because I couldn't see any %Hours% or %Minutes% variables in the afterwards usage. This is why I excluded. SET Hours=%Now:~0,2% SET Minutes=%Now:~3,2% Best Regards
  3. Hello Friends, I have following variable inside a batch file, but somehow there is an extra space in the output as seen in the attached file. (I also added sample batch file) I checked the possible spaces inside batch file but everything seems OK. how can I prevent this space to happen ? Edited 1: I've just realized that sometimes it doesn't make any space and works well. So I don't understand when it works and if it works, how it works Edited 2: This time I've realized that it is about time format. when the hour is before 10:00, the time format doesn't show zero like 09.15. Instead it shows only 9.15 and puts a space instead of zero and this space which is put instead of zero causes the problem. So how can I solve this interesting problem ? Best Regards Note : I know that I shouldn't use dots and parenthesis for naming files when using batch file but I think this space isn't caused by dots or parenthesis. set YMD=%date:~-4%.%date:~3,2%.%date:~0,2% SET Now=%TIME% set HM=%Now:~0,2%.%now:~3,2% SET "BackUpTime=%HM%" SET file=%YMD%-(%BackUpTime%)-FLAMENT.rar echo %file% 2016.09.20-( 9.30)-FLAMENT.rar space takes place between "(" and "9" extra space.cmd
  4. Dear Jaclaz, I thank you a million times for this. You helped me again as before. thanks to information you provide me, I will be able to improve my batch file much more efficiently. thank you again. Best Regards
  5. Hello friends, I have a basic level at batch files. In one of my bacth file I use below variable for naming my backup file whose name is "2016.08.16-(08.30)-FLAMENT.rar" set HM=%time:~0,2%.%time:~3,2% echo (%HM%) --produces--> (08.30) The problem is that I want to use the same time (08.30) for the other file which related to the previous one. But since the time changes throughout the process in the same batch file, %HM% produces (08.32), not (08.30) for the time changed. how can I use same time for all processes thoughout the batch file ? I mean, I want %HM% to produce same result once the batch file runs until it finishes although the time changes. How can I do this ? Best Regards
  6. hello friends; thank you both a lot. i made the correction suggested by yzöwl first. and this time it worked. then i did what bphlpt told me to try and it all worked together very well. i am so happy. thank you very much one more time. i attached the files as sample for people who might need them. best regards... yzowl.CMD DVD-BACKUP-01.03.2013-v2.cmd
  7. hello friends; @bphlpt, actually i changed the "path of par2j.exe" but somehow i couldn't manage. in the help file it was saying that just drag the folder onto the batch file. i tried but failed. however i will try your solution and inform you. @yzöwl, yes you are right. i am new to backup procesess. i think that corruption on CD is happening partially. in such case i may detect corrupted files by checking md5 hash files and rescue corrupted files with parity files. now i see that it is better keep the md5 files at both CD and another location & parity files in another location as well. i will backup especially my photographs which are very valueable for me. in this case what would you recommend to me ? (i will already have a copy of photograps in other external HDD. writing CD is part of photography backup. this is why writing CD is very important for me.) best regards...
  8. Hello dear friends; You helped me a lot in the past about batch files and now i need your help one more time. I am creating a batch file for my photograp back ups which will make md5 hash files firstly, then create parity files and latest write to DVD. I managed to do for md5 and dvd writing but as for parity files i have difficulty. I am using multipar for this which supports commnad line. But in the batch files it only accepts the files at the root of the folder and ignore the files at the subfolders. They gave a sample batch for this but i cant add this into my batch files. please help me to add multipar batch file which accepts the files at the subfolders as well to my backup batch file. best regards... My batch files is; ======================backup====================================== :create hash file within each folder "%ProgramFiles%\FastSum\fsum.exe" c:\denemesum /R /T:F /I:DT :create hash file at the root "%ProgramFiles%\FastSum\fsum.exe" c:\denemesum /R /T:R /I:DT /O : create parity files ???????????????????? :create iso file "%ProgramFiles%\ImgBurn\Imgburn.exe" /mode build /buildmode imagefile /src "C:\denemesum\" /dest "%homepath%\Desktop\PhotoBackUp.iso" /FILESYSTEM "ISO9660 + Joliet" /VOLUMELABEL "BACKUP%DATE%" /rootfolder yes /start /close /LOG ".\PhotoBackup_[DATE]-[TIME].log" ================================================================== multipar batch file which creates individual PAR2 set in each sub-folder under a selected folder; ========================multipar================================== @ECHO OFF SETLOCAL REM check input path IF "%~1"=="" GOTO End IF NOT EXIST "%~1" ( ECHO The path does not exist. GOTO End ) IF NOT "%~z1"=="0" GOTO End REM set options for PAR2 client SET par2_path="path of par2j.exe" REM recursive search of sub folders PUSHD %1 FOR /D /R %%G IN (*.*) DO CALL :ProcEach "%%G" POPD GOTO End REM run PAR2 client :ProcEach ECHO create for %1 %par2_path% c /fo /sm2048 /rr20 /rd1 /rf3 "%~1\%~n1.par2" * GOTO :EOF :End ENDLOCAL ================================================================== backup.cmd.txt multipar.cmd.txt
  9. dear Jaclaz; thank you very much for your help dear Yzöwl; i did as you say and it worked out. thanks a lot. and dear submix8c; i use both win xp and win 7. i also use the latest version of winrar. however there is no such a thing in the help file. so i think best way is set the path=%temp%. once again, thank you very much friends.
  10. hello friends; i am preparing winrar sfx file as portable application through batch file. and i enter the options of the sfx file by comment.txt but when i enter "TempMode" into the comment.txt by batch file, somehow it doesn't extract the files into the temp file. Instead it extracts the files into the current folder. I don't understand why. below is my batch.cmd and comment.txt content; how can i make the sfx file to extract the content into the temp folder ? =========batch file========= echo TempMode >> .\comment.txt ============================ =====comment.txt=========== ;Created By Alberto setup=FSCapture.exe TempMode Silent=2 Overwrite=1 =========================== As an alternative to this problem i decided to use "path=%temp%" instead of "TempMode". but this time batch file converts "path=%temp%" to "path=C:\Users\alberto\AppData\Local\Temp" in the comment.txt =========batch file========= echo path=%temp% >> .\comment.txt ============================ =======comment.txt========= ;Created By Alberto setup=FSCapture.exe path=C:\Users\myuser\AppData\Local\Temp Silent=2 Overwrite=1 =========================== how can i make the batch file to write "path=%temp%" in to the comment.txt ? That is to say, how can i solve TempMode issue at sfx file or path=%temp% issue at batch file ? please help me about them. best regards....
  11. hello friends ; thank you very much for your replies. @ nomadturk i wanted to try your codes however it seemed to me a little complicated. yet thank you very much for your reply. @KingAFW your solution worked for me and it's easy. thank you very much. Here are the lines i used; attrib +s "D:\userxpsettings\Desktop\New Folder\*.* " /S /D attrib -s "D:\userxpsettings\Desktop\New Folder\*.* " /S 1st line attributes all the FILES and FOLDERS +S and the 2nd line removes S attribute from FILES and the result is only the folders are +S attributed.
  12. hello dear friends i need a simple batch command that makes the attributes of the folders inside a folder as system but i cant do it since the folder dont have an extension. it must be something like "attrib +s *.folder" i know its funny but this is all i can suggest can you help me please ?
  13. hello phaolo ; i'm not sure how its done exactly but why dont you add "shutdown -t 5" command in the runonceex where you want it to reboot or in the software's *.bat file that includes setup parameters ? i think you can manage this issue this way.
  14. hello friend; i'm sending you my runonceexes. inside there are 5 runonceex. they call each other by turn. ingestigate it. i hope you get what you need. start it from cmdline.txt. command.rar
  15. hello friends; i like favicons close to my favorites and i want to assign icons unattendedly. manually i can do it (properties of url/change icon/browse to favicons folder...) can you help me if there's any way to do it ? thanks in advance
  16. hello atolica i meet the "WINNT32.EXE /CMD:CMDLINES.TXT " part for the first time. i will try it as soon as i get home. maybe its the solution i have been searching for ages thank you very much.
  17. hi atolica; we have the same problem. let me give you a little clue. winnt32.exe runs at 32 bit environments such as winpe bartpe etc. so you should boot into any 32 bit env. from usb or somewhere else. then you can execute winnt32 from here. in order to manage this i am trying to install win xp unattended from D: partition so that i can move this to a usb flash disk later. but the problem is setup doesnt read cmdlines.txt and/or $oem$ doesnt copy the folders. Still searching a solution. you can make your usb flash disk by means of winpe 2.0 its so easy. search it with this approach. you ever meet a solution let me know
  18. Dear MHz and devil270975; i will try your suggestions. and add my comment soon. i thank you very much. you helped me in a desperate mood. now i am hopefull
  19. hi friends i know how helpfull people you are but this question has been without answer. so i think the problem is about my way of asking question. can you tell me please what is missing at my question ? at least you can show me a link or a way to start from. thanks in advance.
  20. hello friends i want to install xp unattended from E:\ partition. but $oem$ folder doesn't work. i searched throug the forum but no change. below are my install.cmd and folder structer. and winnt.sif which is created by winnt32.exe at c:\. and i beg for you help. i installed windows 13 times at vmware6 changing winnt.sif or place of $oem$ folder. pls help me. i cant go on further about my project without solving this issue. please please.. _________________install.cmd_________________ SET CDROM=%~d0 %CDROM%\i386\winnt32.exe /syspart:c: /tempdrive:C /unattend:"%CDROM%\i386\winnt.sif" /makelocalsource __________________________ E:\ -i386 -$oem$ --------winnt.sif--------------- [data] msdosinitiated="1" floppyless="1" AutoPartition="0" UseSignatures="yes" InstallDir="\WINDOWS" EulaComplete="1" winntupgrade="no" win9xupgrade="no" Win32Ver="a280105" uniqueid="C:\WINDOWS\DDA" OriSrc="E:\" OriTyp="3" unattendswitch=yes [unattended] UnattendMode=FullUnattended OemSkipEula=Yes OemPreinstall=Yes ; if you are using the $OEM$ Distribution Folders then it needs to be set to Yes. Setup copies the subfolders and files contained in the \platform\$oem$ folder. UnattendSwitch="yes" ;instructs Windows XP Setup to skip the "Welcome to Windows XP" screens, where user account and Internet setting-up takes place. TargetPath=\WINDOWS OemFilesPath="%CDROM%\$oem$" ;OemFilesPath, as some of you know, in win2k and above there's a bug that causes the $OEM$ folder to not be copied. Because of this the $OEM$ folder might need to be under the i386 folder, or parallel to the i386 folder. Using this command makes the bug mute, since you're telling setup where the $OEM$ folder is. WaitForReboot=No DriverSigningPolicy=Ignore OemPnPDriversPath="Drivers\000_cpu;Drivers\001_cpu1;Drivers\002_PCI;Drivers\003_networke;Drivers\004_networke1;Drivers\005_networkc;Drivers\006_networkc1;Drivers\007_monitor;Drivers\008_monitors;Drivers\009_wireless;Drivers\010_audio;Drivers\011_mouse" ;The folders must contain all the files necessary to install the particular devices: catalog files, .inf files, and drivers. [Dependency OEMPreinstall = Yes] KeyboardLayout="Turkish Q" ;By setting your Keyboard Layout, this prevents the Language icon appearing on the taskbar when you've logged on. Specifies the type of keyboard layout to install during text-mode Setup. Hibernation=Yes unused=unused [GuiUnattended] AdminPassword=* EncryptedAdminPassword=NO AutoLogon=Yes AutoLogonCount=1 OEMSkipRegional=1 ;This option when set to 0 will show the regional screen, if set to 1 then it will skip the screen. TimeZone=130 OemSkipWelcome=1 ;If OemPreinstall is on Yes then this option should be set to 1 -------------------------only related parts are shown-----------------------------------------
  21. hi jaclaz you wont believe but i think i solved the letter assignment issue here'a what i did: i added install.cmd at the usb root. below is my install.cmd ================================== SET CDROM=%~d0 %CDROM%\WXP86\i386\winnt32.exe /syspart:C: /tempdrive:C /unattend:"%CDROM%\WXP86\i386\winnt.sif" /makelocalsource ================================== and then i unmounted the winpe.wim image and added the partinfo.txt, start.cmd files under the .\mount folder. below is my partinfo.txt and start.cmd files =======partinfo.txt=============== select disk 1 select partition 1 assign letter=U select disk 0 clean create partition primary size=5000 active assign letter=C format fs=ntfs label="SYSTEM" quick create partition primary assign letter=D format fs=ntfs label="DATA" quick exit ==========start.cmd============ @echo off & color 5b & title wellcome to my special USB Flash Disk :start cls set /p userinp=Press (1) for Install or (2) for Quit: set userinp=%userinp:~0,1% if "%userinp%"=="1" goto Install if "%userinp%"=="2" goto Quit :Install DISKPART /s partinfo.txt U:\install.cmd goto end :Quit exit goto end :end pause>nul ====================== lastly add "\start.cmd" lines to startnet.cmd file which resides under mount\windows\system32. then i mounted the image file (winpe.wim) and added it under the usbroot/sources folder by renaming as boot.wim. when boot from usb, a windows occurs and asks if i want to install or not. in order to install, i press 1 and enter. then it applies the partinfo.txt as i want and assigns the letter C to HDD active partition. because i do all these commans from X:\. then it calls the install.cmd file and windows installation begins with the correct partition letters C:\system D:\data U:\winpe UDF E:\DVD-ROM i feel good... (somehow sometimes it gives me error saying script file couldnt read blah blah... but when get this error i go to x:\ and call start.cmd from there. i think it's not important error.) but the same BSOD continues i'm using vmware6 as virtual machine and winpe 2.0 as image file. once i added scsi drivers from a floppy image on the virtual machine but the result is same. i havent tried it on a real machine. but i believe it will be allright. i still continue to work. and of course by your help meanwhile i thank you again for your effort to help me
  22. hello jaclaz i'm smiling but inside i wanna cry after the file are created on the HDD i checked the migrate.inf file inside the $WIN_NT$.~BT and $WIN_NT$.~LS folders. But there wasnt. but the worse is when i restart the virtual machine, the text phase begins but after some changing lines it says "setup is starting windows" and then it gives BSOD error numbered 0x000007B i am seraching a solution for BSOD error and then i will be able to go on...
  23. hi TheReasonIFail i have checked the letters by list volume but it wasnt assigned. just a moment... yes you are right ! i am in C:\ prompt but when i list the volumes i cannot see the letter C. but why ? if C was ram drive i would understand but its not. so can you tell me where the letter C is assigned to ?
  24. hello jaclaz really i'm glad to meet you for your help i think i solved the drive letter issue temporarly. as far as i see (if i dont misunderstand) winpe and windows xp has different approaches to assign drive letters. that is it doesnt matter which letter is assigned to system partition at vista environment. when windows is installed and login, xp will automaticly assign letter C to sytem partition and following up partitions with following letters. if so i my partinfo.txt as below and it worked ================= select disk 1 select partition 1 assign letter=U select disk 0 clean create partition primary size=10000 active assign letter=P format fs=ntfs label="SYSTEM" quick create partition primary assign letter=R format fs=ntfs label="DATA" quick exit ================= Now my new problem is setup created two folder and two files ($win_...BT$ ; $win_...LS$ ntdetect.com NTLDR) at system disk root. then nothing happend what might be missing ? my autorun1.cmd file is below. ================= DISKPART /s partinfo.txt SET CDROM=%~d0 %CDROM%\WXP86\i386\winnt32.exe /syspart:P: /tempdrive:P /unattend:"%CDROM%\WXP86\i386\winnt.sif" /makelocalsource =================

  • Create New...