FN-GM Posted September 16, 2008 Posted September 16, 2008 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
Michael Posted September 16, 2008 Posted September 16, 2008 You might be best off using the "Run Once" feature which is available when creating an answer file.
powdarrmonkey Posted September 16, 2008 Posted September 16, 2008 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.
srochford Posted September 16, 2008 Posted September 16, 2008 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)
FN-GM Posted September 16, 2008 Author Posted September 16, 2008 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
FN-GM Posted September 16, 2008 Author Posted September 16, 2008 could use the run once feature to run a batch file to delete the .txt file? thanks
Michael Posted September 16, 2008 Posted September 16, 2008 could use the run once feature to run a batch file to delete the .txt file? I don't see why not. Something along the lines of: del C:\FILENAME.TXT /q
FN-GM Posted September 16, 2008 Author Posted September 16, 2008 how do you do the run one like this? [GuiRunOnce] runonce="\\server\netlogon\script.batthanks
Michael Posted September 16, 2008 Posted September 16, 2008 how do you do the run one like this? 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.
FN-GM Posted September 16, 2008 Author Posted September 16, 2008 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
Michael Posted September 16, 2008 Posted September 16, 2008 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!
FN-GM Posted September 16, 2008 Author Posted September 16, 2008 for some reason i don't have that, can i not just put the code into the sysprep.inf file? thanks Z
FN-GM Posted September 16, 2008 Author Posted September 16, 2008 got the code its: [GuiRunOnce] Command0=C:\sysprep\reset_i_drive.bat thanks
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now