Question

Locked

Question about Documents And Settings

By Slayer_ ·
I got a task, during an update, I need to delete shortcuts (Fun eh). Both the install made, and any extras the user may have made. I already am pretty sure of the way to examin shortcuts, now I just need to find them.

Indexing files is of course easy, and searching for LNK file extensions is a breaze.

But the trick is, these damn things could be in any user folder.

Basically, I need to search every folder and subfolder in the Documents And Settings folder.

I want to avoid hard coding this, because doesn't Vista or W7 already have this folder renamed?

I was looking at environment variables, but only two that I see seem close.

"ALLUSERSPROFILE"
"USERPROFILE"

Both are close, requiring only one step up, which can be done easily enough, but if there is a way to go straight to the folder I want, I want to do that.


Admin access to these folders is a must for the basic installs, so I should have access to everything in the documents and settings folders.

We don't support systems older than Windows 2000, so legacy isn't a big issue. Just future planning.


Suggestions anyone?

This conversation is currently closed to new comments.

33 total posts (Page 1 of 4)   01 | 02 | 03 | 04   Next
| Thread display: Collapse - | Expand +

All Answers

Collapse -

delete shortcuts or the entire program

by Screen Gems In reply to Question about Documents ...

Not sure what your trying to accomplish...

the shortcut is basically a batch file for the .exe file in program files folder. typically program files or the [x86] program files folder for those systems running 64 bit.

Deleting the shortcut doesn't delete the application. you can still run it from program files .exe

For windows vista and 7 simply right click the shortcut, choose properties, shortcut tab, and open folder to view the target path and you can open the folder to find the .exe file.

you can also change the target for the shortcut so if you move the program somewhere else, you can specify a new path to the .exe file.

Collapse -

LOL You completely missed the point

by Slayer_ In reply to delete shortcuts or the e ...

I didn't think I needed to be this specific.

Fine. :)

During the inplace upgrade, there is a NEW EXE to run, this EXE, simply updates all files on the local machine, then runs the OLD EXE.

However, if their shortcuts do not link to the new EXE, then they will not run this updator. This will cause a crazy number of file not founds, bad DLL registration, etc. Tones of errors, from the simple matter of having the wrong shortcut.

So during this update, I need to delete these shortcuts. This update is applied on mass to roughly 800k computers.

Collapse -

ohhhhhhh ok :)

by Screen Gems In reply to LOL You completely missed ...

Duh! :)

but how come you don't use the installshield intelli-updaters? :)

is this one of them there new fangled proprietary applications that the developers didn't follow standard windows desgin protocols... like for APIs and DLLs?

Or!! are you updating the entire machine? meaning not only operating system but all files and folders? I'd just deploy a new image that's been updated.....:)

Collapse -

more like

by Slayer_ In reply to ohhhhhhh ok :)

This program has existed since the days of DOS and we must maintain the original databases and file structures.

Was invented before the days of installers. You just drop files in the right places manually.

Collapse -

ah well you didn't mention that :)

by Screen Gems In reply to more like

but... this is legacy program? most legacy programs simply won't run on Vista or 7. heck some won't run on XP

Collapse -

It's been upgraded...

by Slayer_ In reply to ah well you didn't mentio ...

We just finally got our last client off our 16bit version. The y2k issue finally got them.

The original developers didn't expect this thing to be used for 30 years lol.

We are currently working on making the system work on locked down machines. It works right now, but not smoothly.
Part of the problem is caused by this new EXE, it not only checks and updates files in the install (Of which we insure you have admin access too) but it also will go through your system folders and update OCX's, DLL's, etc. This is the part that needs fixing. Otherwise the automatic updater doesn't work.

Collapse -

Maybe I am missing something too

by IC-IT In reply to LOL You completely missed ...

Why not just have the code rename the old.exe and then rename itself to the old.exe name?
It would seem that what ever shortcut they use to launch the old exe would then run the new one which inturn would call the old one.

Collapse -

Because...

by Slayer_ In reply to Maybe I am missing someth ...

Normal and fresh installs work fine. It just these upgrade installs. We are replacing another vender that we had originally sold the rights to develop on our platform. However their license has expired, and our product sunsets theirs. Though we both use the same platform, how our's run is fundementally different. For example, their version ran soley off the network, while ours, automatically checks and downloads the common access files to the local system. It's our piece that fires up first THEN runs the platform.
The platform, is not developed by us, the platform was developed 15 years ago. The people that developed it have long since left the company, so we cannot change it. That includes the primary EXE it runs.
Our resolve is to make a new EXE, that handles what we want, then fires up the platform.

The other companies version, did not do this, it just straight fired the platform.

So if you fire up the platform directly on our system, it doesn't grab updates, so when it looks for the local files, it crashes.
Even funnier, you can run the correct one (we immediately run it after an install to verify its working), and after it is run once, you CAN just run the platform directly. And that will work fine, until we send out patches, which then the local clients won't get cause they aren't running our updater. This is when it will start to break down. If the files on the server, cannot work with the files on the local machine, then it starts to fall apart.


Put simply, you can't change the platform. That's like using a Bazooka to open a locked door, you can do it, but its overkill and will cause more problems in the long run.

Collapse -

Ouch - That is a nightmare, Have fun < NT >

by IC-IT In reply to Because...
Collapse -

Meh, Tis the life of a programmer

by Slayer_ In reply to Ouch - That is a nightmar ...

Programmers spend 90% of their time maintain other programmers blunders. 10% is making our own blunders :).

Back to Windows Forum
33 total posts (Page 1 of 4)   01 | 02 | 03 | 04   Next

Related Forums