Showing posts with label Batch File. Show all posts
Showing posts with label Batch File. Show all posts

Thursday, April 16, 2015

Windows and MS Office 2013 Activator

If you want to activate Window 7/8/Server 2008/2012 and Office 2010/2013 download the activator from below link:


Note: Kindly read the text file 'Read me' from the patch and then execute the patch. Also create a restore point before executing the patch.

I am not responsible for the performance or the behavior of this software/tool/crack/patch nor its effect on your computer as I have got this software/tool/crack/patch from the internet search and use it for testing purposes ONLY. Don't complain about my releases as I'm not the original releaser.

Regards,

Pradeep Kumawat

Monday, April 6, 2015

Run exe as a service

Trick to run an exe as a window service:

1. Install rktools.exe (Windows Resource Tool Kit). Download it from
http://www.microsoft.com/en-us/download/confirmation.aspx?id=17657

2. At a MS-DOS command prompt type the following command:
"path\INSTSRV.EXE" My Service "path\SRVANY.EXE"
Example:
"C:\Program Files (x86)\Windows Resource Kits\Tools\Instsrv.exe" SERVICENAME "C:\Program Files (x86)\Windows Resource Kits\Tools\Srvany.exe"

To verify if the service is created correctly, check the registry to verify that the ImagePath value under:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SERVICENAME

is set to point to SRVANY.EXE. If this is not set correctly, the service will stop and it will show an error "The service name failed to start."

3. From the above registry select newly created service and from the Edit menu, click Add Key. Type the following and click OK:
Key Name: Parameters

4. Select the Parameters key. From the Edit menu, click New - Add String Value. Type the following and click OK:
Value Name: Application
Data Type : REG_SZ
String : <path>\<application.ext>
where <path>\<application.ext> is the drive and full path to the executable application including the extension (i.e. C:\MyApp\MYUTILITY.exe)

Close Registry Editor.

Note: By default, a newly created service is run automatically when the system is restarted. To change this setting open services.msc from RUN command and select the service properties and change it's startup type accordingly.

Thank You
Pradeep Kumawat

Wednesday, July 25, 2012

IIS Web Application via Command Lines

Before a month ago I faced many problems in IIS web application directory creation via command line. I read many articles on internet and finally got the solution of it. I want to share the solution with you which helped me a lot.


In IIS 5.0C:\Inetpub\AdminScripts\mkwebdir.vbs -c Localhost -w "Default Web Site" –v "ParentWebApplication/ChildWebApplicationName","Physical Path of the Web Application Directory"

cscript C:\Inetpub\AdminScripts\adsutil.vbs appcreateinproc w3svc/1/root/ParentWebApplication/ChildWebApplicationName

In IIS 6.0
cscript %SystemRoot%\system32\iisvdir.vbs /create "Default Web Site/ParentWebApplication" "ChildWebApplicationName" "Physical Path of the Web Application Directory"

In IIS 7.0
appcmd.exe add app /site.name:"default web site" /path:/ParentWebApplication/ChildWebApplicationName /physicalpath:"Physical Path of the Web Application Directory"

You can use all the commands in a batch file too to run the task automatically via batch file.


Regards,

Pradeep Kumawat
Network & System Engineer

Saturday, January 21, 2012

How to hide files and folders using attrib command

Folder hiding is a simple way of keeping prying eyes away from your private documents. We all want to make our private folders hide. Just checking mark on ‘Hide’ button from folder’s properties is not a proper way to hide our folder. Everyone can view these hidden folders by putting check mark on ‘Show hidden files’ from folder options of the window explorer.

So today we will use Attrib command to hide our folders and files. Attrib allows a user to change the properties of a specified file and folder. Using attrib, the user has the capability of changing the file to have any of the below attributes:

Read only - allowing the file to be only viewed and not written to.
Archived - allowing Microsoft backup and other backup programs to know what files to backup.
Hidden - making the file invisible to standard users.
System - making the file an important system file.

How to hide files and folder using attrib command:

Open run window and type cmd, and then press enter. This will show you below Image:



Now type following command here
attrib +s +h <destination files/folder name with path>

Commands parameters are as follow:
+          Sets an attribute.
 -          Clears an attribute.
S          System file attribute.
H          Hidden file attribute.

For example, I have a folder in my D drive named sanjeev. I want to hide this folder using attrib command. So my command will be this:
attrib +s +h d:\sanjeev



Now this folder will not show to anyone even after putting check mark on ‘Show hidden files’ from the folder options.

To access this hidden folder you need to use run command and type full path of this folder as show below:



To unhide folder just put – sign in place of +

attrib –s –h <destination file/folder name with path>



Hope this will help you to protect your personal files and folder away from others.

Thanks & Regard

PRdeep Kumawat
Network & System Engineer