Jump to content

Doc Symbiosis

  • Posts

  • Joined

  • Last visited

  • Donations

    0.00 USD 
  • Country


Everything posted by Doc Symbiosis

  1. I'm running this in a batch to connect the share to the last free drive letter and write it to %drvlet% FOR /f "usebackq tokens=2* eol=" %%i IN (`net use * \\server\share /PERSISTENT:NO`) DO ( SET drvlet=%%i GOTO endfor ) :endfor
  2. Nothing to be sorry about lawrenca. I'm glad, when I see that people use some of my ideas( makes one a little proud. I think, that's what this forum is for, to share ideas and put together a many puzzles. I wrote the final version today, cause I'm lying in bed with mononucleosis and so have a lot of time. Till now, I didn't needed this, cause I'm always running WPI from a fixed network share, but I was ached to write this since kelsenellenelvian first post.
  3. I'm not 100% sure, but I think, I read something, that using Autologon and an encrypted password doesn't work together. You could leave the password encrypted and use the method described on unattended.msfn.org to create another user account to autologon. If you use this method, you can use the alternative account to do the installation and delete this account at last shutdown, so that administrator is the only existing user ( apart from potentialy other created user accounts). If you do it this way, you can leave his password encrypted in winnt.sif.
  4. I wrote an alternative WPI.cmd and modified the generate.js in the nearly same way like like lawrenca. So I added the function: function FindSWPath() { position = "generate.js" swpath = WshShell.regRead("HKCU\\Software\\WPI\\SWPath"); swpath = swpath +'\\' return swpath; } and in the function replpath(u) I added these two lines swdir = FindSWPath(); rs = rs.replace(/%swpath%/gi, swdir); The WPI.cmd uses the %~dp0 variable. If it is called through UNC path, It automatically connects the share to the last free drive letter, because I had some trouble to run installations with UNC path. The Network drive is disconnected within next logout. So here's the batch @ECHO OFF SETLOCAL ENABLEEXTENSIONS SET wpidir=%~dp0 IF %wpidir:~0,2%!==\\! ( REM Get the name of the share, assuming that it is not longer than 50 characters FOR /F "tokens=1,2* delims=\" %%i IN ('ECHO %~dp0') DO ( SET share=\\%%i\%%j SET wpipathpart=%%k ) ) IF %wpidir:~0,2%!==\\! ( REM connect to the last free drive letter and write it to drvlet FOR /f "usebackq tokens=2* eol=" %%i IN (`net use * %share% /PERSISTENT:NO`) DO ( SET drvlet=%%i GOTO endfor ) :endfor SET wpidir=%drvlet%\%wpipathpart% ) ) REM Remove the last backslash in the path SET wpidir=%wpidir:~0,-1% REM Change to wpipath, so that the reg commands also run on W2k systems, because reg.exe is containd in the WPI-folder CD /D %wpidir% REM Write the app-path to the regsitry REG ADD HKCU\SOFTWARE\WPI /v SWPATH /t REG_EXPAND_SZ /d "%wpidir%\Install" /f >NUL REM Font installation - the smooth and customizable way. start "" /wait "%wpidir%\Tools\fonts\fontinstaller.exe" REM Start WPI and wait for its end start /wait WPI.hta REM Remove the key from registry REG DELETE HKCU\Software\WPI /F >NUL ENDLOCAL I know, the double if command isn't so nice, but I couldn't figure out, how I can assign the values to the variables, so that they have their values already in the if construction. Now in config.js you can use %SWPATH% as variable. I wrote this for WPI 4.3.5, didn't test it jet with the new version. By the way, I didn't catch the case, that no drive letter is free, but I don't hink that this is necessary. generate.js Wpi.cmd
  5. I'm sorry that I can't help you for your request, but for a script, which should send key commands, I would prefer using an AutoIT script. Tomorrow at work I can have a look for a list of the sendkey command in vbs.
  6. The entry is to be used in a regfile. Just create a file regtweak.reg, with the following line Windows Registry Editor Version 5.00 Now add the tweak to the file, save it and run it. Done! In command line, you have to use regedit /s "regtweak.reg" to import the setting
  7. Yzöwl's reg add command runs fine on my machine, of course, when you run it in command line and not in a batch, you have to use just single not double %.
  8. Do you get an error messsage, when you run the rag add command posted by Yzöwl? If not, which data is entered in your newly created value or what else is going wrong?
  9. At first I wanna say WOW, really nice list of tweaks. I didn't read the whole list til now, since it's a little too much to read it all at once. But here a few little corrections. The following two tweaks are contained two times: ;Enable Monitor Power-off on the Logon Screen ;Do Not Send Files to Recycle Bin As a matter of form the two tweaks ;Disables DOS Filenames may cause problems with old dos based applications ;Disable the NTFS Last Access Time Stamp (speeds up viewing folders in ntfs) should be settled right after ;These NTFS tweaks improve file system performance (Speed up NTFS) Note: these have been reported to cause non-compatibility with DOS/Win9x-based apps/games. I'm going to test some of the untested right now. I'm also just figuring out the tweaks to set the security level of IE to high for the different zones, e.g. ;-------------------------------------------------------------------------- ;Set Internet Explorer Security Level For Internet To High ;-------------------------------------------------------------------------- [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\3] "1001"=dword:00000003 "1200"=dword:00000003 "1400"=dword:00000003 "1402"=dword:00000003 "1405"=dword:00000003 "1407"=dword:00000003 "1604"=dword:00000001 "1606"=dword:00000003 "1607"=dword:00000003 "1608"=dword:00000003 "1800"=dword:00000003 "1802"=dword:00000001 "1803"=dword:00000003 "1804"=dword:00000003 "1A00"=dword:00010000 "1A02"=dword:00000003 "1A03"=dword:00000003 "1A05"=dword:00000003 "1A06"=dword:00000003 "1C00"=dword:00000000 "1E05"=dword:00010000 "2100"=dword:00000003 "2101"=dword:00000003 "2300"=dword:00000003 "2000"=dword:00000003 Could be interesting for non-IE users.
  10. Just found my mistake. The trouble came from, that the newly created regvalues have type REG_SZ. So I added the type and everything works fine wshshell.RegWrite key_path_001, new_path,"REG_EXPAND_SZ" wshshell.RegWrite key_path_002, new_path,"REG_EXPAND_SZ"
  11. Hi there, this is the part of my winnt.sif and it works fine [URL] Home_Page=http://www.mpibpc.gwdg.de Search_Page=http://www.google.de Perhaps you may not use the spaces around the "=". About the proxy I can't say anything, cause I don't install a proxy on every machine, so I use a script, in case I want to use a proxy.
  12. Here's the regtweak to disable welcome screen: ;Disable Welcome Screen and uses Classic Logon [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon] "LogonType"=dword:00000000
  13. Hi there, I want to add the following directory to my Path variable: "c:\Program Files\IT+ES command line applications" permanently. I tried the following vb-script, but after restart, when I want to run a command, e.g. net user, it says, that it can't find this command. In my own directory, I can run the commands. It seems to add the directory in a right way, but I think there's missing some escape Character or something like this, cause, when I add the directory manually, everything works fine. Anyone got an idea or another way to do this? Set wshshell = CreateObject("WScript.Shell") key_path_cur = "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment\Path" key_path_001 = "HKLM\SYSTEM\ControlSet001\Control\Session Manager\Environment\Path" key_path_002 = "HKLM\SYSTEM\ControlSet002\Control\Session Manager\Environment\Path" app_dir = "%PROGRAMFILES%\IT+ES command line applications" app_dir = wshshell.ExpandEnvironmentStrings(app_dir) cur_path = wshshell.RegRead(key_path_cur) new_path = cur_path&";"& app_dir wshshell.RegWrite key_path_001, new_path wshshell.RegWrite key_path_002, new_path
  14. You also can use the following regtweaks to turn of the single components seperately ;Disable Firewall Notifications [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Security Center] "FirewallDisableNotify"=dword:00000001 ;Disable Automatic Updates Notifications [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Security Center] "UpdatesDisableNotify"=dword:00000001 ;NoRecentDocsmenu removes the recent documents from the start menu. [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer] "NoRecentDocsMenu"=dword:00000001
  15. I also had often this problem, for eample, when you install MS Office 200 and don't it first as administrator, but normal user, then I often ran into these problem. Sometimes simply running office as asministrator helped, but not always. I think think, that it is very supposable, that there is a update, which still has to run some actions.
  16. In a batchfile the variable %~dp0 contains the directory of the batch. So you can call WPI from anywhere and put it in any location. Was it something like this you thought of kelsenellenelvian? EDIT: I forgot to mention that this way doesn't work for UNC pahts. So if you want to call from a network share, you have first to connect the share to a drive letter.
  17. You must run the script for creating the user and setting autologon for this user from cmdlinex.txt before you run RunOnceEx.cmd. And make make that the computer has at least one restart between running the user script and running runonceex.cmd, so that the newly cerated user really is logged in.
  18. The following command should do the trick. For /f %i in ('DIR c:\Hotfixes\* /B') DO start /wait %i /integrate:c:\XPCD /q Here I asume, that the Hotfixs are located in c:\Hotfixes and the CD files in c:\XPCD. When you want to run this in a batch, you've got to use %%i instead of %i.
  19. Perhaps have a try with dsmod, which you can download at microsoft.com. I don't know, if this worls for domain users. Another way to go surely is through the grouppolicies, since you have active directory, allowing ( or denying ) just one domain user to logon to the machine. What I wonder about is, why exactly do you join the computer to the domain, when you don't want domain users to logon to the computer? Hope this helps a little
  20. Use the start /wait command when you run the commands. This could spare you some trouble. start "add user" /wait net user Owner /add start "add to administrators" /wait net localgroup Administrators Owner /add start "set maximum password age to unlimited" /wait net accounts /maxpwage:unlimited start "set autorun" /wait REGEDIT /S autologon.reg I have had similar problems, e.g. that the added user was added to the administrators-group on a virtual machine, but not in a real installation.
  21. It doesn't make any difference, which of these two batches you run first, cause the HKCU regtweaks aren't applied to admin until his first login, so after the next restart. Therefore the order isn't important.
  22. Sorry, ct is a very popular computer magazin in Germany, so popular, that I thought, evryone knows it, what of course isn't so worldwide. And I got to apologize a second time, because oooops, just recognized, that I made a little mistake. The article describes howto move an existing XP-installation to a n USB-HDD
  23. In the last edition of ct was an article, where exactly this was described.
  24. To delete a folder after restart, run a batch, called e.g. Runonceex.cmd containing: @echo off setlocal enableextensions SET KEY=HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx REG ADD %KEY% /V TITLE /D "Running last tasks" /f REG ADD %KEY%\010 /VE /D "Deleting the install-directory" /f REG ADD %KEY%\010 /V 1 /D "%COMSPEC% /C rmdir %SYSTEMDRIVE%\Install /s /Q" /f endlocal After a restart, this deletes the folder %SYSTEMDRIVE%\Install after the login.
  • Create New...