
Ben.Hahlen
MemberContent Type
Profiles
Forums
Events
Everything posted by Ben.Hahlen
-
New utility to silently apply any theme!
Ben.Hahlen replied to milika's topic in Unattended Windows 2000/XP/2003
Apparantly, it does work when you run it during a "second" RunOnceEx installer. IE: if you reboot after everything has installed, but then you have set the applytheme in a RunOnceEx entry, it works without problem. Does anyone know why this is? If need be, I can post my winnt.sif and other files. -
New utility to silently apply any theme!
Ben.Hahlen replied to milika's topic in Unattended Windows 2000/XP/2003
Sorry to kick an old topic, but I have a question. Does this utility also work from RunOnceEx? Because when I run it, it changes the theme of the RunOnceEx window, but after the restart, the theme is back to normal again... Am I doing something wrong? -
My Documents folder through variable
Ben.Hahlen replied to Ben.Hahlen's topic in Unattended Windows 2000/XP/2003
That shouldn't be too much of a problem, I think. I can always change it later might sth go wrong . And my "instruction-set" for a re-installation will contain a "create my.docs" file . -
My Documents folder through variable
Ben.Hahlen replied to Ben.Hahlen's topic in Unattended Windows 2000/XP/2003
It works great . Just one little thing to do, and then it's all set Thank you very much for your help Yzöwl -
My Documents folder through variable
Ben.Hahlen replied to Ben.Hahlen's topic in Unattended Windows 2000/XP/2003
Ok, ignore my above post... I modified the file for another folder, but forgot to change the last "my.docs" to "my.vids"... So that was causing the error Thanks for your help, going to make an ISO now with the adapted files and I'll report back on the results -
My Documents folder through variable
Ben.Hahlen replied to Ben.Hahlen's topic in Unattended Windows 2000/XP/2003
But now the entry imported is: I:\My Documents\my.docs What does the "goto :eof" do btw? Sorry to bug you so much with it, but I'm sorta lost on all this "advanced" scripting... -
My Documents folder through variable
Ben.Hahlen replied to Ben.Hahlen's topic in Unattended Windows 2000/XP/2003
The code seems to work fine. Although there is one thing that needs to be changed to have the key being imported correctly: REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" /f /v "My Video" /d ^"%%~dpI As you can see, the " /f at the end are gone, and I've added a ^. This is because for some reason, if you have this: "%%~dpI" /f the " /f are also imported as part of the registry entry. As you said, the only problem now is to remove the trailing backslash... The only question is: how? -
My Documents folder through variable
Ben.Hahlen replied to Ben.Hahlen's topic in Unattended Windows 2000/XP/2003
Yeah, I saw the DeleteOnCopy section, and I figured that would be screwing it up as well . My current batch looks like this @echo off set TAGFILE=my.docs FOR %%D 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 ( IF EXIST %%D:\NUL ( echo Checking %%D: pushd "%%D:\" FOR /F "USEBACKQ DELIMS==" %%I IN (`DIR /S /B %TAGFILE%`) DO ( echo Tagfile: %%I REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" /f /v Personal /t REG_EXPAND_SZ /d ^"%%~dpI REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" /f /v Personal /d ^"%%~dpI ) popd ) ) EXIT and that outputs this (on my computer): I:\My Documents\ Thanks for all your help -
My Documents folder through variable
Ben.Hahlen replied to Ben.Hahlen's topic in Unattended Windows 2000/XP/2003
What is the tryit.exe looking for? I only get to see "Press any key to continue" and then it stops. I think I have found what the problem is with my current method though. Apparantly, the folders need to be set in the registry with double backslashes in the directory name and without the trailing backslashes. I have already solved the problem of the double backslashes in the path itself, but I don't know how to get the trailing ones out... To clarify, this is what I get now: I:\\My Documents\\ and it should be: I:\\My Documents Is it possible to "delete" the trailing backslashes somehow? Because if I can delete them, I think the problem should be solved, and I can then post a guide how to do it . (With proper references of course ). So in short, I think that the desktop.ini problem is obsolete, since I even already tried to replace it with one I put on my DVD -
My Documents folder through variable
Ben.Hahlen replied to Ben.Hahlen's topic in Unattended Windows 2000/XP/2003
I've done a few more tests, but I really have no clue why the folders show up as "%USERNAME%'s Documents" etc... Does someone know how this can be resolved? I think it has to do sth with the desktop.ini files, which specify an owner for the documents, but I'm not sure whether that's true... It could also be that it has sth to do with the UID that Windows adds to the folders? But then I wonder why I don't have the problem currently? Anyone has any idea??? EDIT: It seems to be the desktop.ini files that names the Personal folders. Is there a program or sth which can delete the Owner=<typenamehere> line? Or is that possible through a batch as well? Thanks in advance, Greetz, Ben -
My Documents folder through variable
Ben.Hahlen replied to Ben.Hahlen's topic in Unattended Windows 2000/XP/2003
- never mind - -
My Documents folder through variable
Ben.Hahlen replied to Ben.Hahlen's topic in Unattended Windows 2000/XP/2003
On a clean install I also get "%USERNAME%'s Music" or "%USERNAME%'s Pictures", it also happen to "My Documents" btw... I think it's a problem with the desktop.ini still being there when the "new" owner is set, so it thinks there's a different user looking at it... Is there a way to resolve this? (yes, I'm almost done nagging ) Once more, Thanks in advance -
My Documents folder through variable
Ben.Hahlen replied to Ben.Hahlen's topic in Unattended Windows 2000/XP/2003
By pure luck I found that this works: REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" /f /v Personal /d ^"%%~dpI The only thing that it now seems to do that instead of saying "My Music" and "My Pictures" it says "Ben's Music" and "Ben's Pictures" (so: %USERNAME%'s Music). I'm currently testing to see if it works normally on a "clean" install. -
My Documents folder through variable
Ben.Hahlen replied to Ben.Hahlen's topic in Unattended Windows 2000/XP/2003
I just tested, still have the problem with the quotes at the end of the location in the registry... I have used this code: @echo off set TAGFILE=my.docs FOR %%D 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 ( IF EXIST %%D:\NUL ( echo Checking %%D: pushd "%%D:\" FOR /F "USEBACKQ DELIMS==" %%I IN (`DIR /S /B %TAGFILE%`) DO ( echo Tagfile: %%I REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" /v Personal /d "%%~dpI" /f ) popd ) ) EXIT For the other locations, I use a different batch file, with a different tagfile. Could anyone explain to me why the quotes are still there? -
My Documents folder through variable
Ben.Hahlen replied to Ben.Hahlen's topic in Unattended Windows 2000/XP/2003
OK, thanks. I will try this on my next run and report back how it worked. -
My Documents folder through variable
Ben.Hahlen replied to Ben.Hahlen's topic in Unattended Windows 2000/XP/2003
LOL, never though of that... I'm not that savvy with batch-files, so please forgive me REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" /v Personal /d "%%~dpI" /f Shouldn't that be REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" /v Personal /d "%%~dI%%~pI" /f though? -
My Documents folder through variable
Ben.Hahlen replied to Ben.Hahlen's topic in Unattended Windows 2000/XP/2003
Ehm... INF files... No clue how to do that. Also seems a bit "overkill" to me. Are they easy to make? How would I implement them? Is it not possible using the batch? It's just one " that's screws it up... Any ideas? Thanks again! -
My Documents folder through variable
Ben.Hahlen replied to Ben.Hahlen's topic in Unattended Windows 2000/XP/2003
The batch works good and it returns the variable I need. The only problem now is that I need to make it into a system variable. I already checked out this where there is an explanation of how to make the %CDROM%-variable into a system one. I thought to be smart and implement that same code into my batch, so now it looks like this: @echo off set TAGFILE=my.docs FOR %%D 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 ( IF EXIST %%D:\NUL ( echo Checking %%D: pushd "%%D:\" FOR /F "USEBACKQ DELIMS==" %%I IN (`DIR /S /B %TAGFILE%`) DO ( echo Tagfile: %%I SET DOCSFOLDER=%%~dI%%~pI ) popd ) ) REG ADD "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment" /f /v "DOCSFOLDER" /t REG_EXPAND_SZ /d "%DOCSFOLDER%" EXIT After that, it imports a .reg file, which looks like this: Windows Registry Editor Version 5.00 ;--- My Documents Folder --- ; --- Sets the My Documents Folder to the variable set in set_docs.cmd --- [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders] "Personal"="%DOCSFOLDER%" The problem now is, is that my code for the system-variable returns the location with a " behind it, which screws up the .reg file and the location. I've also tried it using "^%DOCSFOLDER%^", but then it gives a "Too many parameters" error. Does someone have an idea how I can resolve this? Thanks in advance. -
My Documents folder through variable
Ben.Hahlen replied to Ben.Hahlen's topic in Unattended Windows 2000/XP/2003
Wonderfull! It seems to work as a charm. Now to implement it into my unattended DVD, and I'm all done . -
Downloads should be working now again, had to go back 5 versions of a file :S. Note: It could be that sometimes the download doesn't work again, but that's probably b/c then I'm trying to use a newer version again, just try to download after a few mins then again.
-
My Documents folder through variable
Ben.Hahlen replied to Ben.Hahlen's topic in Unattended Windows 2000/XP/2003
Edited above post, see there. For completeness, the edit: OK, I've been doing some trying and that kind of things, seems to me that I only need something like SET DOCSFOLDER=??? at the end, after the last closing ). The only question is, what? I've tried %%D, I've tried %%I, I've tried %%~dI%%~pI... DOCSFOLDER should return the folder where it found the tagfile in... Thanks again in advance. -
Meh, it's probably one file that causes the havoc, the only problem is finding which file .
-
My Documents folder through variable
Ben.Hahlen replied to Ben.Hahlen's topic in Unattended Windows 2000/XP/2003
OK, you totally lost me... Does it mean that I can use I%% in a registry entry so that My Documents is automatically set to the right directory? I seriously have no clue... Thank you very much for your help though EDIT: OK, I've been doing some trying and that kind of things, seems to me that I only need something like SET DOCSFOLDER=??? at the end, after the last closing ). The only question is, what? I've tried %%D, I've tried %%I, I've tried %%~dI%%~pI... DOCSFOLDER should return the folder where it found the tagfile in... Thanks again in advance. -
Erm, yes, the download is currently down... It's because of an update that crashed my site... I'm waiting for a resolution as we speak. I'll let you know when it's up again.
-
My Documents folder through variable
Ben.Hahlen replied to Ben.Hahlen's topic in Unattended Windows 2000/XP/2003
1. Nope. You could put the username in the tagfile and retrieve it with a FOR command. 2. Pushd changes to the specified directory. Popd returns to the original directory. Every pushd needs a corresponding popd. 3. NUL was required in older versions of MSDOS. It looks like its not required in WinXP batch files. But anyone booting with a Win98 floppy might need it. 4. Usebackq changes the FOR command to process strings in back-quotes as commands (like Unix). Delims== sets the delimiter to = so that filenames with spaces are not broken into words by default. Type FOR /? in a command prompt window for more info. <{POST_SNAPBACK}> Is it possible then to have it return a variable that I can use in a regsistry-key?