Jump to content

ProClub

Member
  • Posts

    25
  • Joined

  • Last visited

  • Donations

    0.00 USD 
  • Country

    Hungary

Posts posted by ProClub

  1. O well. I guess, I'll just have to write it. Would anyone else be interrested in such a script? Or maybe a generic script runner service? I'd be happy to help someone else out too if I'm writing this...

    I just did a little digging and guess what I found: http://support.microsoft.com/kb/q137890/

    It seems I can run a regular application (or in this case command line script) as a service. There is only the matter of scheduling. I somehow need to have that service start after login. But I guess, that's an issue I can fix. Maybe I don't have to write a service after all. I'll check back and tell how it worked out.

  2. You could use runonceex and autologon (with a forced reboot) as necessary, but there would be no other way I am aware of without 3rd party applications to do this during boot or shutdown. Perhaps you should consider application/update deployment software like SMS or similar.

    What do you mean by autologon? Wouldn't that be a security crater? Giving my users a way to have an admin account? Even if I have Windows not load the UI, they still can use Ctrl+Shift+Esc, new task to run any app they like.

    So, there is no other way than writing a service... sigh... Never mind. SMS is a bit too expensive for a high school, so I guess, I'm just going to write it...

  3. Hi there!

    I made a fancy unattended install and now wish to have my systems remotely maintained. For this reason I created a network share and a script, that checks for new "updates" on this share. If it finds a new script to be run (AKA update), it runs it.

    This can be used for a variety of tasks, making system wide updates a piece of cake. SMS isn't free, so I'd prefer to use this solution.

    However, I've run across a major problem. At the time, GP startup scripts run, there is no network yet. At thetime, shutdown scripts run, the network is allready offline. Logon/off scripts won't do it because of user right problems. Manually starting the network service via NET START won't work, because the service is started, but I still get an error for NET USE.

    The only solution I can think of is writing a service to download update packs while the user is loged in and then run them at shutdown time.

    The question is: is there ANY way to have network support with SYSTEM rights WITHOUT writing a service?

    Thanks in advance

    J

    The script would be:

    NET USE P: \\192.168.1.3\install /USER:myusername mypassword

    FINDSTR /V /I /G:C:\WINDOWS\updates\updates.lst p:\update\updates.lst >%temp%\updatelist.txt
    FOR /F %%I IN (%temp%\updatelist.txt) DO p:\update\%%I.cmd
    del /Q %temp%\updatelist.txt
    COPY /Y p:\update\updates.lst C:\WINDOWS\updates\updates.lst

    NET USE P: /DELETE

  4. Hi there!

    Maybe you'll find some use in what I have learned.

    So, I work on an unattended install for a WinXP deployment in a 50 computer public access environment. At least, as far as compulsory login school usage is public. We had the problem of retained cached roaming profiles and fragmented hard drives for years, so I moved profiles, temp directories and the page file to drive d: and wipe the whole thing every startup. Ok, not everything, default user profile and some stuff stays, but basicly, that's it.

    I intend to do a write protection on C: except for SYSTEM. At shutdown time, a script will run and check a local update distribution server if I put some new fancy updates on it for install. If there are some (for whatever application) the script displays a message to the user and installs the updates.

    This way, I intend to keep the end-user computers up and running.

    Hope, this helps someone.

  5. This is, because Daemon Tools installs a driver for the "fake" drives. So, in other words, Windows will not load/unload the drivers until you restart. They are in use. So, no Plug and Pray.

    You'll have to do a restart, there's no other way. Except, if you want to recode Windows' driver handling mechanisms. I would advise against it.

  6. Hello everyone!

    After having a hard time getting BartPE to work as intended, I decided to write a short tutorial for those coming after me.

    So, let's get started. :)

    1. Download BartPE and install it. I trust, this does not require further explanation.

    2. Create your unattended CD/DVD.

    3. Take your i386 folder from your original distro dir and put it into a newly to create xp directory.

    So your dir should be: distrodir\xp\i386. This is, because BartPE uses the i386 directory for Windows components.

    4. Create a new i386 directory in your distro dir. Inside, create a System32 dir. Inside that, we will put our config files for partitioning and stuff.

    5. Put your $oem$ folder INSIDE distro\xp\i386

    6. Create your config files. Mine look like this:

    autorun1.cmd:

    DISKPART /s partinfo.txt
    FORMAT c: /fs:ntfs /Q /V:Local /Y
    FORMAT D: /fs:ntfs /Q /V:Local /Y
    FOR %%i 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 %%i:\AUTORUN.INF SET CDROM=%%i:
    %CDROM%\xp\i386\winnt32.exe /syspart:c: /tempdrive:d /unattend:"%CDROM%\xp\i386\winnt.sif" /makelocalsource

    partinfo.txt:

    SELECT DISK 0
    CLEAN
    CREATE PARTITION PRIMARY size=2048
    ASSIGN
    ACTIVE
    CREATE PARTITION EXTENDED
    CREATE PARTITION LOGICAL
    ASSIGN
    EXIT

    7. now, create your BartPE project and test it. It should work fine. Note, that this has a positive side effect. Since a local source is created, you may take your CD out if there is no software to be installed from it.

    This should be the hard part. Feel free to extend this tutorial.

  7. This is very cool. But I allready figured it out myself. I want to run diskpart _before_ I even start copying files. I specified the profile directory to d: for example. So if I create d: in the guirunonce part, my system will be somewhat unusable. That's why I said, I'd like to have it in the txtsetup part.

  8. Hi there!

    I wrote a little script to get the domain name of my local computer on the network. Since this was somewhat of a headache for many, so I post my script here.

    Note: this runs on WinXP only, as far as I know. Feel free to optimize it. It's a Q&D script. :)

    ipconfig | find "IP Address" > ip1.txt

    for /f "tokens=1-2 delims=:" %%i in (ip1.txt) do echo %%j > ip2.txt

    del ip1.txt

    for /f "tokens=1-4 delims=. " %%i in (ip2.txt) do (
    nslookup %%i.%%j.%%k.%%l >ns.txt
    set IP=%%i.%%j.%%k.%%l
    )

    del ip2.txt

    for /f "skip=2 tokens=2 delims=: " %%i in (ns.txt) do if not %%i==%IP%

    set DNS=%%i

    del ns.txt

    The DNS name is stored in %DNS%. You can use it with compname if you like. If you want to truncate it to the computer name, use:

    for /f "delims=. tokens=1" %%I IN ("%DNS%") DO set ComputerName=%%I

    afterwards. Note, that the desired computer name will be set in the %ComputerName% variable.

    Hope, this helps.

    J

  9. Hello!

    An other question. I have loads of software I figured out how to update from a local server and some reg files that need regular updating. However, my users do not have rights to do any of this. So, how do I update my stuff? IS there a way to do it windows-update-like, so there's an option "Install updates and shut down"?

    Thus would be REALLY cool. I wouldn't have to worry about updating 50+ computers every week.

    Thanks

    J

  10. Hi there!

    There's a single question bugging me for month now. Micro$oft stated, that diskpart CAN be used for unattended CDs. I'm guessing, they did't mean BartPE.

    I'd feel more comfortable, if it could be done somewhere from TXTsetup. Is there a way to launch diskpart? This would solve all my problems.

    Thanks

    J

    Title Edited - Please follow the forum rules from now on

    -- Martin L

  11. Hi there!

    So, I got EF Commander Free and I'd like to install it silently, with no desktop icon but with an uninstall option. However, the installer is somewhat odd and I can't get it to be silent.

    2 options here: switches or repack. Repack sure takes some work, so the first option would be preferred. I searched Google and here, nothing.

    Thank you in advance.

    J

  12. Yep, cmdlines.txt as well. This really sucks.

    Why would I do this? Because I like to copy a Firefox and Thunderbird defaul profile via $oem$ to the Default User profile so that that profile is applied to every user. Now, since Windows keeps keeping those flags, Firefox gets reeeally cranky and buggy. So, guess what, reset the read only flag.

    However, if I can't do it anyhow from setup, I'd have to do it manually at which point I'm as good as installing Windows myself.

  13. Hi everybody!

    I came up with the following script to fix the $OEM$ folders read only flaw. It marks all read only files not read only recursively.

    dir %1 /AR /B /S >%2
    FOR /F "tokens=* " %%I IN (%2) DO attrib -R "%%I" /S /D
    del %2

    Also added it for your downloading pleasure... :)

    Usage:

    readonly[.cmd] "c:\path\to\dir" c:\mytempfile.txt

    Note: this also supports environment variables.

    Have fun! :) And please feel free to post modifications here.

    ProClub

    readonly.cmd

×
×
  • Create New...