My Assistant
![]() ![]() |
Nov 5 2009, 09:36 PM
Post
#251
|
|
|
Target ![]() Group: Members Posts: 15 Joined: 19-September 08 Member No.: 16,354 |
Changing data in the actual programs folder breaks windows security rules dating from Windows NT 3.51 and has been strongly slapped down by vista and windows 7.
I don't know what version of Visual Studio you use but here is some code for 2008 that will allow you to use the AllUsersProfile to store user changeable data. it only includes warnings for errors so it needs just a little work to make it more robust. CODE Option Strict On Option Explicit On Imports System.IO Namespace DaisyBox.SR4CG Public Class customFiles Private _templateFilesPath As String Friend ReadOnly Property templateFilesPath() As String Get Return _templateFilesPath End Get End Property Private _customFilesPath As String Friend ReadOnly Property customFilesPath() As String Get Return _customFilesPath End Get End Property Friend Sub CopyCustomFiles() Dim dirInfo As DirectoryInfo Dim destFile As FileInfo Dim origFile As FileInfo 'make sure the folder exists in all users profile, if not create it. dirInfo = New DirectoryInfo(_customFilesPath) If Not dirInfo.Exists Then Try dirInfo.Create() Catch ex As Exception MsgBox(ex, MsgBoxStyle.Critical, "Error") End Try End If 'make sure source exists dirInfo = New DirectoryInfo(_templateFilesPath) If Not dirInfo.Exists Then MsgBox(dirInfo.FullName & " Not Found", MsgBoxStyle.Critical, "Path not found!") End If 'copy files from install dir to Program Data folder For Each file As FileInfo In dirInfo.GetFiles() origFile = file destFile = New System.IO.FileInfo(file.FullName.Replace(_templateFilesPath, _customFilesPath)) If Not destFile.Exists Then Try System.IO.File.Copy(origFile.FullName, destFile.FullName, True) Catch ex As Exception MsgBox(ex.Message, MsgBoxStyle.Critical, "Error") End Try End If Next End Sub Sub New() _templateFilesPath = My.Application.Info.DirectoryPath & "\Data Files\Custom" _customFilesPath = Environment.GetEnvironmentVariable("AllUsersProfile") & "\" & _ My.Application.Info.CompanyName.Trim & "\" & _ My.Application.Info.ProductName.Trim & "\" & _ My.Application.Info.Version.ToString.Trim & _ "\Data Files\Custom" End Sub End Class End Namespace If you use vs2003 I'll see what I can dig up on the differences. It has been a long time and I think I cleaned my 2003 snippet library out. |
|
|
|
Nov 5 2009, 09:52 PM
Post
#252
|
|
|
Moving Target ![]() ![]() Group: Members Posts: 133 Joined: 19-October 08 From: Turlock, CA Member No.: 16,534 |
Changing data in the actual programs folder breaks windows security rules dating from Windows NT 3.51 and has been strongly slapped down by vista and windows 7. I don't know what version of Visual Studio you use but here is some code for 2008 that will allow you to use the AllUsersProfile to store user changeable data. it only includes warnings for errors so it needs just a little work to make it more robust. CODE Option Strict On Option Explicit On Imports System.IO Namespace DaisyBox.SR4CG Public Class customFiles Private _templateFilesPath As String Friend ReadOnly Property templateFilesPath() As String Get Return _templateFilesPath End Get End Property Private _customFilesPath As String Friend ReadOnly Property customFilesPath() As String Get Return _customFilesPath End Get End Property Friend Sub CopyCustomFiles() Dim dirInfo As DirectoryInfo Dim destFile As FileInfo Dim origFile As FileInfo 'make sure the folder exists in all users profile, if not create it. dirInfo = New DirectoryInfo(_customFilesPath) If Not dirInfo.Exists Then Try dirInfo.Create() Catch ex As Exception MsgBox(ex, MsgBoxStyle.Critical, "Error") End Try End If 'make sure source exists dirInfo = New DirectoryInfo(_templateFilesPath) If Not dirInfo.Exists Then MsgBox(dirInfo.FullName & " Not Found", MsgBoxStyle.Critical, "Path not found!") End If 'copy files from install dir to Program Data folder For Each file As FileInfo In dirInfo.GetFiles() origFile = file destFile = New System.IO.FileInfo(file.FullName.Replace(_templateFilesPath, _customFilesPath)) If Not destFile.Exists Then Try System.IO.File.Copy(origFile.FullName, destFile.FullName, True) Catch ex As Exception MsgBox(ex.Message, MsgBoxStyle.Critical, "Error") End Try End If Next End Sub Sub New() _templateFilesPath = My.Application.Info.DirectoryPath & "\Data Files\Custom" _customFilesPath = Environment.GetEnvironmentVariable("AllUsersProfile") & "\" & _ My.Application.Info.CompanyName.Trim & "\" & _ My.Application.Info.ProductName.Trim & "\" & _ My.Application.Info.Version.ToString.Trim & _ "\Data Files\Custom" End Sub End Class End Namespace If you use vs2003 I'll see what I can dig up on the differences. It has been a long time and I think I cleaned my 2003 snippet library out. I use 2008 express. I don't really know anything about these security procedures, so could you provide me with a link to where they're written? I find it odd that It's illegal for a program to modify files in its own install directory.... |
|
|
|
Nov 6 2009, 01:27 PM
Post
#253
|
|
|
Target ![]() Group: Members Posts: 15 Joined: 19-September 08 Member No.: 16,354 |
The simple fact is that by default "user" accounts do not have write access to the program folder. It has been this way since the adoption of NTFS as a file system as a simple security measure to make sure that installed programs could not be tampered with to subvert the system. Since windows vista came out and locked down even the administrator account it makes old programs an even bigger headache.
I am a computer tech for a community college and I could tell you many nightmares about programs not working for our students because they write to the Program Files folder. here are a couple of links Someone asking how to make their app Vista/Win 7 compliant http://social.msdn.microsoft.com/forums/en...b-0b35b7852ecd/ Windows Vista Application Development Requirements for User Account Control (UAC) http://msdn.microsoft.com/en-us/library/aa905330.aspx The Windows Vista and Windows Server 2008 Developer Story: Application Compatibility Cookbook http://msdn.microsoft.com/en-us/library/aa480152.aspx |
|
|
|
Nov 6 2009, 01:57 PM
Post
#254
|
|
|
Target ![]() Group: Members Posts: 15 Joined: 19-September 08 Member No.: 16,354 |
Seems there is a difference between Vista/Win 7 and 2000/XP I assume it goes back even further but I don't think it matters.
On XP, he %AllUsersProfile% environment variable points to a root folder that contains "Application Data" as a sub folder on XP/2000. The "Applicatioin Data" folder contains the data from the programs. On Vista and Windows 7 the Application Data" folder does not exist as such. It is a symbolic link that points right back to the "C:\ProgramData\" I guess I'll have to tinker with my code and see if it works on Win XP too. I'll let you know. |
|
|
|
Nov 6 2009, 02:06 PM
Post
#255
|
|
|
Target ![]() Group: Members Posts: 15 Joined: 19-September 08 Member No.: 16,354 |
This fixes it. It works in Windows XP SP3, Windows Vista (Home, Pro, Enterprise (x86/x64) and windows 7 Enterprise x64/x86
I added "\Application Data\" & _ and remove the trailing slash from the line above "\" CODE Sub New()
_templateFilesPath = My.Application.Info.DirectoryPath & "\Data Files\Custom" _customFilesPath = Environment.GetEnvironmentVariable("AllUsersProfile") & _ "\Application Data\" & _ My.Application.Info.CompanyName.Trim & "\" & _ My.Application.Info.ProductName.Trim & "\" & _ My.Application.Info.Version.ToString.Trim & _ "\Data Files\Custom" End Sub |
|
|
|
Nov 9 2009, 03:10 AM
Post
#256
|
|
|
Target ![]() Group: Members Posts: 7 Joined: 30-October 09 Member No.: 17,822 |
I was building an adept, and added a standard bow. On the weapons sheet, it lists the range correctly (STR7 bow with ranges of 7/70/210/420), but on the print sheet, under range it has 2. Not the actual range. The other ranged weapons I've added all seem to be working fine. Also, with the bow, the price is showing as a flat price, instead of the bows RatingX100. I changed it in my copy to work correctly, but figured you'd like to know about it, too.
|
|
|
|
Nov 9 2009, 03:22 AM
Post
#257
|
|
|
Moving Target ![]() ![]() Group: Members Posts: 133 Joined: 19-October 08 From: Turlock, CA Member No.: 16,534 |
I was building an adept, and added a standard bow. On the weapons sheet, it lists the range correctly (STR7 bow with ranges of 7/70/210/420), but on the print sheet, under range it has 2. Not the actual range. The other ranged weapons I've added all seem to be working fine. Also, with the bow, the price is showing as a flat price, instead of the bows RatingX100. I changed it in my copy to work correctly, but figured you'd like to know about it, too. The weapons print has a bug in it, although the program displays everything correctly outside of the print preview and the actual print as far as I know. |
|
|
|
Nov 12 2009, 11:50 AM
Post
#258
|
|
|
Target ![]() Group: Members Posts: 6 Joined: 25-July 06 Member No.: 8,958 |
I just discover it, and already love it. (IMG:style_emoticons/default/smile.gif)
Feature suggestion: it would be nice if you could maximice the window (IMG:style_emoticons/default/smile.gif) |
|
|
|
Nov 13 2009, 03:24 PM
Post
#259
|
|
|
Target ![]() Group: Members Posts: 4 Joined: 13-November 09 Member No.: 17,870 |
Hey I just wanted to report a bug really quick:
Create: Ork Special: Mystic Adept (10) Qualities: Ambidextrous (5) Guts (5) Aptitude (10) This adds up to 30. However, in the Build Points under Positive Qualities it's listed as 35. That's all. |
|
|
|
Nov 13 2009, 05:36 PM
Post
#260
|
|
|
Moving Target ![]() ![]() Group: Members Posts: 133 Joined: 19-October 08 From: Turlock, CA Member No.: 16,534 |
The fix for the special dropdown/quality points total bug will be pushed with the next update.
|
|
|
|
Nov 17 2009, 02:36 AM
Post
#261
|
|
|
Moving Target ![]() ![]() Group: Members Posts: 109 Joined: 5-April 09 From: North DFW Area Member No.: 17,052 |
Quick little error, the price of the Attention Coprocessor cyberware from Augmentation doesn't scale.
|
|
|
|
Nov 17 2009, 03:33 AM
Post
#262
|
|
|
Moving Target ![]() ![]() Group: Members Posts: 133 Joined: 19-October 08 From: Turlock, CA Member No.: 16,534 |
|
|
|
|
Nov 18 2009, 05:33 PM
Post
#263
|
|
|
Moving Target ![]() ![]() Group: Members Posts: 109 Joined: 5-April 09 From: North DFW Area Member No.: 17,052 |
No problem; Augmentation, pg 36.
The only actual problem is that it is supposed to cost Rating*3000Y; i.e. Availability and Essence do not scale. |
|
|
|
Nov 18 2009, 06:41 PM
Post
#264
|
|
|
Moving Target ![]() ![]() Group: Members Posts: 133 Joined: 19-October 08 From: Turlock, CA Member No.: 16,534 |
|
|
|
|
Nov 18 2009, 06:48 PM
Post
#265
|
|
|
Moving Target ![]() ![]() Group: Members Posts: 133 Joined: 19-October 08 From: Turlock, CA Member No.: 16,534 |
I was building an adept, and added a standard bow. On the weapons sheet, it lists the range correctly (STR7 bow with ranges of 7/70/210/420), but on the print sheet, under range it has 2. Not the actual range. The other ranged weapons I've added all seem to be working fine. Also, with the bow, the price is showing as a flat price, instead of the bows RatingX100. I changed it in my copy to work correctly, but figured you'd like to know about it, too. Fixed bow price...working on the print thing. Thanks! d:- D |
|
|
|
Nov 21 2009, 10:32 PM
Post
#266
|
|
|
Moving Target ![]() ![]() Group: Members Posts: 206 Joined: 21-November 09 Member No.: 17,893 |
I love ur generator n just joined to give my cred to u, humble sir and post a suggestion:
Itīd be great if the other sections beside "gear" had a search-function, too. Furthermore i somehow couldnt find the mounted weapons for the vehicles(maybe i just missed it somehow) and Last but not least it would be awesome for the far future to have descriptions of the skills n stuff so u dont always have to look em up in the books(that french gen i used before had that). (IMG:style_emoticons/default/smile.gif) Keep up with ur great work! (IMG:style_emoticons/default/spin.gif) |
|
|
|
Nov 21 2009, 10:49 PM
Post
#267
|
|
|
Moving Target ![]() ![]() Group: Members Posts: 133 Joined: 19-October 08 From: Turlock, CA Member No.: 16,534 |
I love ur generator n just joined to give my cred to u, humble sir and post a suggestion: Itīd be great if the other sections beside "gear" had a search-function, too. Furthermore i somehow couldnt find the mounted weapons for the vehicles(maybe i just missed it somehow) and Last but not least it would be awesome for the far future to have descriptions of the skills n stuff so u dont always have to look em up in the books(that french gen i used before had that). (IMG:style_emoticons/default/smile.gif) Keep up with ur great work! (IMG:style_emoticons/default/spin.gif) The vehicle weapons are on the weapons tab, under ranged weapons (If i remember right) Thanks for the feedback, and happy chargening! d:- D |
|
|
|
Nov 21 2009, 11:01 PM
Post
#268
|
|
|
Moving Target ![]() ![]() Group: Members Posts: 206 Joined: 21-November 09 Member No.: 17,893 |
Fast respond. (IMG:style_emoticons/default/nyahnyah.gif)
Yeah, got it. ^^ Another suggestion: i kinda miss the field for the chars name. |
|
|
|
Nov 23 2009, 01:14 PM
Post
#269
|
|
|
Target ![]() Group: Members Posts: 42 Joined: 15-January 09 From: Indianapolis Member No.: 16,773 |
I do love this program.
Any chance for a good print out in the near future (i.e. one that looks like an actual character sheet rather than text only?). Or at least prints everything on the same (or continuous) page(s)? I love the software but hate the print out. |
|
|
|
Nov 23 2009, 06:31 PM
Post
#270
|
|
|
Moving Target ![]() ![]() Group: Members Posts: 133 Joined: 19-October 08 From: Turlock, CA Member No.: 16,534 |
I do love this program. Any chance for a good print out in the near future (i.e. one that looks like an actual character sheet rather than text only?). Or at least prints everything on the same (or continuous) page(s)? I love the software but hate the print out. Ya...the printout sucks. I pretty much have to do the whole thing by hand, so its not likely that it'll be of really high quality any time soon. I do plan to use the standardized character format soon, so you can export it and print it with a different chargen eventually. sorry. d:- ) |
|
|
|
Dec 13 2009, 09:38 PM
Post
#271
|
|
|
Moving Target ![]() ![]() Group: Members Posts: 628 Joined: 13-December 09 From: Montreal, Quebec Member No.: 17,963 |
Quick info : Can't choose Mentor Spirit/ Paragon.
Do you want me to put the infected part in the Database with the Running Wild updates ? Oh yeah, why do you use this kind of Data ? It dates from the SRCG from the 2nd ed from Paolo. You could make the program works with a nice xml database. I really love the program, you could upgrade a lot of stuff in it. If you want to include xml in it, I could point you a friend of mine. He's working on a character advancement program with an xml back bone. I hope you continue your good work. --- edit --- Did you update the Databases using SR4A ? There are some stuff that don't work in character creation ... |
|
|
|
Dec 13 2009, 09:58 PM
Post
#272
|
|
|
Moving Target ![]() ![]() Group: Members Posts: 133 Joined: 19-October 08 From: Turlock, CA Member No.: 16,534 |
Quick info : Can't choose Mentor Spirit/ Paragon. Do you want me to put the infected part in the Database with the Running Wild updates ? Oh yeah, why do you use this kind of Data ? It dates from the SRCG from the 2nd ed from Paolo. You could make the program works with a nice xml database. I really love the program, you could upgrade a lot of stuff in it. If you want to include xml in it, I could point you a friend of mine. He's working on a character advancement program with an xml back bone. I hope you continue your good work. --- edit --- Did you update the Databases using SR4A ? There are some stuff that don't work in character creation ... I used this data structure for no apparent reason. I just made it up as i went along. xml would have been nicer, but it would also take up more space. In retrospect, using more space would have been better for human readability, but the space efficient part makes it load everything quicker. I also didnt use a database because I wanted the data to be accessible to users so that they can edit the data files as they wish. I started with this format before I implemented the custom item GUI (which I just added on a whim). This is not up to date as far as SR4A is concerned, and yes, there is a whole store of things that could be added. d:- D |
|
|
|
Dec 13 2009, 11:16 PM
Post
#273
|
|
|
Moving Target ![]() ![]() Group: Members Posts: 628 Joined: 13-December 09 From: Montreal, Quebec Member No.: 17,963 |
I've changed some Adept power in my database. They have a lower cost now.
|
|
|
|
Dec 14 2009, 07:09 PM
Post
#274
|
|
|
Target ![]() Group: Members Posts: 51 Joined: 27-February 08 From: Sochi, Russia Member No.: 15,714 |
Say, is chargen's grabbing a 1gb of ram normal? I'm running Vista x64.
|
|
|
|
Dec 14 2009, 09:13 PM
Post
#275
|
|
|
Moving Target ![]() ![]() Group: Members Posts: 133 Joined: 19-October 08 From: Turlock, CA Member No.: 16,534 |
|
|
|
|
![]() ![]() |
|
Lo-Fi Version | Time is now: 13th April 2022 - 02:16 PM |
Topps, Inc has sole ownership of the names, logo, artwork, marks, photographs, sounds, audio, video and/or any proprietary material used in connection with the game Shadowrun. Topps, Inc has granted permission to the Dumpshock Forums to use such names, logos, artwork, marks and/or any proprietary materials for promotional and informational purposes on its website but does not endorse, and is not affiliated with the Dumpshock Forums in any official capacity whatsoever.