Content Type
Profiles
Forums
Events
Everything posted by Yzöwl
-
On behalf of all our membership please allow me to welcome you to the MSFN Forums. I hope you enjoy being part of something special!
-
On behalf of all our membership please allow me to welcome you to the MSFN Forums. I hope you enjoy being part of something special!
-
On behalf of all our membership please allow me to welcome you to the MSFN Forums. I hope you enjoy being part of something special!
-
On behalf of all our membership please allow me to welcome you to the MSFN Forums. I hope you enjoy being part of something special!
-
On behalf of all our membership please allow me to welcome you to the MSFN Forums. I hope you enjoy being part of something special!
-
hello i'm still using 98 on my spare computer
Yzöwl replied to gmackner's topic in Introduce Yourself!
On behalf of all our membership please allow me to welcome you to the MSFN Forums. I hope you enjoy being part of something special! -
Try giving us a real world example from your project, showing the full key(s), data and value(s) to be changed and the question/options you'd ask instead of When you have done so, either myself or some other interested member, may be able to help with a resonable solution.We are not mind readers, only you know exactly what it is you want, if you do not tell us this information in its entirety then how can we be expected to help you achieve your goal?
-
Yes you can, REG LOAD the hive(s) and REG QUERY the keys in exactly the same manner as on a live system. If key exists then delete it and write a new key, if key doesn't exist just write the key.Due to your continued disagreement with me on this subject, it appears that we're both seeing things in different ways. Why don't you just give a complete real world example of exactly what it is you need to do, this is after all a batch file, not a secret commercial piece of software you're trying to produce.
-
I'm sorry but I think it's you who need to indulge me!I cannot at all understand your thinking on this matter, how do you expect this to work? The most suitable method is to change the settings to what you want. Lets say for instance that a multi_reg_sz key by default contains Item1, Item2, Item3, Item4, Item5, Item6, Item7 and Item8; you or your user wants to have Item1, Item4, Item5, Item7, Item8 and a new item, Item11. In order for batch file to find out which items are required for a particular installation it needs to be told; either before or during install. If it's before, then you already know what you want and can therefore create the keys yourself and import/overwrite them as part of the installation. If you need to find out interactively during install, then you'd list the defaults and ask the user to choose from/add to that list. The results of this list would be compiled into the key you require and registry imported/overwritten. It would be fool-hardy to suggest that you query a key, parse it, list the data, ask for choices, compare the lists, then say, "for each data value in selected key, if not in chosen list remove it from the key, then if choice is not in parsed list add it inline".
-
As stated above the following will work: Set oFS = CreateObject("Scripting.FileSystemObject") MyParent = oFS.GetParentFolderName(WScript.ScriptFullName) oFS.DeleteFolder MyParent, TrueJust make the bottom line the last one in your VBScript. The following batch file will work fine too: ntscript.cmd @Set "C_=X:\MyDir\New\some.vbs" @For %%# In (%C_%) Do @Set "P_=%%~dp#"&@%C_%&&@Rd/s/q "%P_%"If you wish you could run your vbs using '@cscript //nologo %C_%' too!
-
First the good news, I've tried your batch file and it works fine for me based upon %source% being %UserProfile%\Desktop\RunOnce. I've given your batch file a quick rewrite which also works for me from the same %source% @Echo off&Setlocal Set "X_=_X.lst" (Set Y_=--no-cache --no-clobber --tries 3 --user-agent=^") Set "Y_=%Y_%Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.1)" (Set Y_=%Y_% Gecko/2008070208 Firefox/3.0.1") (Set Y_=%Y_% "http://somewhere.com/sandbox/winget/build.php") Echo:Creating an instance of wget on user desktop... >%X_% (Echo:%~nx0&Echo:%X_%) Xcopy *.* "%UserProfile%\Desktop\download" /i/exclude:_X.lst&&Del _X.lst Pushd %UserProfile%\Desktop\download Wget %Y_%&If Not Errorlevel 1 (Ren "build.php" "download.bat"&Echo:download.bat) Now the bad news, your download is in fact warez related and as such you are in breach of the rules!
-
You are not being permitted to have a file with the same name as its parent directory. Since you're removing the LEET directory anyhow your method is to rename it first as in jaclaz example. Try moving the LEET file into the FX\LEET directory using the GUI and you'll get a similar access is denied type message.
-
I would suggest that for problems arising from or related to a batch file it would be prudent to supply both the batch file and a run down of the relevant file/directory structure.
-
Read what I've wrote and also run the example file and take a look in the key! You know what it is you don't want to have in that key, so it's a simple case of recreating the multiple values you need and adding the data using 'REG ADD'. There is no need or requirement for you to attempt to search/replace/edit the existing key!
-
Copy the key if required for safety, 'REG COPY' Delete the key if you dont need it's data, 'REG DELETE' Use 'REG ADD' and add the data you wish to have in your key. Example @Echo off&Setlocal ::Main registry key to modify - remove Wow6432\ for WinXP Set K_="HKLM\SOFTWARE\Wow6432Node\Microsoft\Windows NT\CurrentVersion\SvcHost" ::Registry keys value - you'll use netsvcs in your actual version Set V_="testvalue" ::Type of value data to be added Set T_=REG_MULTI_SZ ::Data to add - Use Backslash followed by Zero as a separator for multi_sz value data Set D_="FirstDataValue\0NextDataValue\0AnotherDataValue\0LastDataValue" ::Your Reg command - remember to use the /f switch if required Reg add %K_% /v %V_% /t %T_% /d %D_%>Nul
-
It queries the WinXP registry, for the string "Service Pack 3", (this is currently okay because although SP3 is in previous OSes, they don't have Reg.exe by default.) If it finds the string nothing happens, The next line, if it exists (in a script), would be executedThe double pipe effectively means 'If the previous command was unsuccessful then'.
-
Because this question was posted as a non-related reply to a two year old WPI forum topic, we could possibly assume that you're using WPI. However we need to know the CD structure where all the pertinent files are placed and the methods you are using to attempt to run the files if you wish us to help solve your problem(s). Additionally those are poor attempts at Windows NT Command Scripts, the echoing is visible, you don't appear to know the meaning of a 'double ampersand', you are changing directories pointlessly and could have better utilised the 7z commandline options. Here are a couple of examples of your .cmd files, not .bat, re-done: @Echo off For /d %%# In ("%AllUsersProfile:All Users=%*") Do ( Pushd %%#\Desktop&&2>Nul Rd/s/q .&Popd) EmptyRecycleBin.exe /qIf I've understood correctly the above script is intended to Remove all Files, Directories and Sub-Directories located on the Desktops of your users. It will then use your 3rd party utility located in %Path% using its /q switch. @7z x %SystemDrive%\AstonSettings\Aston.7z -o"%AppData%\Aston"&&( @Rd/s/q %SystemDrive%\AstonSettings)This example will extract your archive, using 7z located in %Path%, to your chosen location and then delete itself and its parent directory.
-
WPI, vLite, and a few other questions
Yzöwl replied to Sgt. D. Pilla's topic in Windows Post-Install Wizard (WPI)
I cannot see anything which should prevent the launch of wpi.hta The file could obviously be tidied a little by restructuring it so I'll do that and see if it helps. @Echo off For /f %%# In ('Mountvol^|Findstr [c-z]:\\') Do Call :_ %%# If Defined %CDROM% ( Echo:Found CD-Rom as drive %CDROM:~0,2%&Start %CDROM%WPI\wpi.hta) Del %0 :_ Dir/b/a-d %1bootmgr||Goto :Eof If Exist %1sources\install.wim (Set CDROM=%1&Goto :Eof) Pushd %1&Echo:&Echo Installing to drive %1&Echo: Dir/b/a-d menu.lst&&Echo:f|Xcopy menu.lst menu_lst.bak /c/q/h/r/k/x/y&&( Del/f/a menu.lst%) Dir/b/a-d grldr&&(Echo:f|Xcopy %systemroot%\setup\scripts\grldr grldr /c/q/h/r/y Attrib %%A\grldr +h +s +r) %systemroot%\setup\scripts\bootinst /nt60 %%A PopdI've changed some commands around a little too! (I used xcopy just to show you that it can copy without having to use attrib). The batch file is just typed up, it is untested. You may also be better off not checking for the install.wim, but something like autorun.ini, after all autorun.ini is not likely to be together with bootmgr in the root of any other drive than the CD-ROM -
WPI, vLite, and a few other questions
Yzöwl replied to Sgt. D. Pilla's topic in Windows Post-Install Wizard (WPI)
Could someone please try to explain to me what it is that's causing a problem and what you'd like me to try to help with. I cannot see any use of %Path% and therefore understand why it's being suggested as the root cause. Please bear in mind upon response that I've never used, or even seen WPI at work! -
Selecting a file with a batch file
Yzöwl replied to Jman1993's topic in Programming (C++, Delphi, VB/VBS, CMD/batch, etc.)
You cannot directly create a popup per say, but you can get the batch file to ask you the question and wait for a reply. Here's a basic example with no error trapping at all. @Echo off&Setlocal enableextensions Set/p "PROGRAM=Select a file: " Copy "%PROGRAM%" "%SYSTEMDRIVE%\backup" -
VBScript - Logon Script help
Yzöwl replied to Aen's topic in Programming (C++, Delphi, VB/VBS, CMD/batch, etc.)
Sorry I missed that, I get used to putting all that stuff together in one place! That said, you still haven't defined the objRootLDAP variable: objRootLDAP = <whatever> -
VBScript - Logon Script help
Yzöwl replied to Aen's topic in Programming (C++, Delphi, VB/VBS, CMD/batch, etc.)
You haven't defined 'objRootLDAP', and even if you had you have Option Explicit turned on, which means you must DIM the variable too before using it. -
I never stated nor implied that the author of the article was somehow obligated to maintain the links until the end of time. I merely pointed out that the links no longer worked and specifically requested that if someone had a copy, if I could obtain one from them.Firstly, if you were aware that you were resurrecting a six year old topic, why didn't you use plain English? "Anybody have a copy of this" was not sufficient to put your point across. Example: If you'd like me to play just say the word, you will lose!!!