Showing posts with label Windows. Show all posts
Showing posts with label Windows. Show all posts
0
Posted on 1:41 AM by Softminer and filed under ,

TO get sid of a user, wun following command:

wmic useraccount where name="USER" get sid
wmic useraccount get name,sid

in C# can check user UserSid:

var me = WindowsIdentity.GetCurrent();
SecurityIdentifier sid = me.User;

To get Group Policy of a user in domain use

gpresult /r

More info about gpresult
0
Posted on 7:46 AM by Softminer and filed under

in firewall you can create outbound role by ip but not by url
to be able to block url in windows

‪C:\Windows\System32\drivers\etc\hosts

add to the file
0.0.0.0 www.facebook.com

#Hint: make sure there is not space
1
Posted on 5:51 AM by Softminer and filed under

To find out other sites hosted on a web server by entering a domain or IP address above.
http://www.yougetsignal.com/tools/web-sites-on-web-server/

And another solution is to get ip address by ping and use bing and search "ip:148.251.23.00"
example 
0
Posted on 3:58 AM by Softminer and filed under

Run gpedit.msc

Navigate to the following folder: Local Computer Policy –> Computer Configuration –> Windows Settings –> Security Settings –> Local Policies –> Audit Policy.

Double-click the Audit logon events policy setting in the right pane to adjust its options.

TO view in event Viewer

Navigate to the Windows Logs –> Security category in the event viewer.

Look for events with event ID 4624 – these represent successful login events.

http://www.howtogeek.com/124313/how-to-see-who-logged-into-a-computer-and-when/

Here you can search for all event ID (search for category Logon/Logoff)
http://www.myeventlog.com/search/find


Here is the list of Event ID related to log
http://technet.microsoft.com/en-us/library/cc787176(v=ws.10).aspx

672,673,674,675,676,677,678,681,682,683
0
Posted on 12:48 AM by Softminer and filed under

To disbale or enable automatic locking screen:

1. Press Win+R and type "Regedit.exe"

2. Go to the path below

HKEY_CURRENT_USER\Software\Policies\Microsoft\Windows\Control Panel\Desktop

3. EDIT "ScreenSaverIsSecure"

0
Posted on 5:42 AM by Softminer and filed under , ,

From Control panel -> Turn windows features on or off its possible to install windows Message Queuing
http://technet.microsoft.com/en-us/library/cc730960.aspx

To Send and recieve message using c# first you have to create a message queue:
http://www.codeproject.com/Articles/5830/Using-MSMQ-from-C

if(MessageQueue.Exists(@".\Private$\MyQueue"))
//creates an instance MessageQueue, which points
//to the already existing MyQueue
mq = new System.Messaging.MessageQueue(@".\Private$\MyQueue");
else
//creates a new private queue called MyQueue
mq = MessageQueue.Create(@".\Private$\MyQueue");


To Send message

System.Messaging.Message mm = new System.Messaging.Message();
mm.Body = txtMsg.Text;
mm.Label = "Msg" + j.ToString();
mq.Send(mm);


and to recieve message

try
{
mes = mq.Receive(new TimeSpan(0, 0, 3));
mes.Formatter = new XmlMessageFormatter(
new String[] {"System.String,mscorlib"});
m = mes.Body.ToString();
}
catch
{
m = "No Message";
}
MsgBox.Items.Add(m.ToString())


to See messages in windows open Computer Management and from Service applications -> Message Queuing

0
Posted on 10:03 AM by Softminer and filed under


  • So go here: C:\Users\\AppData\Roaming\Microsoft\Crypto\RSA\
  • Select all the files (named with UUIDS).
  • Move those files to your Desktop or other folder outside AppData dir.
  • Launch Fiddler, go to Tools | Fiddler Options | Enable HTTPS decryption
  • See that it works this time (hopefully).
  • Move the files back from their temp location (i.e., Desktop),
  • to their original one: C:\Users\\AppData\Roaming\Microsoft\Crypto\RSA\
  • When one of the files asks whether you want to replace the existing one, skip it.
0
Posted on 8:15 AM by Softminer and filed under , ,

To increase fastCGI PHP_FCGI_MAX_REQUESTS,

On the server level, double-click FastCGI Settings.
Select the FastCGI application that you want to configure. In the Actions pane, click Edit....

In the Edit FastCGI Application dialog box, set the InstanceMaxRequests to 10000. Next to the EnvironmentVariables setting, click the Browse (...) button.




In the EnvironmentVariables Collection Editor dialog box, add the PHP_FCGI_MAX_REQUESTS environment variable and set its value to 10000.


Note: If you do not configure these settings, the following default settings will be used: instanceMaxRequests = 200, PHP_FCGI_MAX_REQUESTS = 500 (on most PHP builds).

0
Posted on 10:43 AM by Softminer and filed under , ,

First you have to enable CGI

WINDOWS SERVER 2008

Go to Server Manager -> Roles -> Add Role Services. On the Select Role Services page, select the CGI check box. This enables both the CGI and FastCGI services.

Windows Visa/7

Go to Control Panel -> Programs and Features -> Turn Windows features on or off. In the Windows Features dialog box, select the CGI check box. This enables both the CGI and FastCGI services.


Then from Web Platform installer install "PHP Manager for IIS"
0
Posted on 9:28 AM by Softminer and filed under ,

Download link for Windows Server 2008 R2 VHD
http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=16572

Create a VM with OS: Micorosoft Windows
Version: Windows 2008 (64 bit)

Username: administrator, password: Pass@word1 (Administrator account)


MSFT VHD image is created base on the IDE Hard disk. We will need to change the Virtual Box setting.

Delete the SATA Controller shows in the setting and Add the new disk IDE controller and select the VHD image.





Active the Windows
+
0
Posted on 1:20 AM by Softminer and filed under

Windows 7 has a nice tool for capturing screen, the out put is Html file which is archived as zip file.

for more info

to run the tool type "PSR" on run command.
1
Posted on 6:08 AM by Softminer and filed under ,

To connect to remote IIS in the network from your local IIS you can use

IIS Manager for Remote administration.

It can also be installed from webplatform installer
0
Posted on 7:05 AM by Softminer and filed under



IIS Passive FTP

Configuring FTP Firewall Settings in IIS 7
1
Posted on 12:59 PM by Softminer and filed under

To remove the history of RDP (MSTSC) you have to access registry in following address:
  HKEY_CURRENT_USER\Software\Microsoft\Terminal Server Client\Default


shortcut to acess remote desktop connection is MSTSC
0
Posted on 5:11 AM by Softminer and filed under ,

Usually after a long run time of SQL service, ther process takes a lot of memory resources. by restarting the service the token memory resource will be released.

restarting can be accomplished using the

net stop
net start
A full list of the exact services is found in the registry (run regedit.exe) under the HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services key.

Alternatively, you can perform the stop and start using the name that is showed in the Services Control Panel applet by putting the name in quotes, i.e.
net stop ""
net start "
0
Posted on 7:47 AM by Softminer and filed under , ,

you can use web Deployment tool or IIS Remote manager to migrate from one IIS server to another.

Easily right click on IIS and Deploy -> Export Server Package


  • .NET Framework 2.0 SP1 or greater
  • Web Deployment Tool
  • IIS 7.0 or IIS Remote Manager



http://learn.iis.net/page.aspx/514/export-a-package-through-iis-manager/
http://www.iis.net/download/WebDeploy
0
Posted on 3:46 AM by Softminer and filed under

If you have multiple network adaptor, for example network adaptor and Lan adaptor and you want to change the default adaptor which is used by windows follow the instruction:

you have to manually add a "metric" to each interface. Windows will automatically use the interface with a lower metric. To check and change your network adapters' metric:

1. Open Command Prompt and type: route print - you will see a list of active routes, the last column displaying their "metric". Lower metric routes are preferred over higher ones.
2. Open the Network Adapter Properties (Control Panel > Network and Internet > Network Connections > right-click on adapter and choose Properties)
3. Open the properties of Internet Protocol Version 4 (TCP/IPv4).
4. Click on Advanced.
5. Untick "Automatic Metric" and set the interface metric to a number.
6. Hit OK until you close the Network Adapter properties.
7. Repeat steps 2-6 for your other network adapter(s) choosing different metrics. Remember lower metrics are preferred over higher ones.

for more information you can read:
http://support.microsoft.com/kb/299540
http://technet.microsoft.com/en-us/library/cc771274.aspx

0
Posted on 5:40 AM by Softminer and filed under

i you want to make a wireless lan which use your lan internet follow the instruction:
go to
  • Control Panel\Network and Internet\Network Connections
  • right click on your local area connection and share the connection.
  • allow you wlan connection with name "Microsft Virtual WiFi Mniport Adaptor" which is usually Wireless network Connection 2
run command prompt as administrator and type
  • netsh wlan set hostednetwork mode=allow ssid=mylan key=typepassword
and then
  • netsh wlan start hostednetwork
when you run second command then your wireless lan will be enable and you can start using it.
to disable it
  • netsh wlan set hostednetwork mode=disallow ssid=mylan key=typepassword
dont forget to enable your wlan adaptor.
0
Posted on 2:19 AM by Softminer and filed under

1. using Notepad ++
to compare files using notepad++ you need to install compare plugin
download the plugin (.ddl) from http://sourceforge.net/projects/npp-plugins/files/ComparePlugin/
go to notepad++ and from Import -> import plugin
restart notepad++

2. DiffMerge is a free product from sourcegear
http://www.sourcegear.com/diffmerge/

3. TFS (Team Foundation System) in visual studio
right click on the file and then click on compare

4. if you dont have notepad++ installed you can use winmerge
http://winmerge.org/
0
Posted on 1:52 AM by Softminer and filed under ,

Here I wanna introduce some Virtual CD

DAEMON Tools
the free version is called Deamon light which is available here

MagicISO Virtual CD/DVD-ROM
the advantage of MagicISO is that you dont need to restart windows after installation

Alcohol 120%
Alcohol 120%, is a powerful Windows CD and DVD burning software that makes it easy to create backups of DVDs and CDs.