[gnome-boxes] express,winxp,win2k3: Admin password required
- From: Zeeshan Ali Khattak <zeeshanak src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-boxes] express,winxp,win2k3: Admin password required
- Date: Sat, 26 May 2012 00:24:00 +0000 (UTC)
commit c96bbe1f83743275c5c768319aab551ced1279ff
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 f57ba8b..2044712 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 2d1a29d..da2f44d 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, string hostname) throws RegexError {
var str = base.fill_unattended_data (data, hostname);
+ 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]