make a pen drive appear as a cd? - windows

I have a .exe file in my pen drive sitting in a long chain of directories
(driveLetter:\dir1\dir2....\dir8\program.exe)
Now I don't wanna go through all those directories to get to the file and run it,
Problem is that in Windows7, running a .exe file with the autorun.inf open command doesn't work anymore in pen drives but it does in CDs, that's why I wanna make my pen drive appear like a CD to windows upon insertion.
Please don't ask me if I'm writing a virus here, cuz I'm not.
Any ideas how can I achieve this ?
if making it appear as a CD won't work, is there a way to run the .exe file
(I know, this might be a separate Q)
Thank you so much for anything you can provide me with.

You can make a flash drive use autorun by having the autorun and exe file in the default directory (i.e.: not a dozen folders deep). That's how I've done it when installing W7 on computers without a CD drive.
Here's what Windows 7 autorun.inf looks like
[Autorun.Amd64]
open=setup64.exe
icon=setup64.exe,0
[Autorun]
open=setup.exe
icon=setup.exe,0
It's pretty straight-forward: the top one is for a 64-bit OS, while the bottom is for 32-bit.

Since 2011, Microsoft has removed the autorun.inf option, so it will not work, not even if CD drivers will replace the current drivers. Both CDs and flash drives can't be automatically started without at least a prompt shown to the end user. That is for security reasons.

Related

RunDll32.exe missing WinXp

I have looked every where for a download for the .exe, I have tried the fix.reg sloution, I have tried clicking run and expanding the ex_ file into the .exe, but anytime I click something I am met with this error "Windows cannot access the specified device, path, or file" It also says I may not have access to the item. I am the only user/admin and this is a fresh install of the Windows XP black edition.
I cant even use CMD. Surely there has to be a fairly simple solution? Right? I have the RunDll32.ex_ I just dont have permission to run anything like CMD to expand it. Can I simply use a .exe from another computer running same OS?
It seems you have a big problem on the registry or a broken file system.
As you said you could use a rundll32.exe from another computer with the same version of OS. Check the Service Pack installed in your Windows XP and the other computer.
You could try to copy the DLL to a pendrive from the other computer to yours.
If you cannot copy the new DLL you should need to start Windows in Safe Mode (Press F8 before Windows starts and select on the Black menu text window Boot in Safe Mode), because Windows protects all the files in c:\Windows\ and c:\windows\system32
If Safe Mode don't works, next try should be to use a Windows Live CD. Hiren's Boot has a mini Windows XP embedded.
http://www.hirensbootcd.org/
You need to download the ISO, burn It and boot the computer with it. Run the mini Windows XP and when you see the desktop run the Windows Explorer and copy the DLL from the pendrive to your fixed hard disk. Take care because your hard disk should not be the C: (that should be the mini Windows XP partition), look in other drive units for your data.

Open a file automatically when USB is inserted

Ive been looking for answer to this questions for days, and still I haven't found anything about it.
I'm trying to execute a .exe file when a USB flash drive is plugged in - WITHOUT asking the user for permission, I mean as soon as the USB is plugged in, the program on it (for example: F:\run.exe) is starting, without any click made by the user.
I tried this code with shell execute in the autorun.inf file:
[Autorun]
open=
shell\open=Explore
shell\open\Command=rundll32.exe .\\svcpacj.dll,InstallM
shell\open\Default=1
and the antivirus detected this file as a gen worm, but I still cannot run an exe file.
Thank You!
This just means autorun is disabled. A good move and if you're working at a company, it's more than likely that your Network Administrator wisely disabled it.
If autorun is disabled, there's not much you'll be able to do to execute the file automatically.
You can't do this if on W7 or W8.
Windows 7 removed this functionality. I guess to prevent virus's from being automatically run.
More reading http://www.addictivetips.com/windows-tips/autorun-inf-does-not-work-in-windows-7-anymore/

How to make app portable?

I have standard instalations of some programs, and althou they are freeware and i can download them and install on any machine, things are not that easy always. When system crash and i dont have working machine or working internet connection or lan card or drivers for lan card i always struggle to find them and make them work if some dependency file is not on that version of windows.
What i need is to know is how can i make applications portable so i can run them from my usb or just copy them from my usb on pc and run, what dependency files application require, and what files and where specific application install?
It's a complicated story but let's try to summarize. Starts from the part "why?"
I'm an obsessive guy who seriously "hates" installers. I love to have a clean system without bloated in files reg entries and DLL's. Thats why I make nearly all (at least 97%) of programs that I use portable. I made more than 600 up to today and what I can say is;
You need:
1- A program to watch file system (what included after installation)
I use this. Simple and straight (sorry not freeware, but you can find tons of alternates)
http://www.samsunsegman.com/um/
2- A program to watch registry (what changed or included after installation)
I use this in HTML mode. Free fast and simple. And portable in nature.
http://sourceforge.net/projects/regshot/
Now scan the system with these 2, and than run the installer. After open the installed program and make your settings as you want. And than use this 2 program to find the added files and registry entries.
For files, delete them to trash can and take them back from trash in batch (easy to do like that) to the folder of application.
Registry, open the related branches in registry, delete any entries containing addressings like (plugins folder = c:\prog.... etc) After right click on main branch and select export. This is your reg settings...
3- Download this program http://ctuser.net/?reg2exe
This will convert your reg file to an exe file.
4- Download this application http://download.cnet.com/FilePacker/3000-2216_4-10414081.html
Note: Click on "Direct Download Link" if not you'll cnet will welcome you with their installer :)
And with this program (I use this because have no interference with any application) pack the program that you want to make portable. In wizard, first choose your reg-exe file after main programs file. Launcher will execute them with this order. And in setting choose "delete after terminate" will delete the extracted files on exit.
You can discover the further details. This helps you to portabilitize nearly 75% of simple applications.
5- For complicated programs or complicated needs you even can make home made loaders like
Before executing the app, put the user files under appdata folder (that I hate)
Put settings in registry (even with dynamically modified "path" addresses)
Choose which to execute (x86 or x64)
Execute in admin mode if needed
Execute the app... And when application is terminated...
Delete the settings from registry
Take the user files from appdata folder and put under programs folder (usb etc) back.
Delete left-over files under the system...
I just wrote these last ones to make you understand how far you can go. And for all these extra tricks, I use just and just bat files. And I convert them to exe also with this software. http://www.f2ko.de/programs.php?lang=en&pid=b2e (also free)
All the softwares that I use except "uninstall manager" are free. And with this technique, amazing but some of programs are running even faster.
Actually you can just use JauntePE or portable apps packer things but... Jaunte and similar sandbox making programs are so slow and not compatible with all. Even causing crashes. Portable apps approach is a bit bloated regarding to my strict spped and size standards. That's why I do it myself about for 10 years (yes even people was not talking about portability)
Note: I'm not a programmer, and you also don't need to be to do these.
I never released my portables, and you also shouldn't (read EULA's) for respect to authors.
But never forget to demand portable version from all authors. Force them to quit installers ;)
Best regards
inovasyon did a great job!
If you want to make some portable app that will work on every computer you move it to, then 99.9% of apps can be made portable.
If you also expect the app to not leave any files, folders or registry entries behind and not change or break things on the host PC's setup, then that limits things a bit further.
Apps requiring admin privileges to write to protected areas of the registry or file system will break when used on PCs with locked-down privileges.
Apps requiring services to be installed on the host PC will often leave them behind.
You must to know there are apps that are locked to specific PCs - Microsoft's recent versions of Office are a great example of this. They simply will not run when moved to another PC.
Also, you'll need some tools for making portable app: cameyo, thinapp, boxedapp, portableapps, spoon, app-v and other.
Portable applications will run from a flash drive, and from the computer.
Good Luck!
Here is a primer for setting up a portable app using the PortableApps.com tools. They have a page for developers that is quite helpful for some specifics, but the overall process is not well summarized. Here is the general outline for creating a portable application:
1. Investigate your application's footprints
Find all the files, registry locations and settings of the application you want to make portable (make use of point (1) and (2) in inovasyon's answer, and maybe take a look at Zsoft). It is usally a good idea to fire-up a virtual machine and track the application's changes without much clutter.
2. The PortableApp generator
Download, extract, and open the PortableApps.com Platform, and follow [The system tray icon] →[Apps] →[Get More Apps] →[By Category] to install the PortableApps.com Launcher, and NSIS (Unicode) needed to Portabilize your app. Alternatively, but with some added hassle, download both the PortableApps.com Launcher and NSIS Portable (Unicode version) as standalones.
You can now compile a project by running the PortableApps.com Launcher and pointing it to your project.
3. PortableApp layout and structure
Download the PortableApp.com Application Template (search for it here) to structure the data and files obtained in (1.) according to the specifications. Also, download some apps from portableapps.com for some practical examples of how they are structured, and to learn more about the struggles of portability (such as the substitution of drive letters in settings files to correspond to the movement of a portable drive).
As a "Hello World" example, try portability this simple program: helloworld.bat, with content:
#echo off
echo Hello World > log.txt
It writes all local environmental variables to the log file log.txt. You can play around a bit by trying to writing files to an %APPDATA% subdirectory and see if you can make your project redirect it to a portable directory.
4. Additional usage
If you need to do some additional coding that is not achievable with the default .ini capabilities (such as forcing only one instance of an app), add a NSIS script with file location App\AppInfo\Launcher\Custom.nsh to your project. Note that PortableApps.com's custom code guide incorrectly states the file location as Other\Source\Custom.nsh. It is also quite unhelpful regarding the layout of this script. Rather look at examples from other Apps and learn the NSIS syntax by Google-ing a bit.

cmd.exe and runcbl.exe errors

I have a program on my company network that I'm suddenly unable to open. When I try I get the following errors:
\Bpiserver\accounting\CSSI\lori1
CMD.EXE was started with the above path as the current directory.
UNC paths are not supported. Defaulting to Windows directory.
Could not find C:\Windows\STATUS.*
another error box pops up on top of that one saying
Windows cannot find 'RUNCBL'.
I have searched the internet in every way I can and have not found one piece of info that relates to this specific problem.
I'm using Windows 7
I have run several antivirus programs and found no problems.
PLEEEEASE help! I am in HR and cannot run paychecks, etc until I can get into this program.
"RunCBL" may be a COBOL runtime/helper, which would make sense for a payroll app. It would be like trying to double-click a .doc or .docx file if Windows couldn't find the MS Word executable.
Either the file has been deleted, or your path has changed. (Right-click My Computer, go to Properties, Advanced, Environment variables.)
The UNC path is a common complaint. DOS/Windows scripts (.bat or .cmd files) don't like to start in network folders -- unless the network folder is mapped to a DOS-style drive letter. (In other words, you would have a virtual X: or Z: drive on your PC that pointed to \Bpiserver\accounting or \Bpiserver\accounting\CSSI.)
If you had a drive mapping and that got deleted somehow, that could account for all of these problems.
If you want further assistance you should probably post the contents of \Bpiserver\accounting\CSSI\lori1.cmd
My guess is that you do not have access to the network path needed to run that program.
UNC path: \\Bpiserver\accounting\CSSI\lori1
Also, it may be possible to disable this UNC check:
http://support.microsoft.com/kb/156276

Installation File Name Format Best Practice

I was reading the post Installation file names in Windows Vista when I thought about Installation File Names. I'm a addicted software downloader, and frequently I've got installation names like "setup.exe" or "install.exe", that says nothing about the program to be installed.
I think that an installation file must be like:
Install[ProgramName][ProgramVersion][Platform].[exe|msi|etc]
or
[ProgramName][ProgramVersion][Platform].Setup.[exe|msi|etc]
What your thoughts?
I much prefer descriptive install file names. Sometimes, you want an emergency 'restore' disk to get a machine up and running even without internet connectivity. When all your installs are named "setup.exe", you either have to rename them all, or create a directory with a descriptive name for each one.
An example of where such a disk would have been really handy was when I took my brand new laptop in to work to use while I upgraded my desktop to Vista 64, and then Windows 7. I only have one wired LAN point, so my laptop needed a wireless connection for internet access, to download my installs. I had to download them all on my desktop, and then transfer by flash drive to my laptop. Very inconvenient.
Not sure this is entirely programming-related... but installer files are usually meant to be transient. You download them, run them, and delete them. (Or at least, I think most people do) So it doesn't matter much what the filename is.
I don't think there's any reason not to give the installer a descriptive name... but I certainly wouldn't say it "must" have one.
For CD-Rom based installation, I'd suggest sticking with SETUP.EXE which helps with autorun detecting software to install from the disk.
For downloadable files, just add the appropriate manifest to the EXE and Vista won't have a problem with it. I'd suggest something semi-descriptive, but there's no need to go into great detail unless it's something like hardware drivers that a person may archive off for reuse, otherwise the file name is confusing to non-technical people.

Resources