Creating a self deleting executable using .NET

I am trying to create a GPS based warning system for speedcameras for the 
Windows Mobile 5.0 (or higher) platform. One of the features of the 
application is that it has an "erase" button that automatically closes down 
the application and deletes the executable. This is because this type of 
software is legally not allowed in all european countries (like switzerland) 
and I want to give the user the option to remove the software before entering 
such countries. It's essential that no trace of the software is left after 
the erase. 

I have been trying to find a technical solution for this feature but it has 
proven to be much harder than I thought. The problem is that the physical 
executable file is locked and can't be deleted as long as the executable is 
running. 

I found some quite interesting articles explaining the problem in more 
detail and also explaining some possible solutions. An example of a very 
usefull article on this subject can be found on: 
http://www.catch22.net/tuts/selfdel

Unfortunately the solutions in the article require C++ and I am trying to 
achieve a solution that will work in C#.NET. Is there anybody who 
can help me a bit further with this problem ? Any help is appreciated.
0
Utf
11/21/2009 8:31:01 AM
dotnet.languages.csharp 1931 articles. 0 followers. Follow

8 Replies
1066 Views

Similar Articles

[PageSpeed] 54

PeterW wrote:
> I am trying to create a GPS based warning system for speedcameras for the 
> Windows Mobile 5.0 (or higher) platform. One of the features of the 
> application is that it has an "erase" button that automatically closes down 
> the application and deletes the executable. This is because this type of 
> software is legally not allowed in all european countries (like switzerland) 
> and I want to give the user the option to remove the software before entering 
> such countries. It's essential that no trace of the software is left after 
> the erase. 

Even ignoring the specific functionality of the application, that seems 
like a needless feature to me.  A regular uninstall should be able to 
remove the program just as well.  Just tell your users to use the normal 
uninstall that's part of your program's setup.

Alternatively, just use the "RunOnce" registry key, and have the users 
reboot as part of the deletion process (so that the command you add to 
the "RunOnce" key can be executed...this presumes that "RunOnce" and 
rebooting is supported on Windows Mobile, which I don't know much about).

Besides, the idea that the user will erase "all traces" of the software 
also seems somewhat misplaced.  A user using the software who just 
happens to be traveling through some country where the software is 
illegal isn't going to delete the software permanently.  Presumably they 
intend to reinstall at some later point, and they very well may keep a 
copy on their person for that purpose (in case, for example, they 
anticipate having trouble getting online).

> I have been trying to find a technical solution for this feature but it has 
> proven to be much harder than I thought. The problem is that the physical 
> executable file is locked and can't be deleted as long as the executable is 
> running. 
> 
> I found some quite interesting articles explaining the problem in more 
> detail and also explaining some possible solutions. An example of a very 
> usefull article on this subject can be found on: 
> http://www.catch22.net/tuts/selfdel
> 
> Unfortunately the solutions in the article require C++ and I am trying to 
> achieve a solution that will work in C#.NET. Is there anybody who 
> can help me a bit further with this problem ? Any help is appreciated.

It seems to me there are a number of "good" suggestions (inasmuch as the 
idea is one needing solving, which is debatable :) ) in the article (and 
some not-so-good...the "inject code into another process" idea is awful, 
and probably won't work on any computer with DEP enabled).

In addition, generally anything you can do in C++, you can do in C#. 
You may have to use p/invoke to access unmanaged Win32 features, but 
otherwise it should work.  I note that a number of the examples have an 
asm block, but as near as I can tell for the most part that's just 
obfuscation.  You should be able to achieve the same results just by 
calling the appropriate functions normally.

Of all those suggestions in the article, I would say that the 
"DELETE_ON_CLOSE" method is probably the most convenient and reliable of 
the various choices.  It actually uses built-in, OS-supported API to do 
the work rather than trying to hijack some other mechanism to do the 
work.  Best of all, there's nothing about it that requires you to be 
running unmanaged code; you should be able to do the whole thing as 
managed code.

Some modifications I'd make to the suggestion though:

     -- Just write a stand-alone deletion application that you use to 
create the temporary "DELETE_ON_CLOSE" file.  Compile it, store it in 
your main application's resource data, and then just write it out the 
file at the appropriate time (it should be very small).  (I see that 
this is included as "an alternative method" at the very end of that 
suggestion).

     -- Don't mess around with the sleeping logic.  Instead, use a 
reliable inter-process mechanism for the main application and the 
deletion application to communicate (e.g. named Mutex, sockets, pipe, etc.).

Of course, all this assumes this is actually a feature you should be 
spending your time on.  Honestly, it seems to me it's not.  Just make 
sure your uninstall works as it's supposed to and removes "all traces" 
of the program.  Then just tell your users to use that instead.

And tell your European governments that are putting up speed cameras to 
do it the way other civilized governments do it: announce the locations 
of cameras with signs.  Then, the cameras serve more as an actual speed 
control mechanism rather than a revenue-enhancement mechanism.  That 
way, you don't even need your application.  :)

Pete
0
Peter
11/21/2009 9:47:23 AM
The reason why I want to implement a self delete rather than letting the user 
uninstall the application manually is that the last one is quite a cumbersome 
process to do while you are driving. I want a big button on the touchscreen 
that does the entire job automatically when pressed. 

I have investigated if I can use the Delete_On_Close method but I got stuck 
with that. I created a seperate helper executable that deletes my main 
executable. This helper executable is loaded into the main executable as a 
resourcefile. When I want to close down the main application and delete the 
main executable, I write the contents of the helper executable to disk using 
a filestream object. I specify the DeleteOnClose option so that the helper 
executable is deleted as well. 

So far everything works fine but..... When I close the filestream, the 
helper executable is deleted right away (because of the DeleteOnClose 
option). There is no chance starting the helper executable. If I try to start 
the helper executable before closing the stream I get a message that the 
process cannot be started because: "The process cannot access the file 
because it is being used by another process"


Dim objWriteFileStream As New FileStream("F:\SelfDeleteFromResource.exe", 
FileMode.CreateNew, FileAccess.Write, FileShare.Read, 1024, 
FileOptions.DeleteOnClose)
objWriteFileStream.Write(My.Resources.SelfDelete, 0, 
My.Resources.SelfDelete.Length)
objWriteFileStream.Flush()
System.Diagnostics.Process.Start("F:\SelfDeleteFromResource.exe") ==> this 
line produces the error
objWriteFileStream.Close()

Aparently this works different in .NET than in the examples on 
http://www.catch22.net/tuts/selfdel


I totally agree with your opinion about european governments. Unfortunately 
it's not simple to do something about it. Cars (and everything associated 
with them) have always been a revenue-enhancement mechanism. That's one of 
the reasons why petrol costs 7,74 dollar/gallon over here. Cars are about 
twice the price that the manufacturer asks due to the added taxes, and on 
every corner there is a hidden speedcamera. :) 

"Peter Duniho" wrote:

> PeterW wrote:
> > I am trying to create a GPS based warning system for speedcameras for the 
> > Windows Mobile 5.0 (or higher) platform. One of the features of the 
> > application is that it has an "erase" button that automatically closes down 
> > the application and deletes the executable. This is because this type of 
> > software is legally not allowed in all european countries (like switzerland) 
> > and I want to give the user the option to remove the software before entering 
> > such countries. It's essential that no trace of the software is left after 
> > the erase. 
> 
> Even ignoring the specific functionality of the application, that seems 
> like a needless feature to me.  A regular uninstall should be able to 
> remove the program just as well.  Just tell your users to use the normal 
> uninstall that's part of your program's setup.
> 
> Alternatively, just use the "RunOnce" registry key, and have the users 
> reboot as part of the deletion process (so that the command you add to 
> the "RunOnce" key can be executed...this presumes that "RunOnce" and 
> rebooting is supported on Windows Mobile, which I don't know much about).
> 
> Besides, the idea that the user will erase "all traces" of the software 
> also seems somewhat misplaced.  A user using the software who just 
> happens to be traveling through some country where the software is 
> illegal isn't going to delete the software permanently.  Presumably they 
> intend to reinstall at some later point, and they very well may keep a 
> copy on their person for that purpose (in case, for example, they 
> anticipate having trouble getting online).
> 
> > I have been trying to find a technical solution for this feature but it has 
> > proven to be much harder than I thought. The problem is that the physical 
> > executable file is locked and can't be deleted as long as the executable is 
> > running. 
> > 
> > I found some quite interesting articles explaining the problem in more 
> > detail and also explaining some possible solutions. An example of a very 
> > usefull article on this subject can be found on: 
> > http://www.catch22.net/tuts/selfdel
> > 
> > Unfortunately the solutions in the article require C++ and I am trying to 
> > achieve a solution that will work in C#.NET. Is there anybody who 
> > can help me a bit further with this problem ? Any help is appreciated.
> 
> It seems to me there are a number of "good" suggestions (inasmuch as the 
> idea is one needing solving, which is debatable :) ) in the article (and 
> some not-so-good...the "inject code into another process" idea is awful, 
> and probably won't work on any computer with DEP enabled).
> 
> In addition, generally anything you can do in C++, you can do in C#. 
> You may have to use p/invoke to access unmanaged Win32 features, but 
> otherwise it should work.  I note that a number of the examples have an 
> asm block, but as near as I can tell for the most part that's just 
> obfuscation.  You should be able to achieve the same results just by 
> calling the appropriate functions normally.
> 
> Of all those suggestions in the article, I would say that the 
> "DELETE_ON_CLOSE" method is probably the most convenient and reliable of 
> the various choices.  It actually uses built-in, OS-supported API to do 
> the work rather than trying to hijack some other mechanism to do the 
> work.  Best of all, there's nothing about it that requires you to be 
> running unmanaged code; you should be able to do the whole thing as 
> managed code.
> 
> Some modifications I'd make to the suggestion though:
> 
>      -- Just write a stand-alone deletion application that you use to 
> create the temporary "DELETE_ON_CLOSE" file.  Compile it, store it in 
> your main application's resource data, and then just write it out the 
> file at the appropriate time (it should be very small).  (I see that 
> this is included as "an alternative method" at the very end of that 
> suggestion).
> 
>      -- Don't mess around with the sleeping logic.  Instead, use a 
> reliable inter-process mechanism for the main application and the 
> deletion application to communicate (e.g. named Mutex, sockets, pipe, etc.).
> 
> Of course, all this assumes this is actually a feature you should be 
> spending your time on.  Honestly, it seems to me it's not.  Just make 
> sure your uninstall works as it's supposed to and removes "all traces" 
> of the program.  Then just tell your users to use that instead.
> 
> And tell your European governments that are putting up speed cameras to 
> do it the way other civilized governments do it: announce the locations 
> of cameras with signs.  Then, the cameras serve more as an actual speed 
> control mechanism rather than a revenue-enhancement mechanism.  That 
> way, you don't even need your application.  :)
> 
> Pete
> .
> 
0
Utf
11/21/2009 2:34:01 PM
On 21/11/2009 in message 
<4BE24CEB-E7D5-40E6-8E3C-B46C1426D70E@microsoft.com> PeterW wrote:

>The reason why I want to implement a self delete rather than letting the 
>user
>uninstall the application manually is that the last one is quite a 
>cumbersome
>process to do while you are driving. I want a big button on the touchscreen
>that does the entire job automatically when pressed.

I don't know what sort of storage is in these devices but is deleting 
enough anyway, or does the storage device need to be over-written several 
times to prevent forensic recovery?

-- 
Jeff Gaines Dorset UK
This is as bad as it can get, but don't bet on it
0
Jeff
11/21/2009 2:46:38 PM
Just a delete is sufficient. 


"Jeff Gaines" wrote:

> On 21/11/2009 in message 
> <4BE24CEB-E7D5-40E6-8E3C-B46C1426D70E@microsoft.com> PeterW wrote:
> 
> >The reason why I want to implement a self delete rather than letting the 
> >user
> >uninstall the application manually is that the last one is quite a 
> >cumbersome
> >process to do while you are driving. I want a big button on the touchscreen
> >that does the entire job automatically when pressed.
> 
> I don't know what sort of storage is in these devices but is deleting 
> enough anyway, or does the storage device need to be over-written several 
> times to prevent forensic recovery?
> 
> -- 
> Jeff Gaines Dorset UK
> This is as bad as it can get, but don't bet on it
> .
> 
0
Utf
11/21/2009 4:36:01 PM
PeterW wrote:
> The reason why I want to implement a self delete rather than letting the user 
> uninstall the application manually is that the last one is quite a cumbersome 
> process to do while you are driving. I want a big button on the touchscreen 
> that does the entire job automatically when pressed.

Admirable, but pointless IMHO.  No, the user should not be messing 
around with typing while driving.  But frankly, that goes for a big 
button on the touchscreen too.  And it's not like they should be 
surprised they are approaching a country where the application needs to 
be deleted.  They can either just wait until they are already stopped 
for some other reason and uninstall, or they can pull over and perform 
the necessary steps.

> [...]
> So far everything works fine but..... When I close the filestream, the 
> helper executable is deleted right away (because of the DeleteOnClose 
> option). There is no chance starting the helper executable. If I try to start 
> the helper executable before closing the stream I get a message that the 
> process cannot be started because: "The process cannot access the file 
> because it is being used by another process"

It sounds like you missed the part about keeping the file open using the 
proper sharing flags, so that the new process can in fact open the file 
for execution.

Pete
0
Peter
11/21/2009 7:17:17 PM
I had hoped the "FileShare.Read" in the following line of code would do the 
trick: 

Dim objWriteFileStream As New FileStream("F:\SelfDeleteFromResource.exe", 
FileMode.CreateNew, FileAccess.Write, FileShare.Read, 1024, 
FileOptions.DeleteOnClose)

According to the documentation this flag controls if other filestreams can 
access the file or not. FileShare.Read means that other filestreams can open 
the file for read while the current process still has the file open. 
Aparently this is limited to filestream objects only because it does not work 
when you try to start an executable. 

In the meantime I have been trying the use the unmanged code "CreateProcess" 
as well but that does not work either. Probably the same problem because it 
starts up notepad.exe fine but it does not start up the exe that was writen 
to disk by the filestream object as described in my previous post. 

"Peter Duniho" wrote:

> PeterW wrote:
> > The reason why I want to implement a self delete rather than letting the user 
> > uninstall the application manually is that the last one is quite a cumbersome 
> > process to do while you are driving. I want a big button on the touchscreen 
> > that does the entire job automatically when pressed.
> 
> Admirable, but pointless IMHO.  No, the user should not be messing 
> around with typing while driving.  But frankly, that goes for a big 
> button on the touchscreen too.  And it's not like they should be 
> surprised they are approaching a country where the application needs to 
> be deleted.  They can either just wait until they are already stopped 
> for some other reason and uninstall, or they can pull over and perform 
> the necessary steps.
> 
> > [...]
> > So far everything works fine but..... When I close the filestream, the 
> > helper executable is deleted right away (because of the DeleteOnClose 
> > option). There is no chance starting the helper executable. If I try to start 
> > the helper executable before closing the stream I get a message that the 
> > process cannot be started because: "The process cannot access the file 
> > because it is being used by another process"
> 
> It sounds like you missed the part about keeping the file open using the 
> proper sharing flags, so that the new process can in fact open the file 
> for execution.
> 
> Pete
> .
> 
0
Utf
11/22/2009 10:49:03 AM
PeterW wrote:
> I had hoped the "FileShare.Read" in the following line of code would do the 
> trick: 
> 
> Dim objWriteFileStream As New FileStream("F:\SelfDeleteFromResource.exe", 
> FileMode.CreateNew, FileAccess.Write, FileShare.Read, 1024, 
> FileOptions.DeleteOnClose)

Why?  The page you referenced specifically says the file you write "must 
also have the FILE_SHARE_DELETE flag specified".  Why would you think 
that FileShare.Read would accomplish that, as opposed to (for example) 
the FileShare.Delete flag?

> According to the documentation this flag controls if other filestreams can 
> access the file or not.

Actually, the documentation is more specific: it says that flag "allows 
subsequent opening of the file for reading".  Not any access; it 
specifically controls read sharing.

Also, the page you referenced clearly explains that you need the 
FILE_SHARE_DELETE flag, because the file is originally opened with the 
DELETE_ON_CLOSE flag (FileOptions.DeleteOnClose in .NET).

It seems to me you want (in addition to other sharing flags that may be 
necessary) the equivalent of the FILE_SHARE_DELETE flag, which I believe 
is the FileShare.Delete flag.

> FileShare.Read means that other filestreams can open 
> the file for read while the current process still has the file open. 
> Aparently this is limited to filestream objects only because it does not work 
> when you try to start an executable.  [...]

I disagree with your conclusion.  It's likely your code would work fine 
if you hadn't also specified the FileOptions.DeleteOnClose, and given 
that you are, you need to specify the proper sharing flag to allow that 
to happen.

Pete
0
Peter
11/22/2009 8:17:06 PM
Hi Peter, 

Thanks for your reply. You are indeed right. In the code that I posted only 
the FILE_SHARE_READ is specified but I also tried it combined with 
FILE_SHARE_DELETE which does not work either. 

I found an article on the web explaining that the second process that 
attempts to open the file also needs to open it with the FILE_SHARE_READ + 
FILE_SHARE_DELETE flag set. If this is not the case then the second process 
will exclusively open the file and effectively block the first process from 
reading the file, this is not allowed and therefore attempting to do so 
generates an error. I assume that this is the problem I'm dealing with. 

If you open a filestream it's easy to specify the FILE_SHARE_READ + 
FILE_SHARE_DELETE flags, but when you try to start up a new executable from 
within the code you can't specify these flags. Starting an executable will by 
default try to generate an exclusive lock. That's at least what I think is 
happening. I need to find a way around this problem. 

Yesterday I was doing some further research and I found this article on the 
web: http://www.codeproject.com/KB/threads/HowToDeleteCurrentProcess.aspx
It explains a solution for the self delete problem that is very simple and 
straightforward. Just add two lines of code: 

Start("cmd.exe", "/C choice /C Y /N /D Y /T 3 & Del " + 
System.Reflection.Assembly.GetExecutingAssembly.GetModules()(0).FullyQualifiedName)
Application.Exit()

This works very well on my desktop. Unfortunately it does not work on a 
Windows Mobile 5.0 device because windows mobile does not have a cmd.exe. 

I will have to dig a bit further for a solution. 






"Peter Duniho" wrote:

> PeterW wrote:
> > I had hoped the "FileShare.Read" in the following line of code would do the 
> > trick: 
> > 
> > Dim objWriteFileStream As New FileStream("F:\SelfDeleteFromResource.exe", 
> > FileMode.CreateNew, FileAccess.Write, FileShare.Read, 1024, 
> > FileOptions.DeleteOnClose)
> 
> Why?  The page you referenced specifically says the file you write "must 
> also have the FILE_SHARE_DELETE flag specified".  Why would you think 
> that FileShare.Read would accomplish that, as opposed to (for example) 
> the FileShare.Delete flag?
> 
> > According to the documentation this flag controls if other filestreams can 
> > access the file or not.
> 
> Actually, the documentation is more specific: it says that flag "allows 
> subsequent opening of the file for reading".  Not any access; it 
> specifically controls read sharing.
> 
> Also, the page you referenced clearly explains that you need the 
> FILE_SHARE_DELETE flag, because the file is originally opened with the 
> DELETE_ON_CLOSE flag (FileOptions.DeleteOnClose in .NET).
> 
> It seems to me you want (in addition to other sharing flags that may be 
> necessary) the equivalent of the FILE_SHARE_DELETE flag, which I believe 
> is the FileShare.Delete flag.
> 
> > FileShare.Read means that other filestreams can open 
> > the file for read while the current process still has the file open. 
> > Aparently this is limited to filestream objects only because it does not work 
> > when you try to start an executable.  [...]
> 
> I disagree with your conclusion.  It's likely your code would work fine 
> if you hadn't also specified the FileOptions.DeleteOnClose, and given 
> that you are, you need to specify the proper sharing flag to allow that 
> to happen.
> 
> Pete
> .
> 
0
Utf
11/23/2009 10:06:06 PM
Reply:

Similar Artilces:

#Delete Mark in Bound Memo filed
I have form that has bound memo field, sometime, no sure how it happen, the memo filed is filled with #Delete. My application is a stand alone program. Kindly advise what can cause this and how to avoid it from happening. -- TS Lim When was the last time you performed a compact and repair? Is you db split? Does each user have their own copy of the front-end? Please checkout http://www.granite.ab.ca/access/corruptmdbs.htm http://www.granite.ab.ca/access/corruption/symptoms.htm http://office.microsoft.com/en-ca/access/HA011865661033.aspx - No very helpful but directly from MS ...

Problems with creating a newsletter
I chose the form "Newsletter - email". I have created a 3 page newsletter. Now, I have NO IDEA how to send it out as an email. I do not want to send it as an attachment. I cannot figure out which "save as" format or what I need to do so that i can email this newsletter. Is there a website that goes through how to do this? Am I correct when I say that it has to be html in order for me to send it as email? That is not one of the options. Any help you give me would be greatly appreciated. Thank you, Markis www.adreamforabetterworld.com ...

Wrong message with cascading deletes
A2003: Table Person linked 1 X M to table Activity. The relationship has its Referential Integrity checkbox and the Cascade Delete checkbox both checked. When I delete a person all related Activity records are deleted which is to be expected. According to http://www.informit.com/articles/article.aspx?p=26115&seqNum=5 I should get the following message in this case: "Relationships that specify cascading deletes are about to cause 1 record(s) in this table and in related tables to be deleted. Are you sure you want to delete these records?" In stead I get: &quo...

CFile (delete file)
How can I delete all files that end with ".temp" in some folder? CFile::Remove remove unlink -- cheers, Alok Gupta Blogs: http://wdevs.com/thatsalok "Petar Popara" <my.fake@mail.net> wrote in message news:Op6#URKfFHA.2644@TK2MSFTNGP09.phx.gbl... > > How can I delete all files that end with ".temp" in some folder? > > SHFileOperation() will and it supports wildcards! DeleteFile() will operate on one file at a time. "Petar Popara" <my.fake@mail.net> wrote in message news:Op6%23URKfFHA.2644@TK2MSFTNGP09.phx.gbl... > >...

Using mouse wheel in VB editor
Just tried using the mouse wheel to scroll within visual basic editor in excel but it wont let me. How can I turn this feature on. I am using Excel 2003. Thanks in advance. This is a known problem with the latest MS mouse drivers. You can either install version 4 of the drivers (current version is 5), or use FreeWheel, and freeware program at http://www.geocities.com/SiliconValley/2060/freewheel.html . -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "fullers" <fullers@discussions.microsoft.com> wrote in message ne...

Send to certain person using specific email account
I send an email to a certain receipient but don't want to use the default email account. Is it possible that when I send to them (plain text) , that it will choose the other account I want to use to send it? Please advise how I set this up. Thanks. I do not believe that this can be achieved automatically through standard use of Outlook as you need to manually specify the name of the account to send from if different than the default. However, it would be possible using the Outlook object model. An Addin would need to be developed that monitored each mail item prior to sending. If the d...

Need Help with Deleting Empty Paragraphs in Word 2003
I have written the code below to delete all empty paragraphs at the end of a document and then place the cursor at the end of the last paragraph. It works fine as a stand alone sub in a new doc, but fails inside the real document that contains other code that manipulates several documents. The failure is that it will delete the last empty para, but then gets stuck looping inside the While...Wend because subsequent .Delete are not happening. So, the question is why would this work in one document, but then fail in another? n = 0 ...

VBA to creating autotext entries or quickparts in different catego
I have a VBA application that basically allows people to easily create autotext entiries, move them between machines and use them making comments on assignments. Currently it operates in EXACTLY the same way in Word 2003 and 2007 (using userforms) and I want to keep that as long as possible. You can see the application at http://emarking-assistant.baker-evans.com and either the screen image or the video demos will give you an idea of what I am doing Currently I store all the comments in a long list of autotext entries that is displayed in a field with the value of the entr...

Use exchange from a trusted domain
Hi folks, I have domain a and domain b. Domain a is all set upp with exchange etc. Domain b was bought, and they don't have exchange. I have trust between the domains and file sharing and authentication are ok. What we want to do is, make users on domain b and let them use the exchange (on a seperate storage) on domain a. The users on domain b must logon to domain b, but need to have mailbox on domain a. Domain a are running on win2003 and exchange 2003. Domain are running on win2003 with forest and domain ready for exchange. Any advices? thanks in advance, - Bjarni Hi, Thi...

Corrupt "Deleted Items" folder
I am unable to empty the "Deleted Items" folder. The error that comes up tells me that the "Outlook.pst" file has errors in it and to use the "Repair Inbox Tool". I've tried using the repair function under the "help" menu...to no avail. I have also tried opening the "Outlook.pst" file in MS Word, but the file is 129 megabytes! It crashes MS Word when I try to open it. Any ideas? Look for scanpst.exe on your local drive and run it against your outlook.pst file >-----Original Message----- >I am unable to empty the "Del...

Opening pub files created with older Publisher versions #2
I have just upgraded to Publisher 2003 from 2000 and am having trouble with pub files sent to me for our chuch newsletter which is using Publisher 97 The text is not wrapping around graphics boxes. Can I fix this? I really don't want to go back to Pub 200 Thank Richard this is caused by Publisher 97 not been printer independent. Even if you went back to Publisher 2000, unless you have the identical font versions and printer driver you would have issues with formatting. It sounds like the person sending you the file has a garbage HP inkjet printer. Get them to install the HP5P laser p...

Using Access 2003 on client to see Sharepoint 2007
Testing a Sharepoint environment and I can easily manipulate and run the database from Access 2007, but when I try to use Access 2003 it wants me to save the database to a location. The Access 2003 has the compatiblity pack, but it seems to not work when I download it. So the question is using Sharepoint 2007 and posting the Access 2007 format to it, can a user go to the sharepoint site and use a 2003 Access database that has the compatibility pack and open without having to download it? -- Message posted via http://www.accessmonster.com Send check for $500.00 to: David A Jenn...

Creating Text Box in Publisher 2007 Crashes the Application
Hello, we have a clean install of Publisher 2007 under Windows XP SP2, and when we try to create a text box in a document, (both an existing document and a blank document), publisher crashes. Office is fully patched. I ran Office Diagnostics from the help menu and no problems were found and the issue persists. Any thoughts on how to resolve the issue? Thanks, Syd See if selecting a different printer as default helps. How to view error signatures if an Office program experiences a serious error and quits http://support.microsoft.com/kb/289508/en-us -- Mary Sauer MSFT MVP http://of...

Creating a Macro to Delete Commas #2
I have an excel file that the size will varry. I need a macro that will check all the fields for a comma. If there is one I would like to get rid of it. Does anyone have any idea how to do this? I have no idea and I have been assigned this task. Help --- Message posted from http://www.ExcelForum.com/ No macro required. ctrl-H for find/replace. find , replace nothing (leave the replace field blank). You can of course record that within a macro if you wish. Drabbacs >-----Original Message----- >I have an excel file that the size will varry. I need a macro that will >check ...

Create Exchange mailbox from command line
I'm writing a script using dsadd and I was wondering if it's possible to create an exchange mailbox from the command line. Donovan Maybe not exactly what you want but it may help: http://www.joeware.net/win/free/tools/exchmbx.htm -- Neil Hobson Exchange MVP For Exchange news, links, and tips, check: http://www.msexchangeblog.com "Donovan Linton" <DonovanLinton@discussions.microsoft.com> wrote in message news:D9C839EF-883D-4E2E-8BE9-57782582F043@microsoft.com... > I'm writing a script using dsadd and I was wondering if it's possible to > create an ...

How Use ShellExecute with a CMemFile
Hello, I need to store files of various types (such as .doc, .xls, .jpg, .pdf, ..wmv, ...) in a database. Upon retrieval of such a file I have the file as data in memory in a CMemFile. I need to then "display" the file in the aproriate application. If I were to write the CMemFile to disk and create an actual file I could then, of course, use ShellExecute() to launch , say Word to display a .doc file. However, I would much prefer to avoid the overhead of writing the data to an actual file and then dealing with having to detect when the User is done and cleaning up the file I had ...

creating a backup on 2002 for Money 98
I am helping a friend who has 98. I need to make a backup of info on my 2002 for him to use on 98. Any suggestions as to how to do this? M98 can't read any file written by M02 besides .QIF import. M02 can't write any file readable by M98 except for .QIF export. Sounds like QIF export/import is your only choice. I suspect you will find this doesn't do what you want. "Carlotte" <Carlotta41@discussions.microsoft.com> wrote in message news:015b01c3d2fa$bbf8fd60$a101280a@phx.gbl... > I am helping a friend who has 98. I need to make a > backup of info on...

Using INDIRECT within functions
I learned a bit from JLathman in a previous post but tried to use the same methodology with this formula (also learned from this Group to get the last entered value in a column) without much luck. The original formula was this with 2009 sheet being static: =LOOKUP(2,1/('2009'!H3:H65536<>""),'2009'!H3:H65536) Trying to make it dynamic I tried the following without success: =LOOKUP(INDIRECT("2,1/(" & O1 & "!$H$3:$H$65536<>"")," & O1 & "!$H$3:$H$65536)")) Did I miss something or are...

Can i use conditional formating on a cell when it contains a formula?
I am trying a "conditional formatting" on a cell that contains formula, but it didn't work. "If cell value is equal to 0 then font - white" This doesn't work, stays always. If i use this condition on a cell without formula it works just fine. Thank -- si ----------------------------------------------------------------------- sit's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=262 View this thread: http://www.excelforum.com/showthread.php?threadid=26784 Hi are you sure your formula returns an exact zero?. Could you post the formul...

How to use count for calls per hour
I am trying to create a pivot table and chart that will show me the # of calls per hour by day for a range of dates Aug 1 - Sept 19. My data looks like this where each line is the date and time of the call: How do I get a count of the # of the calls per hour by day? 8/1/08 12:48 AM 8/1/08 1:53 AM 8/1/08 2:36 AM 8/1/08 3:24 AM 8/1/08 3:37 AM 8/1/08 4:04 AM 8/1/08 4:44 AM 8/1/08 4:55 AM 8/1/08 4:58 AM 8/1/08 7:02 AM 8/1/08 7:28 AM 8/1/08 7:43 AM 8/1/08 7:47 AM 8/1/08 7:56 AM 8/1/08 7:58 AM 8/1/08 8:13 AM 8/1/08 8:33 AM 8/1/08 9:07 AM 8/1/08 10:28 AM 8/1/08 10:38 AM 8/1/08 10:44 AM 8/1/08 ...

How export all mailbox-enabled users from the GAL using Outlook?
Hello, We have a user which, for administrative reasons, needs to export all mailbox-enabled users in the GAL now and then. They just need all the names. Is there a straightforward way for them to do that? We don't want to give them any special permissions and want to avoid server scripting. Ideally, they should be able to export it to a CSV file or any text file. Thanks, - Alan. Alan wrote: > We have a user which, for administrative reasons, needs to export all > mailbox-enabled users in the GAL now and then. They just need all the > names. Is there a straightforward way fo...

Start macro creating a mail with contact data and autotext
Hallo, I am working with an user form. The developing of that form started with Outlook XP with a lot of code inside for different buttons. I changed to Outlook 2007 and unfortunately the code of the form was not longer displayed. What I learned about this is that MS does not support to much code in the form (or maybe a bug). They also do not support any longer. I was sending this form to MS support but they told it is do much code inside and they do not know, why the code is not displayed. In Outlook 2003 the code is displayed as in Outlook XP. Because I do not know real...

SQL 2008 running on a VM using all allocated memory
Hi, I've got a sql2008 server running on a VM. There's 9GB of physical RAM, which 7GB have been allocated to SQL Server. But when i look at task manager, i see that the SQL server is actually using all 7GB, which is pegging the memory usage of the overal box at above 90% used. We're mostly a sql2005 shop, and none of those servers are doing this. I have sql2005 running on VM's, someone actual servers as a named or default instance, and some even clustered. None of them have this problem. Is this a normal thing with sql2008 only? Any insight would be greatly appre...

Outlook 2003
Hi Is it possible to order the deleted items by date of deletion in outlook 2003? Many thanks Lee Lee Atkinson <leeatkinsonlincs@hotmail.com> wrote: > Is it possible to order the deleted items by date of deletion in > outlook 2003? Use the Field Chooser to add the Modified time to the Deleted Items folder header bar (the one that says "From", "Subject", "Received", etc. and sort on that time. Deleting an item is a modification, so I would expect the modified date to be affected, giving you the most accurate value of the item's deleted time....

Loading Text File to TextBox using LoadFromFile
Hi All, I'm creating a form that allows the user to pick a txt file (dialog) and then display the path and contents on the form. The code has been cobbled together as I found the pieces that worked, so bear with. I got the file picker working and displaying the file name on the form, but the file contents won't display. I had a feeling the problem had to do with importing a namespace (see the error in the code when I tried "Imports System.IO") or with a missing reference. Using Access 2003. References: VB for Apps, MS Access 11 Obj Lib, OLE Auto, MS V...