Click here to Skip to main content
15,890,388 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
See more:
Hi all,

I install my program using ClickOnce deployment, the files will be installed in this path:- ( i get from the forum info)
the sub folders of [System Drive]:\Documents and Settings\[User Name]\Local Settings\Apps\2.0

Then, I try to locate mine. I have 3 folder in that path.

1.Data
The exact path : C:\Documents and Settings\newuser\Local Settings\Apps\2.0\Data\DGVPMQ8N.2J0\RV664HZQ.NKD\u-su..tion_2cb43422b8a531ac_0001.0000_f544608b27029c79\Data
Contains my database usurfdb.mdb

2.XYVEQJCM.X4T
contains 3 other folders namely manifests and 2 others weired folders. Here It contains my consent.txt, zafi.ico and again my usurfdb.mdb

3.Z8EWEQ8D.702
In here it contains sc1 folder. the exact path C:\Documents and Settings\newuser\Local Settings\Apps\2.0\Z8EWEQ8D.702\E1QZ0N3Z.7V8\u-su..tion_2cb43422b8a531ac_0001.0000_f544608423892e39

When I run the program, I received an error could not find "C:\Documents and Settings\newuser\Local Settings\Apps\2.0\Z8EWEQ8D.702\E1QZ0N3Z.7V8\u-
su..tion_2cb43422b8a531ac_0001.0000_f544608423892e39\usurfdb.mdb"

I am wondering why an error occurs at this stage? The data folder already have the usurfdb.mdb database.
As a result I my program unable to works after been installed in different computer.


The weired thing all captured image is located now in [B]C drive...[/B] instead sc1 folder as specified

I really need some help on this issues.

By the way I just tried this codes:-
If registeredString Is Nothing OrElse registeredString.ToString = "" Then
            registeredString = "Zafi"
            Registry.SetValue(keyName, "sc1", registeredString)
            Dim applicationFolderPath = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData)
            IO.Directory.CreateDirectory(IO.Path.Combine({applicationFolderPath, "Zafi"}))
          End If

          imagename = Replace(Now.Date, "/", "") & "-" & Int(Now.TimeOfDay.TotalSeconds)
          sc.CaptureScreen.Save("\sc1" & imagename & ".jpg", System.Drawing.Imaging.ImageFormat.Jpeg)



Sc.capturescreen.save = It will call capturescreen module and save the image in folder \sc1. Sadly seems to be not working here
Posted

on this line in your new code you need to add either an explicit call to the Drive you want to write to or a [System Drive] reference.
sc.CaptureScreen.Save("\sc1" & imagename & ".jpg", System.Drawing.Imaging.ImageFormat.Jpeg)
I would probably create a variable to hold the location and set that at runtime so that I could change where to hold the files from the registry.
 
Share this answer
 
Comments
zafi24 28-Feb-11 5:04am    
Hi Bryce,

Can you explain a little bit further please?
I don't get what you meant.
Hi Bryce,

Can you explain a little bit further please?
I don't get what you meant.

Thank you mate
 
Share this answer
 
Sure your code here should read
sc.CaptureScreen.Save("c:\\sc1" & imagename & ".jpg", System.Drawing.Imaging.ImageFormat.Jpeg)

I think I don't have a compiler on this machine so I cant test it. I will login late from work and run it through a compiler. Also at work I have the code part to save to the registry and will post that as well if I remember.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900