Jump to content

Doc Symbiosis

Member
  • Posts

    333
  • Joined

  • Last visited

  • Donations

    0.00 USD 
  • Country

    Germany

Everything posted by Doc Symbiosis

  1. You could use a batch file using the netsh interface command like the following: netsh interface ip set address source=static name= "Local Area Connection" addr=xxx.xxx.xxx.xxx mask=255.255.255.0 gateway=xxx.xxx.xxx.xxx 1 netsh interface ip set dns source=static name="Local Area Connection" addr=xxx.xxx.xxx.xxx register=primary
  2. You could use drive snapshot. It's a really simple to use program and it's for free. Have a look on the following page: http://www.drivesnapshot.de/en/
  3. To change the useraccount the system logs in with, you just have to import the reg settings into the HKLM\Software\Microsoft\Windows NT\CurrentVersion\Winlogon key, the values "DefaultUsername", "DefaultDomain" and "Defaultpassword" have to be modified, but I don't know, howto encrypt the userpassword.
  4. In your batch that is located on your external HDD you could use the following line: set usbpath=%~dp0 At the end of your batch you should insert the line: set usbpath= or you have to work with setlocal and endlocal Then %USBPATH% is the variable, which contains the path to the directory, the batch lies in, so in this case your external HDD. Hope this helps.
  5. To apply a regfile, you have to use the reg import command. So in your runonceex.cmd you should use the command "reg add newtemp.reg". A little better would be to use this line in your cmdlines.txt, cause when it is executed there, no user except the default user exists and so the HKCU entries are taken for the default user, also for the user you run the runonceex with.
  6. Perhaps try the following: Add the following line to the WPI.cmd REM Determine the WPI startup path. set wpipath=%~dp0 Then in the config.js you should be able to use %WPIPATH%\Install as installation path. I think I used this way a few months ago and it worked fine, but perhaps I forgot something right now.
  7. @Yzöwl: Thanks a lot. That was exactly what I was looking for. This was alreadyx the second time in the past week, that you helped with a problem, for that I already had searched a long time. You're the greatest. Doc
  8. By the way, the %PROGRAMFILES% variable also contains the whole path to your Prog-Directory, so it's drive independent.
  9. When I use net time /setsntp:x.x.x.x and then run net timme /set, I always get the errror massage "Could not locate a time-server". I tried with different ntp-servers. I don't want to use tclock, because I can't run from commandline and I only want to synchronize the time once, because later the most PCs are moved to domain. Just have to do this once to connect to a networkshare through commandline to automatically install software and the connecting only is possible, when the time has less than five minutes difference to the server.
  10. I'm sorry, that I've expressed so unclear, but I meant, how do I synchronize the time through command line. Thanks in advance.
  11. I'm wondering, if it is possible with a PC running Windows XP to synchronize time from the internet, without having a personal server, which does this? I've searched a long time and came to the conclusion, that only server versions of windows can do this. Is this really so? Any help would be appreciated.
  12. I think the variables in WPI.cmd have nothing to do with the rest of the program. I solved this problem this way: 1) In the WPI.cmd I write the value of the variable to the registry. 2) Then in the generate.js, which is there to replace variables used in the config.js, this value is read and the variable replaced. So here is my wpi.cmd: @echo off&setlocal enableextensions REM put the sharename and the application directory into variables set share=\\mpg-bpc-s2\software$ set appdir=softwareinstall\install\englisch for %%a in (c d e f g h i j k l m n o p q r s t u v w x y z) do ( fsutil fsinfo drivetype %%a:|find "No such Root Directory">nul 2>&1&&call :check %%a: ) REM Connect the softwareshare to drvlet net use %drvlet% %share% REM Write the app-path to the regsitry REG ADD HKCU\SOFTWARE\WPI /v SWPATH /t REG_EXPAND_SZ /d "%drvlet%\%Appdir%" /f REM Determine the WPI startup path. set wpipath=%~dp0 REM Font installation - the smooth and customizable way. start /wait %wpipath%\Tools\fonts\fontinstaller.exe REM Force resolution to needed size for wpi interface. start %wpipath%\Tools\VideoChanger.exe 1024x768x32@85 -q REM Special registry tweak needed. regedit /s "%wpipath%\common\wpi.reg" REM Make WPI directory the current directory. for /f "delims=: tokens=1" %%i in ("%wpipath%") do %%i: cd "%wpipath%" REM Start WPI and wait for its end start /wait WPI.hta REM Delete the Key from the registry REG DELETE HKCU\Software\WPI /f REM Disconnect the network drive NET USE /DELETE %drvlet% endlocal&goto :eof :check if not defined drvlet set drvlet=%1&goto :eof ------------------------------------------------------------------------------------------ To the generate.js I added the function: function FindSWPath() { position = "generate.js" swpath = WshShell.regRead("HKCU\\Software\\WPI\\SWPath"); swpath = swpath +'\\' return swpath; } and to the function replpath(u) I added the following line within the other replace commands rs = rs.replace(/%swpath%/gi, swdir); So now in the config.js, I can use the following prog[pn]=['Adaware 6'] uid[pn]=['ADAWARE'] desc[pn]=['Installs Adaware 6 Personal.'] cmd1[pn]=['%SWPATH%\\adaware6.exe /silent'] ordr[pn]=[505] dflt[pn]=['no'] cat[pn]=['Antivir'] pn++
  13. you also can use the following command ( where the regfile is called xxx.reg ) reg import xxx.reg
  14. Which restrictions do you have and after which command does the cmd close?
  15. That's it. Very much thanks
  16. You just have to set common desktop into quotes(") then evrything works fine.
  17. Does anyone know howto perform a silent install of the Acrobat Reader Update 7.0.3? The /S/v/qn switch which is given by the help doesn't work. It also would be a great help, to have the update as msi-file, but I couldn't find it.
  18. You can use the following script to put the path to desktop of the current user into the variable desktop: @echo off setlocal enableextensions for /f "tokens=*" %%a in ( 'reg query "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" /v desktop' ) do ( set myvar=%%a ) set desktop=%myvar:~15% echo /%%desktop%%=%desktop% pause endlocal goto :eof Similarly you can get the other paths, but changing the regkey, which is read.
  19. That's exactly what I looked for. Very much thanks.
  20. I'm wondering, if in a batch file it's possible to direct the stdout into a variable ? To be more sepcific, I want to save the output of the follwoing command to a variable: reg query "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" /v desktop I found a solution to this, which first saves the information to a textfile and then reads the information from there. But I've got the impression, that it's possible to do this more direct.
  21. I don't know, if this helps, but the paths to both are contained in the regkey HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders in the values "desktop" and "start menu". So in vbs or js you are able to put them in a variable. In a batch, I'm not quit sure, if you can put the value in a variable with the reg query command, but I'm trying to do this, just give me a little time.
  22. The path to the source files is located in the following registrykey: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SourcePath So just copy the files to the drive perhaps in a subfolder i386 of the windows directory and run the following command: reg add "HKLM\Software\Microsoft\Windows NT\CurrentVersion" /v "Sourcepath" /t REG_EXPAND_SZ /d "%WINDIR%\i386" /F
  23. How exactly do you try to mount the two shares and what's the error message, if you get one? To my knowledge you should be able to connect to different shares with different useraccounts at the same time. Just make sure to connect with the acurate useraccount.
  24. Just put it in the Start Menu\Programs\Startup Folder of the default user. Then the script starts for every new user created every time he logs in.
  25. What is the error message you get? I would try to start from a different system like pebuilder and delete it from there.
×
×
  • Create New...