Content Type
Profiles
Forums
Events
Everything posted by Yzöwl
-
Copy text string to ini file
Yzöwl replied to sentinel1705's topic in Programming (C++, Delphi, VB/VBS, CMD/batch, etc.)
I'm not sure that the for loop is needed>>D:\Profiles\User1\windows\profile.ini Find /i "data1=value1"<D:\Profiles\User1\windows\profile.txt -
Maybe a noob problem with script
Yzöwl replied to elmatadorbr's topic in Unattended Windows 2000/XP/2003
If you're using sp3, surely you should be checking the root drive for WIN51IP.SP3! -
Batch File copy and rename with date
Yzöwl replied to hem852's topic in Programming (C++, Delphi, VB/VBS, CMD/batch, etc.)
Here is a quick untested file which may help you. This file is not here as learning material, but it should be useful nonetheless. Ren2FnDT.cmd @Echo off&Setlocal If %1' Equ ' (Set/p "f_=Enter the Full Unquoted File Name to process: ") Else ( Set "f_=%~1") If Not Exist "%f_%" (Echo: File Not Found&Ping -n 6 127.0.0.1>Nul&Goto :Eof) Set "s_=E:\CognosData\Cubes" :_F Dir/b/ad "%s_%">Nul 2>&1||(Echo: Destination Directory Not Found&Echo: Echo: Enter the Full Unquoted Destination Directory Path:&Echo: Echo: OR&Echo: Enter X to Exit&Set/p "s_=") If /i %s_% Equ x Goto :Eof For /f "delims=" %%# In ("%f_%") Do Set "n_=%%~n#"&Set "e_=%%~x#" Call :_B :_O If Not Exist "%s_%\%n_%" (MD "%s_%\%n_%"2>Nul||Goto :Eof) Copy "%f_%" "%s_%\%n_%\%n_%%d_t%%e_%" Goto :Eof :_B Call :_D y m d Call :_T h n Set d_t=_%d%-%m%-%y%_%h%-%n%&Goto :Eof :_D Setlocal enableextensions Set "t_=2"&If "%date%z" Lss "A" Set "t_=1" For /f "skip=1 tokens=2-4 delims=(-)" %%a In ( 'Echo:^|Date') Do ( For /f "tokens=%t_%-4 delims=.-/ " %%d In ( 'Date/t') Do ( Set "%%a=%%d"&Set "%%b=%%e" Set "%%c=%%f")) Endlocal&Set "%1=%yy%"&Set "%2=%mm%"&Set "%3=%dd%"&Goto :Eof :_T Setlocal enableextensions For /f "tokens=5-8 delims=:. " %%a In ('Echo:^|Time') Do ( Set "hh=%%a"&Set "nn=%%b") If 1%hh% Lss 20 Set "hh=0%hh%" Endlocal&Set "%1=%hh%"&Set "%2=%nn%"&Goto :EofYou can either run it as it is and answer the questions, or drag and drop the file onto it, or I suppose enter the path and file name, (quoted if contains spaces). <Note> This is untested and hasn't been written with full error trapping etc. It should work for the topic starters location and some others but not all! -
Maybe a noob problem with script
Yzöwl replied to elmatadorbr's topic in Unattended Windows 2000/XP/2003
If nothing is happening then the most likely scenarios are that either your Install directory is not located in the root of the installation media or a problem with your implementation through nLite. -
RunOnce & manual execution differ? WTF?
Yzöwl replied to BAReFOOt's topic in Unattended Windows 2000/XP/2003
When you join our Forum the most important task is to read and follow our rules, like the ones at your job you seem to be following to the letter. You have failed to perform this requirement, and continue to fail to do so. The registry keys you are trying to set are the single most important information required for the question posed. Any data contained in those keys could possibly be construed personal to you, but the keys never will be. Your failure to supply this information and your continued arguing has resulted in this thread being closed. -
RunOnce & manual execution differ? WTF?
Yzöwl replied to BAReFOOt's topic in Unattended Windows 2000/XP/2003
What series of three posts? I've just done one "bump" post, because sometimes a thread goes under in the others, and it would be extremely stupid to let it just die then, because why write it in the first place when you don't care?But I heard there are levels of alcohol that make 3 things out of two (just before you see double). I *repeat*: The exact code is perfectly *irrelevant*. But maybe others are so stupid, that you expect that there's crap in the code that's not mentioned by the user. I tell you something: Pleast disable retard mode by default. ok? Then if you're to disgusted by those that drive you crazy, rather go somewhere where it's better, than enablang retard mode by default. Would be nice. Thank you.Now imagine my code as this: reg import "desktop.reg" reg import "taskbar.reg" reg import "explorer.reg" reg import "control panel - accessibility.reg" reg import "control panel - internet.reg" reg import "control panel - user accounts.reg" rd /s /q crapdir1 rd /s /q crapdir2 rd /s /q crapdir3 del /s /q *.crap del /s /q crap.* del /s /q *.crap.*(of course this are NOT the real files [oh god, why do i think you'd really tell me this?]) And to mention it AGAIN: They The script is proven in YEARS of tests and usage with manual execution. Just now when i run it in RunOnceEx, Active Setup or RunOnce, the registry settings don't get included. (While the files get deleted without problems when ran in RunOnce or Active Setup [in RunOnceEx Active Setup still has to create some of them].) If that is "not enough information for you", then just leave us alone, ok? Two things quickly!Don't argue with me unless I am either wrong or you are right! both scenarios are unfortunately not the case If you see in your post the additional emboldened headings, Post Nº 1, Post Nº 2 and Post Nº 3; I added them when I merged your 3 posts, posted one after the other without reply. You'll also notice the edited by bit to prove it's not a figment of my alcohol induced state! Don't then go ahead and do the same thing again! Can you see above this post where you have two concurrent posts both by yourself. I would suggest that one who ignores advice is one who shouldn't ask questions. Please try to learn to toe the line as a responsible Member of our Forums! You've got a problem with registry settings not applying, you're asking for help but you cannot even be bothered to show us the registry settings etc. which aren't working for you. If you think yourself above us all in your skill level then why bother posting in the first instance. Incidentally the scripted sample code you supplied is awful, I consider myself to be quite good with this sort of thing and really appreciate the way that you are attempting to belittle both myself in my role as a forum Moderator and the rest of the Board Membership with your current stance. -
Maybe a noob problem with script
Yzöwl replied to elmatadorbr's topic in Unattended Windows 2000/XP/2003
Well most of the problems are likely cause by the non-logical addition of the trailing backslash in your %PP% variable. I've made a few changes to the syntax, I have no intention of looking at any programs and/or switches however so you'll need to do your own research etc. for any which do fail to load unattendedly during installation. @cmdow @ /HID @Echo Off&Setlocal enableextensions For %%# 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 %%#:\win51ip.SP2 Set "PP=%%#:\Install") If Not Defined PP Goto :Eof Set "KEY=HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx" Reg add %KEY% /v Title /d "Instalando Programas" /f Reg add %KEY%\000 /ve /d "WinRAR" /f Reg add %KEY%\000 /v 1 /d "%PP%\wrar370.exe /s" /f Reg add %KEY%\001 /ve /d "Messenger 8.5" /f Reg add %KEY%\001 /v 1 /d "%PP%\WLM85.MSI" /f Reg add %KEY%\002 /ve /d "O&O Defrag" /f Reg add %KEY%\002 /v 1 /d "%PP%\oodefrag10pro\oodefrag.cmd" /f Reg add %KEY%\003 /ve /d "Nero 8 Ultra Edition" /f Reg add %KEY%\003 /v 1 /d "%PP%\Nero.exe" /f Reg add %KEY%\004 /ve /d "Picasa2" /f Reg add %KEY%\004 /v 1 /d "%PP%\Picasa2\Picasa.cmd" /f Reg add %KEY%\005 /ve /d "Office 2003" /f Reg add %KEY%\005 /v 1 /d "%PP%\office2003br.exe" /f Reg add %KEY%\006 /ve /d "Flash" /f Reg add %KEY%\006 /v 1 /d "%PP%\flash.exe /silent" /f Reg add %KEY%\007 /ve /d "Messenger Plus! Live" /f Reg add %KEY%\007 /v 1 /d "%PP%\Instalarmsgpluslive.exe" /f Reg add %KEY%\007 /v 2 /d "taskkill /im msnmsgr.exe /f" /f Reg add %KEY%\008 /ve /d "Tweaks" /f Reg add %KEY%\008 /v 1 /d "regedit /s %PP%\tweaks.reg" /f Reg add %KEY%\009 /ve /d "DirectX Março 2008" /f Reg add %KEY%\009 /v 1 /d "%PP%\directx\dxsetup /silent" /fHope this helps you out a little! -
I have no idea if you can, but it is possible depending upon the Operating System, its installed tools, and a little knowledge. I have posted a method many times using REG.EXE which is available in XP and newer or 2000 with the Resource Kit tools. If your Operting System/tools meet this requirement all you need to do is use the search facility for the knowledge!
-
Random letter/number generation
Yzöwl replied to Idontwantspam's topic in Programming (C++, Delphi, VB/VBS, CMD/batch, etc.)
Try something like this, (untested): @Echo off&Setlocal enableextensions :_b Set "s_="&Set "c_=0"&Set "x_=abcdefghijklmnopqrstuvwxyz1234567890" :_l Set/a "n_=%random% %% 36" Call Set "s_=%s_%%%x_:~%n_%,1%%" Set/a "c_+=1" If %c_% Neq 8 Goto _l: Set p_=%s_%.default&Set "a_=%AppData%\Mozilla\Firefox" If Exist "%a_%\Profiles\%p_%" Goto _b Set "r_=%a_%\Profiles\%p_%" Xcopy "%SystemDrive%\install\fxprofile\*" "%r_%" /s/c/i/q>Nul Copy "%SystemDrive%\install\profiles.ini" "%a_%" >>"%a_%\profiles.ini" Echo:Path=Profiles/%p_%Hope it helps -
I'm not sure it's still the case, since I can find nothing directly about it on nLites Site or its Forum, but I was fairly certain the nLite was not for Commercial use. I am transferring this topic to the nLite forum and locking it. If the nLite Forum Moderator sees fit to open the topic again then I'm sure they will do so. Thank you for your understanding in this matter!
-
RunOnce & manual execution differ? WTF?
Yzöwl replied to BAReFOOt's topic in Unattended Windows 2000/XP/2003
@ BAReFOOt - Please do not continue to multipost without reply, I have removed your unnecessary bump and merged your series of three posts into one. As a side note, if you feel that you don't want to give us the failing code in order to tie down your problems then don't expect us to want to help! -
Create the following 3 scripts and put them in C:\ 1.cmd @Echo off&Setlocal enableextensions Set "Two=C:\2.cmd"& Set "Three=C:\3.cmd" Echo: This is the calling script, %0&Echo: Echo: When you press any key Echo: control will be passed to another script, "%Two%". Pause>Nul Call %Two% %0 Echo:&Echo: You have returned to the calling script again&Echo: Echo: When you press any key Echo: control will be passed to another script. "%Three%". Pause>Nul Call %Three% %0 Echo:&Echo: You have returned to the calling script, %0, for the last time&Echo: Echo: When you press any key Echo: you will exit. Pause>Nul 2.cmd @Echo off&Setlocal enableextensions Set "One=%*" Echo:&Echo: This is a called script, "%0"&Echo: Echo: When you press any key Echo: control will be passed to the original script, %One%. Pause>Nul 3.cmd @Echo off&Setlocal enableextensions Set "One=%*" Echo:&Echo: This is another called script, "%0"&Echo: Echo: When you press any key Echo: control will be passed to the original script, %One%. Pause>NulRun 1.cmd to find out how the Call command works.
-
Batch File copy and rename with date
Yzöwl replied to hem852's topic in Programming (C++, Delphi, VB/VBS, CMD/batch, etc.)
Could you please post your completed script, to both help followers of the topic and to allow improvements alternetives and comments. Thank you. In the meantime I'll provide a, probably crude, vbscript which may provide an alternative: Option Explicit Dim objFSO, objFile, objDir, N, File, strFNA, strOFN, strEXT '------------------------------------------------------ 'Please supply your Source and Target Directories below '------------------------------------------------------ Const SourceDir = "D:\Dir1\" Const TargetDir = "F:\Dir2\" Set objFSO = CreateObject("Scripting.FileSystemObject") If Not objFSO.FolderExists(SourceDir) Then MsgBox "The folder """ & SourceDir & """ does not exist", 0, _ "Missing source folder" WScript.quit End If If Not objFSO.FolderExists(TargetDir) Then On Error Resume Next objFSO.CreateFolder(TargetDir) If Err.number > 0 Then MsgBox "Cannot create the folder """ & SourceDir & """", 0, _ "Missing target folder" WScript.Quit End If End If On Error Goto 0 Set objFSO = CreateObject("Scripting.FileSystemObject") Set objDir = objFSO.GetFolder(SourceDir) For Each File In objDir.Files N=Now strFNA = "_" & Right(100+Day(N),2) & "-" & Right(100+Month(N),2) & "-" & _ Right(Year(N),2) & "_" & Right(100+Hour(N),2) & "-" & Right(100+Minute(N),2) objFSO.CopyFile File.Name, TargetDir & "\" & objFSO.GetBaseName(File.Name) & _ strFNA & "." & objFSO.GetExtensionName(File.Name) Next This script will copy all files in the source directory to the target directory (both specified by you). The copied files should have the appended date strings you requested! -
Batch File copy and rename with date
Yzöwl replied to hem852's topic in Programming (C++, Delphi, VB/VBS, CMD/batch, etc.)
BTW Smiley357, the output of %DATE% is different depending upon locale etc. For hem352, I'd suggest that %DATE:~4% resolves to 2008 which isn't what I expect you wanted! -
Batch File copy and rename with date
Yzöwl replied to hem852's topic in Programming (C++, Delphi, VB/VBS, CMD/batch, etc.)
From your coded section, I honestly have no idea of your intentions. You're setting two variables using parameters given at script invokation; these are being set to names which aren't used. You have two variables in your script which aren't defined and a nested for loop which isn't used at all. Apart from that the idea is not very good. If you want to rename using dates etc. the only useful format would be YYYY-MM-DD_hh-mm_filename. The reason for this is that you can sort your files appropriately. Using your current attempted system you could have files ordered thus: Instead of Try looking at what you want again then give us a little bit more pertinent information. -
Don't use the word error incorrectly! There is no error, the script works fine for me, without adding or removing anything from its original content. I tested it prior to posting, as I usually do unless stated otherwise, and again after your PM! If you are using an Operating System or something else which differs from mine then it is your responsibility to inform me of that if you wish to improve the chances of a flawless solution to your problem. Thank you.
-
Firstly, please direct questions regarding topics to the topic itself, not as a Personal Message. If the VBS, I'm guessing that's what you're referring to by the error message you're stating, isn't working I'm suggesting that you've failed to either copy it correctly or use it according to the information you provided for me to write in in the first instance. I'm guessing that you've altered the file in some was since line 8 says And as you've stated that folder has already been created, that line has already run.Please try running the script again, copied properly AND UNALTERED. If it doesn't work then it's likely that either The shortcuts are not where you thought they were! Common Desktop, not Desktop for instance The shortcuts have 'not normal' attributes! read only or system files You are using a different setup to mine Please let us know your OS, script host version etc. before requesting solutions Keep the topic informed of your progress please!
-
This is not a Portable Software Forum, this Forum is for installing applications as part of an unattended Windows installation procedure. Adding the name, key and activating this product would need to be performed in attended mode too, otherwise this `portable` software would be illegal. Please do not ask this question again in these Forums, thank you. Topic Closed
-
Both methods take into account possible file/directory overwrites.
-
Making a batch file check what os
Yzöwl replied to jamesas's topic in Unattended Windows 2000/XP/2003
We really need more information than this, because the way I see it is that if you're creating an unattended disk, you should already know what OS you're installing! This will actually only return the version of the Command Interpreter not the Operating System. Although this is likely to be the same, it is not always true. Unfortunately if the OS is part of a Dual Boot system with Vista and XP for instance, the bootmgr directory may exist in the root of the XP system drive thus giving a false case. -
The following script will delete all the desktop shortcuts. NoDeskLnk.vbs Const DSK = &H10& Const ADT = &H19& Set oShell = CreateObject("Shell.Application") Set FSO=CreateObject("Scripting.FileSystemObject") Set oFolderItem = oShell.Namespace(DSK).Self FSO.DeleteFile oFolderItem.Path & "\*.lnk", true Set oFolderItem = oShell.Namespace(ADT).Self FSO.DeleteFile oFolderItem.Path & "\*.lnk", true
-
[quote name='keithc' post='693171' date='Sep 14 2007, 12:40 PM']^^ gothtec, i wanna know how to disable 'show in groups' via the registry if you please[/quote] [quote name='EmZvr' post='759639' date='May 2 2008, 12:01 PM']Yes I want to know that too. Please tell us gothtec. [/quote]I'm guessing here that gothtec, who posted this 3¾ years ago, has only ever posted in this topic and hasn't posted since is unlikely to respond to your requests!
-
Yes, try reading the content of both the Forum I've just moved this post into and The Unattended Guide.
-
Well to be honest, I'm glad MRT isn't there. I never download it, it serves no purpose whatsoever to me, it's only really a standalone tool and it is updated every month anyway.
-
For the Compressed version UXTHEME.DL_, you simply replace the one in your i386 Directory with it. For the UnCompressed version you'd be better off using a tool such as replacer, to make the change(s).