[gnome-boxes/gnome-3-4] express, winxp, win2k3: Admin password required
- From: Zeeshan Ali Khattak <zeeshanak src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-boxes/gnome-3-4] express, winxp, win2k3: Admin password required
- Date: Fri, 8 Jun 2012 16:38:12 +0000 (UTC)
commit ff84f69594e79ea8d52858fbc9b1ff7f5a54a6b0
Author: Zeeshan Ali (Khattak) <zeeshanak gnome org>
Date: Tue May 22 20:32:20 2012 +0300
express,winxp,win2k3: Admin password required
We need to set admin password to "*" to unset it. The same is not true
for 'net' commandline we use to setup user account so we need to do
admin password substitution differently for Windows XP and 2003.
http://unattended.msfn.org/unattended.xp/view/web/19/#guiunattended
https://bugzilla.gnome.org/show_bug.cgi?id=676834
data/winxp.sif | 2 +-
src/winxp-installer.vala | 4 ++++
2 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/data/winxp.sif b/data/winxp.sif
index 25888e4..b1156d0 100644
--- a/data/winxp.sif
+++ b/data/winxp.sif
@@ -14,7 +14,7 @@
UnattendSwitch="Yes"
[GuiUnattended]
- AdminPassword="BOXES_PASSWORD"
+ AdminPassword="BOXES_XP_ADMIN_PASSWORD"
EncryptedAdminPassword=NO
OEMSkipRegional=1
TimeZone=35
diff --git a/src/winxp-installer.vala b/src/winxp-installer.vala
index 554b2d3..ddc4142 100644
--- a/src/winxp-installer.vala
+++ b/src/winxp-installer.vala
@@ -5,6 +5,7 @@ private class Boxes.WinXPInstaller: WindowsInstaller {
private const uint[] allowed_dash_positions = { 5, 11, 17, 23 };
private static Regex key_regex;
+ private static Regex admin_pass_regex;
private Gtk.Entry key_entry;
@@ -13,6 +14,7 @@ private class Boxes.WinXPInstaller: WindowsInstaller {
static construct {
try {
key_regex = new Regex ("BOXES_PRODUCT_KEY");
+ admin_pass_regex = new Regex ("BOXES_XP_ADMIN_PASSWORD");
} catch (RegexError error) {
// This just can't fail
assert_not_reached ();
@@ -73,6 +75,8 @@ private class Boxes.WinXPInstaller: WindowsInstaller {
protected override string fill_unattended_data (string data) throws RegexError {
var str = base.fill_unattended_data (data);
+ var admin_pass = (password != "") ? password : "*";
+ str = admin_pass_regex.replace (str, str.length, 0, admin_pass);
return key_regex.replace (str, str.length, 0, key_entry.text);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]