reg query “HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment” /v PROCESSOR_ARCHITECTURE
January 25, 2012
October 27, 2011
August 26, 2011
FAQ: Python: How to get a complete list of object’s methods and attributes?
use ‘dir’ to get the details
August 24, 2011
FAQ: YUM: How to search which package has a particular file
yum whatprovides “*filename*”
May 31, 2011
Tips: FreeBasic: CopyFolder
#Include once "dir.bi" #Include once "file.bi" #Include Once "string.bi" #include once "ext/strings/strsplit.bi" #Include Once "win/shlobj.bi" sub copyfolder(dirName as string, dstdir as string) const attrib_mask = fbDirectory or fbNormal Or fbHidden Or fbSystem or fbReadOnly or fbArchive dim as uinteger out_attr dim fileName as string dim absname as String fileName = Dir(dirName + "\*", attrib_mask, out_attr) print "fileName >>>> " + fileName Do Until Len(fileName) = 0 '' loop until Dir returns empty string If (fileName <> ".") And (fileName <> "..") Then '' ignore current and parent directory entries absName = dirName & "\" & fileName ' If out_attr And fbDirectory Then dim d as string d = right(absName,Len(absName) - InStrRev(absName, "\")) Print "d = " + d Print "absName =" + absName dstDir = dstDir + "\" + d Print "DST = " + dstdir SHCreateDirectoryEx(0,StrPtr(dstDir),0) copyfolder(absName, dstDir ) Else dim d as String d = right(absName,Len(absName) - InStrRev(absName, "\")) SHCreateDirectoryEx(0,StrPtr(dstDir),0) FileCopy(absName, dstdir + "\" + d) Print "file: " + absName + " DST: " + dstDir End If End If fileName = Dir(out_attr) Loop end sub
April 13, 2011
Code: Freebasic: runas
#Include "windows.bi"
#inclib "advapi32"
Declare FUNCTION CreateProcessWithLogonW LIB "ADVAPI32" ALIAS "CreateProcessWithLogonW" ( _
byval lpUsername As LPCWSTR , _
BYVAL lpDomain AS LPCWSTR , _
BYVAL lpPassword AS LPCWSTR, _
BYVAL dwLogonFlags AS DWORD, _
BYVAL lpApplicationName AS LPCWSTR , _
BYVAL lpCommandLine AS LPCWSTR , _
BYVAL dwCreationFlags AS DWORD, _
BYVAL lpEnvironment AS DWORD, _
BYVAL lpCurrentDirectory AS LPCWSTR , _
lpStartupInfo AS STARTUPINFO, _
lpProcessInfo AS PROCESS_INFORMATION) AS LONG
Const X_CJ_LOGON_WITH_PROFILE=1
Const X_CJ_CREATE_DEFAULT_ERROR_MODE = &H04000000
FUNCTION RunAsUser(BYVAL UserName AS STRING, _
BYVAL Password AS STRING, _
BYVAL DomainName AS STRING, _
BYVAL CommandLine AS STRING, _
BYVAL CurrentDirectory AS STRING) AS boolean
Dim si AS STARTUPINFO
Dim pi AS PROCESS_INFORMATION
Dim AS String wCurrentDir,wCommandLine,wPassword,wUser,wDomain
Dim R01 AS LONG
si.cb = LEN(si)
wUser = UserName
wDomain = DomainName
wPassword = Password
wCommandLine = CommandLine
wCurrentDir = CurrentDirectory
Print wCommandLine & "TEST"
R01 = CreateProcessWithLogonW(wUser,wDomain,wPassword, _
X_CJ_LOGON_WITH_PROFILE, 0&, wCommandLine, _
X_CJ_CREATE_DEFAULT_ERROR_MODE, 0&, wCurrentDir, si, pi)
IF R01 0 THEN
CloseHandle pi.hThread
CloseHandle pi.hProcess
Return TRUE
ELSE
Return FALSE
END If
End FUNCTION
Dim As Long R01
Dim As String user_name,password,domain,program,workingDir
user_name="username"
password="pa$$word"
domain="domain"
program="C:\\windows\\notepad.exe"
workingDir="C:\\windows"
R01=RunAsUser(user_name,password,domain,program,workingDir)
March 22, 2011
Compile juce dll using code::block and mingw.
- Import solution from “Build\VisualStudio2008_DLL”
- add liboleaut32; libshell32.a; libole32.a; libvfw32.a; libwinmm.a; libwininet.a;libws2_32.a; libdsound.a; libwsock32.a; libwldap32.a; libkernel32; libopengl32.a; libglu32.a; libuuid.a; librpcrt4.a; libgdi32.a; libcomdlg32.a; libversion.a; libdsound.a; libshlwapi.a in library.
- add “#ifndef _WIN32_WINNT
#define _WIN32_WINNT 0×0501
#endif” when you get “error: ‘getaddrinfo’ was not declared in this scope“ error while compiling. - Set -mach=i586 in compilation option.
libdsound.a
libole32.a
libwinmm.a
libgdi32.a
libuuid.a
libshell32.a
libvfw32.a
librpcrt4.a
March 2, 2011
Bug: Zune: File fails to sync with Zune
When I first got zune for myself, I was very happy that for only $90 I am getting 30GB Zune, but in few days only i found that it is not for persons like me, who like freedom and simplicity.
Anyway one of the biggest problem I found was that Zune can not be sync’ed on Linux because Microsoft forgot that there might be people (like me) who might not have Windows as Operating System.
February 24, 2011
FAQ: RUBY: Error: can not set user with registry or opaque
ERROR: While executing gem ... (URI::InvalidURIError) can not set user with registry or opaque
If you see the following error then check that your proxy should have protocol set properly, such as http://, ftp:// etc.
ie http_proxy=http://proxy.server.com:8080
February 5, 2011
Enjoy: Makemytrip sending people to past
Try the following.
- Launch makemytrip.com, select origin as “Bangalore” and destination as “Cochin” and search
- Check the flight by goair which starts at 23:55 hrs and reaches destination at 00:55 hours. and makemytrip.com predicts that total time taken is -23:00 hrs
February 2, 2011
RPM Interview Questions
Q: How to install packages with all the dependency packages if all the packages are available at a common repository?
Ans : rpm –ivh –aid packagename.
Q: How to check, where a particular package installed it’s configuration files.
Ans : rpm –qc packagename.
Q: How to check the change log of the installed package.
Ans : rpm -q –changelog packagename.
Q: How to check, where a particular package installed it’s doc files.
Ans : rpm -qd packagenme
Q: How to check all the files installed by package?
Ans : rpm -q –filesbypkg packagename
Q: How to check the version of files installed by a package
Ans : rpm -qi packagename
Q: How to check the dependencies for a particular packages i.e. Required libraries packages etc.
Ans : rpm -q -R packagename.
Q: How to upgrade the packages which are already installed on to the linux box.
Ans : rpm -F install options packagename.
Q: What is the command to update only the rpm database.
Ans : rpm -i –justdb packagename
Q: What is the command to check whether a particular package installation would be successful but would not actually install the package.
Ans : rpm -ivh –test packagename
Q: How to check that a particular file belong to which package
Ans : rpm -qf filename
Q: How to list files in a package
Ans : rpm -ql packagename
Q: How to verify whether the files installed by package are intact or been tampered/corrupted.
Ans : rpm -qs packagename
Q: What is the command to create a new RPM Database
Ans : rpm –initdb
Q: What is the command to rebuild the RPM Database
Ans : rpm –rebuilddb
November 30, 2010
New MSI Interview Questions.
- How to add font files in an MSI package without using Wise Package Studio’s File Display Section.
- Difference between deferred & immediate custom action.
- What will you do if you can’t solve a issue in a package.
- How to add shortcuts to startup folder.
- Which applications should not be repackaged in MSI
- Which & why files are stored in C:\Windows\Installer
- What are the differences between patching, update & upgrade
- How to view to installation log files, which third party tools can be used for this task.
- Where can I find the schema of MSI file.
- How will you get the table details by using MSI SDK but not using ORCA.
- How can Network Shortcuts be added in an MSI Package.
- How to install certifications using MSI
- What are the advantages of admin install
- What condition on CA will allow to “Install” and “repair” but not at “uninstall”
- How to create nested MSI Installation
- How to create MST file from two MSI files.
- How to ensure that MSI gets installed only on WinXPSP3, win 7 and IE 8
November 27, 2010
Hindi Version of Free Softwares
The C-DAC has derived few Open source software’s, they can be downloaded from http://www.ildc.in/Hindi/hdownloadhindi.html. They have also for various other Hindi Languages.
November 15, 2010
TIPS: BatchFile : Directory Path of an executing Batch file
%~dp0 will be the directory path of the executable batch file.
October 12, 2010
October 1, 2010
Alpha 1 Version of App-V Interview Questions
Dear All,
My first try to consolidate all the app-v interview questions. http://sourceforge.net/projects/softgridhelper/files/Documentations/AppV%20Interview%20Questions_Ver_0.0.1Alpha1.pdf/download
As always your comments and suggestions are most welcome.
Enjoy,
Mayank Johri
September 28, 2010
updated MSI Questions. Ver.: Alpha 4
Hello all,
I have updated the MSI Interview Questions, the updated document can be downloaded from http://sourceforge.net/projects/mayadeploy/files/FAQ/FAQ%20on%20MSI%20packaging%20and%20repackaging_0.0_1Beta4.pdf/download.
Enjoy solving the last 3 questions.
As always the questions & answers might be wrong.
so please correct me if that is the case
.
Enjoy,
Mayank Johri
August 8, 2010
FAQ: Valid OS Tag Values in an OSD File.
| Target OS | OSD Tag Value | Minimal AppV Client |
| Windows NT | VALUE=”WinNT”/> | 4.1 |
| Windows 2000 | VALUE=”Win2K”/> | 4.1 |
| Windows 2000 Server | VALUE=”Win2KSvr”/> | 4.1 |
| Windows 2000 Terminal Server | VALUE=”Win2KTS”/> | 4.1 |
| Windows XP | VALUE=”WinXP”/> | 4.1 |
| Windows XP x64 | VALUE=”WinXP64″/> | 4.6 x64 |
| Windows Server 2003 | VALUE=”Win2003Svr”/> | 4.1 |
| Windows Server 2003 Terminal Server | VALUE=”Win2003TS”/> | 4.1 |
| Windows 2003 Terminal Server x64 | VALUE=”Win2003TS64″/> | 4.6 x64 |
| Windows Vista | VALUE=”WinVista”/> | 4.2 |
| Windows Vista x64 | VALUE=”WinVista64″/> | 4.6 x64 |
| Windows 2008 Terminal Server | VALUE=”Win2008TS”/> | 4.5 |
| Windows 2008 Terminal Server x64 | VALUE=”Win2008TS64″/> | 4.6 x64 |
| Windows 7 | VALUE=”Win7″/> | 4.5 sp1 |
| Windows 7 x64 | VALUE=”Win764″/> | 4.6 x64 |
| Windows 2008 R2 Terminal Server x64 | VALUE=”Win2008R2TS64″/> | 4.6 x64 |
July 25, 2010
FUN: Greatest Discount: REAL
Few years back I went to Toys R US and found the discount and took the snap. Now I am sharing it with everyone.
July 24, 2010
FAQ: MSI Interview
I am posting the first draft of FAQ of MSI packaging & repackaging. It can be downloaded from here or here.
Download the latest from http://sourceforge.net/projects/mayadeploy/files/FAQ/



Restarted working on mayaDeploy
Tags: App-V, Package Management, Request for Comments
I have restarted the coding of mayadeploy, a Full Package Management Solution for Small Business, It will be re-coded in Python & G++, using WX as GUI library.
Few silent features are as follows,
as always i am requesting yours comments and suggestions to make it a success.