Recently I was asked to configure a laptop to be very closed, i.e, disable most of communications with internet, external spaces, etc, and from the work i found the trick to disable the use of USB mass storage device without disabling all the USB ports, see below:
When a external USB storage device is plugged into the computer, a new tree node "USB mass storage device" in "Device Manager>Universal Serial Bus Controller" will show, so go straight to disable it will disable use of USB storage devices including thumbdrives, if you have tried it, you will notice after it has been disabled, plugging in the thumbdrive will not be detected any more : )
Another way is to edit the registry value, under 'HKEY Local Machine > System > CurrentControlSet > Services > USBStor', change the start value to 4, which results in similar consequences, that the plugged in device will not be detected.
Friday, March 19, 2010
Tuesday, February 23, 2010
Uninstall IE 8
Last week I decided to install IE 8 to my work laptop, but after install completed and rebooted, when I tried to start the browser, it poped out error msg saying Urlmon.dll got problem; I tried re-register all relevant dlls but still pops out same error msg, no other choice but to remove IE 8, and the problem is how?
I remembered we can uninstall IE 8 thru control panel>add/remove function, but I didnt see IE 8 listed as usual, reason is that I didnt have XP SP3 installed before IE 8..yet god bless me there is another way, by executing 'spuninst.exe' cant remember where it located : (
I remembered we can uninstall IE 8 thru control panel>add/remove function, but I didnt see IE 8 listed as usual, reason is that I didnt have XP SP3 installed before IE 8..yet god bless me there is another way, by executing 'spuninst.exe' cant remember where it located : (
Sunday, February 7, 2010
Using diskpart to delete & merge ubuntu partition in Winsows 7
I have ubuntu 9.0 installed but seldom use it, so I decided to delete this 10 Gb partition to free space.
Initially, I want to make use of some software tools like Norton Partition Magic, but am too lazy to download one, so I make use of the built-in disk part utility, and finish the work successfully just following several simple steps:
Microsoft DiskPart 版本 6.1.7600
Copyright (C) 1999-2008 Microsoft Corporation.
在计算机上: #########
DISKPART> list disk
磁盘 ### 状态 大小 可用 Dyn Gpt
-------- ------------- ------- ------- --- ---
磁盘 0 联机 74 GB 1024 KB
DISKPART> select disk 0
磁盘 0 现在是所选磁盘。
DISKPART> list partition
分区 ### 类型 大小 偏移量
------------- ---------------- ------- -------
分区 1 主要 24 GB 31 KB
分区 0 扩展的 50 GB 24 GB
分区 2 逻辑 39 GB 24 GB
分区 3 逻辑 10 GB 64 GB <--- This is the ubuntu partition
DISKPART> select partition 3
分区 3 现在是所选分区。
DISKPART> delete partition
DiskPart 成功地删除了所选分区。
DISKPART> list disk
磁盘 ### 状态 大小 可用 Dyn Gpt
-------- ------------- ------- ------- --- ---
* 磁盘 0 联机 74 GB 10 GB
DISKPART> list volume
卷 ### LTR 标签 FS 类型 大小 状态 信息
---------- --- ----------- ----- ---------- ------- --------- --------
卷 0 E GRMCPRFRER_ UDF DVD-ROM 2483 MB 正常
卷 1 C NTFS 磁盘分区 24 GB 正常 系
统
卷 2 D NTFS 磁盘分区 39 GB 正常
DISKPART> select volume d
卷 2 是所选卷。
DISKPART> extend
DiskPart 成功地扩展了卷。
DISKPART> list volume
卷 ### LTR 标签 FS 类型 大小 状态 信息
---------- --- ----------- ----- ---------- ------- --------- --------
卷 0 E GRMCPRFRER_ UDF DVD-ROM 2483 MB 正常
卷 1 C NTFS 磁盘分区 24 GB 正常 系统
* 卷 2 D NTFS 磁盘分区 50 GB 正常
DISKPART>
Initially, I want to make use of some software tools like Norton Partition Magic, but am too lazy to download one, so I make use of the built-in disk part utility, and finish the work successfully just following several simple steps:
Microsoft DiskPart 版本 6.1.7600
Copyright (C) 1999-2008 Microsoft Corporation.
在计算机上: #########
DISKPART> list disk
磁盘 ### 状态 大小 可用 Dyn Gpt
-------- ------------- ------- ------- --- ---
磁盘 0 联机 74 GB 1024 KB
DISKPART> select disk 0
磁盘 0 现在是所选磁盘。
DISKPART> list partition
分区 ### 类型 大小 偏移量
------------- ---------------- ------- -------
分区 1 主要 24 GB 31 KB
分区 0 扩展的 50 GB 24 GB
分区 2 逻辑 39 GB 24 GB
分区 3 逻辑 10 GB 64 GB <--- This is the ubuntu partition
DISKPART> select partition 3
分区 3 现在是所选分区。
DISKPART> delete partition
DiskPart 成功地删除了所选分区。
DISKPART> list disk
磁盘 ### 状态 大小 可用 Dyn Gpt
-------- ------------- ------- ------- --- ---
* 磁盘 0 联机 74 GB 10 GB
DISKPART> list volume
卷 ### LTR 标签 FS 类型 大小 状态 信息
---------- --- ----------- ----- ---------- ------- --------- --------
卷 0 E GRMCPRFRER_ UDF DVD-ROM 2483 MB 正常
卷 1 C NTFS 磁盘分区 24 GB 正常 系
统
卷 2 D NTFS 磁盘分区 39 GB 正常
DISKPART> select volume d
卷 2 是所选卷。
DISKPART> extend
DiskPart 成功地扩展了卷。
DISKPART> list volume
卷 ### LTR 标签 FS 类型 大小 状态 信息
---------- --- ----------- ----- ---------- ------- --------- --------
卷 0 E GRMCPRFRER_ UDF DVD-ROM 2483 MB 正常
卷 1 C NTFS 磁盘分区 24 GB 正常 系统
* 卷 2 D NTFS 磁盘分区 50 GB 正常
DISKPART>
Thursday, January 21, 2010
7 months after work
As I didnt notice, it is already 6 months since I joined work; at the time, I decided I would study the typical Java enterprise web application I am working on and master related technologies, but seems the progress is a bit out of expectation, as I became lazier and lazier day by day, also without a systematic study, I learnt nearly nothing so far.
Whenever system encounters problems, I throw them to our developer and help only when problems are resolved, I helped with patching, migrating updates, etc, not development, and didnt read function specs or technical specs; didnt utilise my time to do self study, or learn from my colleagues..
When I was having lunch with my one colleague today, he encouraged me to take the time & chance to learn, to grow, he is 30 already yet he works much harder than i do, he works overtime for 3 or more hours, but I will escape home much earlier; he reads technical notes everyday but I dont, what a shame to be 22 but have no passion at all..
Whenever system encounters problems, I throw them to our developer and help only when problems are resolved, I helped with patching, migrating updates, etc, not development, and didnt read function specs or technical specs; didnt utilise my time to do self study, or learn from my colleagues..
When I was having lunch with my one colleague today, he encouraged me to take the time & chance to learn, to grow, he is 30 already yet he works much harder than i do, he works overtime for 3 or more hours, but I will escape home much earlier; he reads technical notes everyday but I dont, what a shame to be 22 but have no passion at all..
Saturday, August 15, 2009
Google makes me feel sick
My adsense account was suspended (or disabled whatever) by google some time ago, i didnt know of that before although I was not able to see the ads on this site, at the time, i thought it was blocked by company's network, but it wasnt and I checked my mailbox to find the email notifying me of the suspension.
I was not happy with that, definitely, although I indeed have done some tricks like false clicks, etc, and at the time of account suspension, ad income counted up to 50 bucks; google didnt give clear explanations why they disabled it, instead, just mentioned that my account has incurred adverse effects on their ad providers, which made me feel very very sick.
Because google just kicks you away after you have contributed some benefits by either self-clicking the ads or other ways, and they get the benefits and never share with you guys, later they just send an email which doesnt explain anything regarding the account suspension. I quite doubt how many people actually get the shares of benefits from google? On the contrary, how many of us put google ads on our site?
Anyway, i will never try to re-activate my adsense account, it makes me feel sick, and what google claims of "do no evil" makes me even feel sick..
I was not happy with that, definitely, although I indeed have done some tricks like false clicks, etc, and at the time of account suspension, ad income counted up to 50 bucks; google didnt give clear explanations why they disabled it, instead, just mentioned that my account has incurred adverse effects on their ad providers, which made me feel very very sick.
Because google just kicks you away after you have contributed some benefits by either self-clicking the ads or other ways, and they get the benefits and never share with you guys, later they just send an email which doesnt explain anything regarding the account suspension. I quite doubt how many people actually get the shares of benefits from google? On the contrary, how many of us put google ads on our site?
Anyway, i will never try to re-activate my adsense account, it makes me feel sick, and what google claims of "do no evil" makes me even feel sick..
Sunday, August 2, 2009
SQL reviewed
It is long time since last update, as every day I was engaged in busy work, and for last whole week I was assigned to clean up data for several database dump files, each with around several thousands of records, and during the work, I got chances to review SQL. Following are some notes:
1. To select across tables->Join
e.g., select a.* from tbl1 a join tbl2 b on a.field1=b.field2 where field3...
2. To view records by groups-> group by
e.g., select count(*), field1, field2 from tbl1 group by field1, field2
3. To_Char() function
e.g., select to_char(field1, 'YYYYMMDD') from tbl1
4. Besides that, i learnt a bit of PL/SQL also, which helps to write complex queries to do complex data manipulations.. however, still on the go.
1. To select across tables->Join
e.g., select a.* from tbl1 a join tbl2 b on a.field1=b.field2 where field3...
2. To view records by groups-> group by
e.g., select count(*), field1, field2 from tbl1 group by field1, field2
3. To_Char() function
e.g., select to_char(field1, 'YYYYMMDD') from tbl1
4. Besides that, i learnt a bit of PL/SQL also, which helps to write complex queries to do complex data manipulations.. however, still on the go.
Saturday, July 25, 2009
Modify group policy to gain/restrict access rights for windows account
As I started to work, I loaned a laptop from company. It works fine and it is more advanced than my own, however, it is really annoying to find that certain functionality are restricted to access, although I gained the administrator role, those functions were disabled before they loaned it to me, one of which is that I cant access screen saver tab in desktop properties, while by default it is set to start every 5 mins and be password protected on resume, which is quite inconvenience for me as I dont want to input the long password every time I come back to my laptop.
Later I found that I can enabled the tab in group policy, so I tried. Type gpedit.msc from Run, and go to display directory as shown below:
(User Configuration-Administrative Templates-Control Panel-Display)

In the right panel, you can see a list of functionality you can configure, e.g, hide the screensaver tab, etc, by default, the state is "not configured", if you find that the state is same as default, this means that they control the setting from the registry, not thou group policy. In this case, we have to go to registry and delete/modify corresponding registries. Details are as followings:
Delete "ScreenSaverIsSecure" from:
HKEY-Current User\Software\Policies\Microsoft\Windows\Control Panel\Desktop HKEY-Local Machine\Software\Policies\Microsoft\Windows\Control Panel\Desktop
Later I found that I can enabled the tab in group policy, so I tried. Type gpedit.msc from Run, and go to display directory as shown below:
(User Configuration-Administrative Templates-Control Panel-Display)
In the right panel, you can see a list of functionality you can configure, e.g, hide the screensaver tab, etc, by default, the state is "not configured", if you find that the state is same as default, this means that they control the setting from the registry, not thou group policy. In this case, we have to go to registry and delete/modify corresponding registries. Details are as followings:
Delete "ScreenSaverIsSecure" from:
HKEY-Current User\Software\Policies\Microsoft\Windows\Control Panel\Desktop HKEY-Local Machine\Software\Policies\Microsoft\Windows\Control Panel\Desktop
Thursday, July 9, 2009
Clean Up Oracle
It is the first time I use Oracle for my work, and the version is 9i.
However, there was a problem for my first time installation, so I just uninstalled the program and tried to reinstall it, and the problem came.
Because I didnt drop existing databases first before uninstalling Oracle, when I reinstalled it and tried to create global database and SID, an error saying that "SID already exists..", as there are so many services running in windows after Oracle had been installed, even it was removed later, the services were somehow still running in the back-end, and there were some files in the directory that could not be removed!
To totally clean up previous install, there are certain things to do and the most important is to remove the registry entries for corresponding services, including:
HKEY_LOCAL_MACHINE/SOFTWARE/ORACLE
HKEY_LOCAL_MACHINE/SYSTEM
----Controlset001/services/%oracle_services%
----Controlset002/services/%oracle_services%
HKEY_LOCAL_MACHINE/SYSTEM/
----Controlset001/ENUM/Root/Legacy%Oracle_services%
----Controlset002/ENUM/Root/Legacy%Oracle_services%
Note that to delete the entries in ENUM under SYSTEM directory, we need log into the system as administrator so that to get the permission.
However, there was a problem for my first time installation, so I just uninstalled the program and tried to reinstall it, and the problem came.
Because I didnt drop existing databases first before uninstalling Oracle, when I reinstalled it and tried to create global database and SID, an error saying that "SID already exists..", as there are so many services running in windows after Oracle had been installed, even it was removed later, the services were somehow still running in the back-end, and there were some files in the directory that could not be removed!
To totally clean up previous install, there are certain things to do and the most important is to remove the registry entries for corresponding services, including:
HKEY_LOCAL_MACHINE/SOFTWARE/ORACLE
HKEY_LOCAL_MACHINE/SYSTEM
----Controlset001/services/%oracle_services%
----Controlset002/services/%oracle_services%
HKEY_LOCAL_MACHINE/SYSTEM/
----Controlset001/ENUM/Root/Legacy%Oracle_services%
----Controlset002/ENUM/Root/Legacy%Oracle_services%
Note that to delete the entries in ENUM under SYSTEM directory, we need log into the system as administrator so that to get the permission.
Subscribe to:
Posts (Atom)