
Good Morning alll,
In a sysprep config file, is it possible to add a line that will delete a .txt file on the C drive please?
Thanks
Z

You might be best off using the "Run Once" feature which is available when creating an answer file.

Depending on who puts the file there in the first place, could you live with it being in C:\Sysprep? Then it will be removed automatically after completion.
The other thing which is really useful is cmdlines.txt. There's an MS KB article which refers to how you call it and if you search the MS web site you'll find lots more stuff about how to use it.
The downside of the runonce stuff is that it runs after the user logs on - you can also set autlogon so that may not be a big deal - but cmdlines.txt stuff runs much earlier (I think during the mini-setup process rather than after that has finished)

We have a VBS script that runs on all computers. Once it has been run it makes a .txt file as a marker. if the marker exists the script doesn't run again.
The script needs to run after sysprep so i need it to delete the marker file automatically. I would do it manually but we will most probably forget
the run once feature doesn't work with the script,if it did i would be using that.
Thanks

could use the run once feature to run a batch file to delete the .txt file?
thanks

I don't see why not. Something along the lines of:could use the run once feature to run a batch file to delete the .txt file?
Code:del C:\FILENAME.TXT /q

how do you do the run one like this?
thanksCode:[GuiRunOnce] runonce="\\server\netlogon\script.bat

You shouldn't have to do that. If you create a directory called C:\Sysprep and place all files in here (including the batch file), it'll all be deleted once Mini Setup has completed.how do you do the run one like this?

so if i just put the batch file in the sysprep folder thats all i need to do?
so i need to add any lines to sysprep.inf?
thanks
z

Within C:\Sysprep there's the Setup Manager which allows you to create a full or part answer file.
Copy the batch file into C:\Sysprep, then within Setup Manager specify the run once file you want to run. It'll add all the required information into the answer file for you. Hope this makes sense!![]()

for some reason i don't have that, can i not just put the code into the sysprep.inf file?
thanks
Z

got the code its:
[GuiRunOnce]
Command0=C:\sysprep\reset_i_drive.bat
thanks
There are currently 1 users browsing this thread. (0 members and 1 guests)